Example #1
0
    def _starting_location_on_select_save_station(self):
        world_list = self.game_description.world_list
        save_stations = [
            world_list.node_to_area_location(node)
            for node in world_list.all_nodes if node.name == "Save Station"
        ]

        with self._editor as editor:
            editor.set_configuration_field(
                "starting_location",
                StartingLocation.with_elements(save_stations, self.game_enum))
def test_decode(location_with_data):
    # Setup
    data, expected = location_with_data

    # Run
    decoder = BitPackDecoder(data)
    result = StartingLocation.bit_pack_unpack(decoder, {
        "reference":
        StartingLocation.with_elements([], RandovaniaGame.PRIME2)
    })

    # Assert
    assert result == expected
 def _starting_location_on_select_ship(self):
     with self._editor as editor:
         editor.set_layout_configuration_field(
             "starting_location",
             StartingLocation.with_elements(
                 [self.game_description.starting_location]))