mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Make pre_rolled safer by converting namespace/plandoitems/plandoconnections to/from dict.
This commit is contained in:
@@ -1508,8 +1508,20 @@ class PlandoItem(NamedTuple):
|
||||
else:
|
||||
self.warn(warning)
|
||||
|
||||
def to_dict(self):
|
||||
return {"item": self.item,
|
||||
"location": self.location,
|
||||
"world": self.world,
|
||||
"from_pool": self.from_pool,
|
||||
"force": self.force}
|
||||
|
||||
|
||||
class PlandoConnection(NamedTuple):
|
||||
entrance: str
|
||||
exit: str
|
||||
direction: str # entrance, exit or both
|
||||
|
||||
def to_dict(self):
|
||||
return {"entrance": self.entrance,
|
||||
"exit": self.exit,
|
||||
"direction": self.direction}
|
||||
|
Reference in New Issue
Block a user