From 7d6eb06e84b8a4911c9bda0e6bbd062e3a7730df Mon Sep 17 00:00:00 2001 From: CliffracerX Date: Fri, 11 Aug 2023 14:44:07 -0400 Subject: [PATCH] [MODULAR] Modularized Interlink Loading (#22933) * Modularized Interlink loading Should resolve issues #21821 & #19343, and make #20115 N/A, alongside any other areas where SS13 assumes station levels are Z2+. * This should fix the CI runtimes * Another little something that you were forgetting, that was screaming during CI --------- Co-authored-by: GoldenAlpharex --- _maps/_basemap.dm | 2 -- _maps/map_files/generic/CentCom_skyrat_z2.dmm | 13 ++----------- code/__DEFINES/maps.dm | 3 --- .../modules/mapping/code/interlink_helper.dm | 16 ++++++++++++++++ tgstation.dme | 1 + 5 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 modular_skyrat/modules/mapping/code/interlink_helper.dm diff --git a/_maps/_basemap.dm b/_maps/_basemap.dm index 64855a4ac14..b1685e7a0d0 100644 --- a/_maps/_basemap.dm +++ b/_maps/_basemap.dm @@ -2,8 +2,6 @@ #include "map_files\generic\CentCom.dmm" -#include "map_files\generic\CentCom_skyrat_z2.dmm" //SKYRAT EDIT ADDITION - SMMS - #ifndef LOWMEMORYMODE #ifdef ALL_MAPS #include "map_files\Birdshot\birdshot.dmm" diff --git a/_maps/map_files/generic/CentCom_skyrat_z2.dmm b/_maps/map_files/generic/CentCom_skyrat_z2.dmm index 0a5f3b0e85a..dde99c8d276 100644 --- a/_maps/map_files/generic/CentCom_skyrat_z2.dmm +++ b/_maps/map_files/generic/CentCom_skyrat_z2.dmm @@ -4613,11 +4613,7 @@ name = "Shinto Cabin" }, /obj/structure/fans/tiny/invisible, -/obj/effect/turf_decal/siding{ - icon = 'icons/turf/floors/carpet.dmi'; - icon_state = "carpet-1" - }, -/turf/open/floor/sepia, +/turf/open/floor/carpet, /area/centcom/holding/cafedorms) "bGH" = ( /obj/effect/turf_decal/trimline/dark_red/filled/arrow_cw{ @@ -6548,12 +6544,7 @@ /turf/open/floor/iron/dark, /area/centcom/interlink) "gLq" = ( -/obj/effect/turf_decal/siding{ - icon = 'icons/turf/floors/carpet.dmi'; - icon_state = "carpet-2"; - pixel_y = -16 - }, -/turf/open/floor/bamboo, +/turf/open/floor/carpet, /area/centcom/holding/cafedorms) "gMw" = ( /turf/closed/wall/mineral/sandstone, diff --git a/code/__DEFINES/maps.dm b/code/__DEFINES/maps.dm index a7afaff4df8..ca09aeb402c 100644 --- a/code/__DEFINES/maps.dm +++ b/code/__DEFINES/maps.dm @@ -150,9 +150,6 @@ Always compile, always use that verb, and always make sure that it works for wha // must correspond to _basemap.dm for things to work correctly #define DEFAULT_MAP_TRAITS list(\ DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\ - /* SKYRAT EDIT ADDITION BEGIN - MODULAR_MAPS */\ - DECLARE_LEVEL("Offstation_skyrat", ZTRAITS_CENTCOM),\ - /* SKYRAT EDIT ADDITION END - MODULAR_MAPS */\ ) // Camera lock flags diff --git a/modular_skyrat/modules/mapping/code/interlink_helper.dm b/modular_skyrat/modules/mapping/code/interlink_helper.dm new file mode 100644 index 00000000000..4d173e0f32f --- /dev/null +++ b/modular_skyrat/modules/mapping/code/interlink_helper.dm @@ -0,0 +1,16 @@ +/// A file to help with making it possible to load the Interlink *modularly* instead of leaving it stuck in Z-2 where station should be and spawning all manner of bad behaviour. +#define INIT_ANNOUNCE(X) to_chat(world, span_boldannounce("[X]")); log_world(X) + +/datum/controller/subsystem/mapping/loadWorld() + . = ..() + var/list/FailedZsRat = list() + LoadGroup(FailedZsRat, "The Interlink", "map_files/generic", "CentCom_skyrat_z2.dmm", default_traits = ZTRAITS_CENTCOM) + if(LAZYLEN(FailedZsRat)) //but seriously, unless the server's filesystem is messed up this will never happen + var/msg = "RED ALERT! The following map files failed to load: [FailedZsRat[1]]" + if(FailedZsRat.len > 1) + for(var/I in 2 to FailedZsRat.len) + msg += ", [FailedZsRat[I]]" + msg += ". Yell at your server host!" + INIT_ANNOUNCE(msg) + +#undef INIT_ANNOUNCE diff --git a/tgstation.dme b/tgstation.dme index ac952deab6c..fb838f9ddf3 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6703,6 +6703,7 @@ #include "modular_skyrat\modules\mapping\code\holocall.dm" #include "modular_skyrat\modules\mapping\code\icemoon.dm" #include "modular_skyrat\modules\mapping\code\interdyne_mining.dm" +#include "modular_skyrat\modules\mapping\code\interlink_helper.dm" #include "modular_skyrat\modules\mapping\code\jobs.dm" #include "modular_skyrat\modules\mapping\code\laptop_presets.dm" #include "modular_skyrat\modules\mapping\code\lavaland.dm"