Esempio n. 1
0
 def from_yml_rep(self, yml_rep):
     super(Door, self).from_yml_rep(yml_rep)
     self.text_pointer.from_yml_rep(get_from_user_dict(yml_rep, "Text Pointer", str))
     self.flag = EbEventFlagTableEntry.from_yml_rep(get_from_user_dict(yml_rep, "Event Flag", int))
     self.destination_x = get_from_user_dict(yml_rep, "Destination X", int)
     self.destination_y = get_from_user_dict(yml_rep, "Destination Y", int)
     self.destination_direction = get_enum_from_user_dict(yml_rep, "Direction", DestinationDirection)
     self.destination_style = get_from_user_dict(yml_rep, "Style", int)
Esempio n. 2
0
    def settings_from_yml_rep(self, yml_rep, include_colors=False):
        self.flag = EbEventFlagTableEntry.from_yml_rep(yml_rep[EbEventFlagTableEntry.name])
        self.sprite_palette_id = SpritePaletteIdTableEntry.from_yml_rep(yml_rep[SpritePaletteIdTableEntry.name])
        self.flash_effect = FlashEffectTableEntry.from_yml_rep(yml_rep[FlashEffectTableEntry.name])

        if include_colors:
            self.from_string(yml_rep["Colors"])

        if self.flag != 0:
            self.flag_palette = EbMapPalette()
            self.flag_palette.settings_from_yml_rep(yml_rep["Event Palette"], include_colors=True)
Esempio n. 3
0
    def settings_from_yml_rep(self, yml_rep, include_colors=False):
        self.flag = EbEventFlagTableEntry.from_yml_rep(yml_rep[EbEventFlagTableEntry.name])
        self.sprite_palette_id = SpritePaletteIdTableEntry.from_yml_rep(yml_rep[SpritePaletteIdTableEntry.name])
        self.flash_effect = FlashEffectTableEntry.from_yml_rep(yml_rep[FlashEffectTableEntry.name])

        if include_colors:
            self.from_string(yml_rep["Colors"])

        if self.flag != 0:
            self.flag_palette = EbMapPalette()
            self.flag_palette.settings_from_yml_rep(yml_rep["Event Palette"], include_colors=True)
Esempio n. 4
0
 def from_yml_rep(self, yml_rep):
     super(SwitchDoor, self).from_yml_rep(yml_rep)
     self.flag = EbEventFlagTableEntry.from_yml_rep(get_from_user_dict(yml_rep, "Event Flag", int))
     self.text_pointer.from_yml_rep(get_from_user_dict(yml_rep, "Text Pointer", str))
Esempio n. 5
0
 def from_yml_rep(cls, yml_rep):
     return [(EbEventFlagTableEntry.from_yml_rep(entry_yml_rep[EbEventFlagTableEntry.name]),
              [MapEventSubTableEntry.from_yml_rep(tile_change)
               for tile_change in entry_yml_rep["Tile Changes"]])
             for entry_yml_rep in yml_rep]