From 7dd9aea7558ecb24f967323509110f2b5c44ca03 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Wed, 16 Aug 2023 08:37:40 -0700 Subject: [PATCH] Unit_test exceptions --- code/__DEFINES/__game.dm | 1 + code/modules/cm_marines/equipment/maps.dm | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm index 3116d7f19555..5964082a9bae 100644 --- a/code/__DEFINES/__game.dm +++ b/code/__DEFINES/__game.dm @@ -39,6 +39,7 @@ block( \ #define MAP_RUNTIME "USS Runtime" #define MAP_LV522_CHANCES_CLAIM "LV-522 Chance's Claim" // Highpop Only #define MAP_NEW_VARADERO "New Varadero"//ice colony underground but as its own map +#define MAP_CHINKOOK "Chinook 91 GSO" //admin level #define GAMEMODE_WHISKEY_OUTPOST "Whiskey Outpost" #define GAMEMODE_HIVE_WARS "Hive Wars" diff --git a/code/modules/cm_marines/equipment/maps.dm b/code/modules/cm_marines/equipment/maps.dm index 141fcd0aa2c3..b185cb6a1f2a 100644 --- a/code/modules/cm_marines/equipment/maps.dm +++ b/code/modules/cm_marines/equipment/maps.dm @@ -158,7 +158,10 @@ GLOBAL_LIST_INIT_TYPED(map_type_list, /obj/item/map, setup_all_maps()) /obj/item/map/current_map/Initialize(mapload, ...) . = ..() - var/obj/item/map/map = GLOB.map_type_list[SSmapping.configs[GROUND_MAP].map_name] + var/map_name = SSmapping.configs[GROUND_MAP].map_name + var/obj/item/map/map = GLOB.map_type_list[map_name] + if (!map && (map_name == MAP_RUNTIME || map_name == MAP_CHINKOOK || map_name == MAIN_SHIP_DEFAULT_NAME)) + return // "Maps" we don't have maps for so we don't need to throw a runtime for (namely in unit_testing) name = map.name desc = map.desc html_link = map.html_link