[Fix] There, resource editor should no longer kill techs if a special is not set.

This commit is contained in:
Allanis 2013-08-30 16:56:45 +01:00
parent e20b45a383
commit df54e0e4f3

View File

@ -563,23 +563,16 @@ class Space:
# Get the techs.
tech = self.__pwidget("spiTech0").get_text()
if tech > 0:
try:
planet["general"]["tech"]["main"] = tech
except:
planet["general"]["tech"] = {}
planet["general"]["tech"]["main"] = tech
else:
del planet["general"]["tech"]["main"]
tech = self.__pwidget("spiTech1").get_text()
if tech > 0:
try:
planet["general"]["tech"]["special"] = tech
except:
planet["general"]["tech"] = {}
planet["general"]["tech"]["special"] = tech
else:
del planet["general"]["tech"]["special"]
try:
planet["general"]["tech"]["main"] = tech
except:
planet["general"]["tech"] = {}
planet["general"]["tech"]["main"] = tech
tech = self.__pwidget("spiTech1").get_text()
try:
planet["general"]["tech"]["special"] = tech
except:
planet["general"]["tech"]["special"] = tech
def __sinpStore(self, system, wgt, tag, minortag=None):
text = self.__swidget(wgt).get_text()