[Add] <resedit> Changing planet class is supported now.
This commit is contained in:
parent
dca1a33c36
commit
72f0a93c30
@ -132,6 +132,7 @@ class Space:
|
|||||||
"trePlanets":["button-release-event", self.__pupdate],
|
"trePlanets":["button-release-event", self.__pupdate],
|
||||||
"comSystem":["changed", self.__pnewSys],
|
"comSystem":["changed", self.__pnewSys],
|
||||||
"comFaction":["changed", self.__pnewFact],
|
"comFaction":["changed", self.__pnewFact],
|
||||||
|
"comClass":["changed", self.__class_sel],
|
||||||
"butSave":["clicked", self.savePlanets],
|
"butSave":["clicked", self.savePlanets],
|
||||||
"butComAdd":["clicked", self.__commodity_add],
|
"butComAdd":["clicked", self.__commodity_add],
|
||||||
"butComRm":["clicked", self.__commodity_rm],
|
"butComRm":["clicked", self.__commodity_rm],
|
||||||
@ -334,6 +335,7 @@ class Space:
|
|||||||
|
|
||||||
def __pupdate(self, wgt=None, event=None):
|
def __pupdate(self, wgt=None, event=None):
|
||||||
# Store the current values
|
# Store the current values
|
||||||
|
if self.cur_planet != self.__curPlanet():
|
||||||
self.__pstore()
|
self.__pstore()
|
||||||
|
|
||||||
self.__genPlanetTree()
|
self.__genPlanetTree()
|
||||||
@ -809,6 +811,15 @@ class Space:
|
|||||||
self.planets[self.cur_planet]["GFX"]["exterior"] = space
|
self.planets[self.cur_planet]["GFX"]["exterior"] = space
|
||||||
self.__pupdate()
|
self.__pupdate()
|
||||||
|
|
||||||
|
"""
|
||||||
|
Change the planet class.
|
||||||
|
"""
|
||||||
|
def __class_sel(self, wgt=None, event=None):
|
||||||
|
cls = self.__pwidget("comClass").get_active_text()
|
||||||
|
if self.cur_planet != "":
|
||||||
|
self.planets[self.cur_planet]["general"]["class"] = cls
|
||||||
|
self.__pupdate()
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Open the description editor.
|
Open the description editor.
|
||||||
"""
|
"""
|
||||||
@ -905,7 +916,6 @@ class Space:
|
|||||||
|
|
||||||
# Append to new location.
|
# Append to new location.
|
||||||
self.systems[sys]["planets"].append(planet)
|
self.systems[sys]["planets"].append(planet)
|
||||||
print self.systems[sys]["planets"]
|
|
||||||
|
|
||||||
# Recreate the tree.
|
# Recreate the tree.
|
||||||
self.__genPlanetTree()
|
self.__genPlanetTree()
|
||||||
|
Loading…
Reference in New Issue
Block a user