parent
892357cc2c
commit
e6546eea85
|
@ -26,6 +26,8 @@ from rando.Items import ItemManager
|
|||
from utils.parameters import *
|
||||
from logic.logic import Logic
|
||||
from randomizer import VariaRandomizer
|
||||
from utils.doorsmanager import DoorsManager
|
||||
from rom.rom_patches import RomPatches
|
||||
|
||||
|
||||
class SMCollectionState(metaclass=AutoLogicRegister):
|
||||
|
@ -454,6 +456,32 @@ class SMWorld(World):
|
|||
|
||||
def fill_slot_data(self):
|
||||
slot_data = {}
|
||||
if not self.world.is_race:
|
||||
for option_name in self.options:
|
||||
option = getattr(self.world, option_name)[self.player]
|
||||
slot_data[option_name] = option.value
|
||||
|
||||
slot_data["Preset"] = { "Knows": {},
|
||||
"Settings": {"hardRooms": Settings.SettingsDict[self.player].hardRooms,
|
||||
"hardRooms": Settings.SettingsDict[self.player].bossesDifficulty,
|
||||
"hardRooms": Settings.SettingsDict[self.player].hellRuns},
|
||||
"Controller": Controller.ControllerDict[self.player].__dict__}
|
||||
|
||||
for knows in Knows.__dict__:
|
||||
if isKnows(knows):
|
||||
slot_data["Preset"]["Knows"][knows] = [ getattr(Knows.knowsDict[self.player], knows).bool,
|
||||
getattr(Knows.knowsDict[self.player], knows).difficulty]
|
||||
|
||||
slot_data["InterAreaTransitions"] = {}
|
||||
for src, dest in self.variaRando.randoExec.areaGraph.InterAreaTransitions:
|
||||
slot_data["InterAreaTransitions"][src.Name] = dest.Name
|
||||
|
||||
slot_data["Doors"] = {}
|
||||
for door in DoorsManager.doorsDict[self.player].values():
|
||||
slot_data["Doors"][door.name] = door.getColor()
|
||||
|
||||
slot_data["RomPatches"] = RomPatches.ActivePatches[self.player]
|
||||
|
||||
return slot_data
|
||||
|
||||
def collect(self, state: CollectionState, item: Item) -> bool:
|
||||
|
|
Loading…
Reference in New Issue