[Add] Ugly hack to allow modifying special tech1.
This commit is contained in:
parent
22d3be7a34
commit
eff81d7163
@ -452,8 +452,10 @@ class Space:
|
||||
# Tech.
|
||||
try:
|
||||
self.__pwidget("spiTech0").set_text(str(planet["general"]["tech"]["main"]))
|
||||
self.__pwidget("spiTech1").set_text(str(planet["general"]["tech"]["special"]))
|
||||
except:
|
||||
self.__pwidget("spiTech0").set_text(str(0))
|
||||
self.__pwidget("spiTech1").set_text(str(0))
|
||||
|
||||
# Services.
|
||||
services = int(planet["general"]["services"])
|
||||
@ -560,15 +562,24 @@ class Space:
|
||||
planet["general"]["services"] = services
|
||||
|
||||
# Get the techs.
|
||||
tech0 = self.__pwidget("spiTech0").get_text()
|
||||
if tech0 > 0:
|
||||
tech = self.__pwidget("spiTech0").get_text()
|
||||
if tech > 0:
|
||||
try:
|
||||
planet["general"]["tech"]["main"] = tech0
|
||||
planet["general"]["tech"]["main"] = tech
|
||||
except:
|
||||
planet["general"]["tech"] = {}
|
||||
planet["general"]["tech"]["main"] = tech0
|
||||
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"]
|
||||
|
||||
def __sinpStore(self, system, wgt, tag, minortag=None):
|
||||
text = self.__swidget(wgt).get_text()
|
||||
|
Loading…
Reference in New Issue
Block a user