From df54e0e4f3cf179fd6e7ea7b3dc540e1ac9d754b Mon Sep 17 00:00:00 2001 From: Allanis Date: Fri, 30 Aug 2013 16:56:45 +0100 Subject: [PATCH] [Fix] There, resource editor should no longer kill techs if a special is not set. --- utils/resedit/space.py | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/utils/resedit/space.py b/utils/resedit/space.py index 2dacb97..efb1789 100644 --- a/utils/resedit/space.py +++ b/utils/resedit/space.py @@ -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()