Ejemplo n.º 1
0
def check_conflicting_region_ids(m: Map, region_data: Region.Data):
    for region in m.get_regions().values():
        assert region.get_data(
        ).id != region_data.id, f'Region GUID {region_data.id} already exists in map'
        # assert region.get_data().mesh_range != region_data.mesh_range, f'Region mesh range {region_data.mesh_range} already exists in map'  # doesn't matter
        assert region.get_data(
        ).scid_range != region_data.scid_range, f'Region scid range {region_data.scid_range} already exists in map'
Ejemplo n.º 2
0
 def test_koe(self):
     bits = Bits()
     map_dir = bits.gas_dir.get_subdir('world').get_subdir(
         'maps').get_subdir('map_world')
     m = Map(map_dir, bits)
     self.assertIsInstance(m, Map)
     self.assertEqual(map_dir, m.gas_dir)
     self.assertEqual('"Kingdom of Ehb"', m.get_data().screen_name)
     self.assertEqual(81, len(m.get_regions()))
Ejemplo n.º 3
0
def add_map_world_levels(_map: Map):
    for region_name, region in _map.get_regions().items():
        print(region_name)
        add_region_world_levels(region)