From aeb3a10235962274223e5c02fdf312e3392c42f7 Mon Sep 17 00:00:00 2001 From: Rykka Date: Wed, 26 Aug 2020 09:32:12 -0400 Subject: [PATCH] Modularizes Engine Submap Loading so it can be selected per-map! Self-Explanatory - just go to engine_submaps_vr/mapname and check the _engine_submaps.dm to choose the engine presets you want to load. Figured we might as well modularize this as it'll help with upcoming/new map projects in the future. :blep: @novacat pls speedmerge thx --- maps/submaps/engine_submaps_vr/engine.dm | 41 ++----------------- .../tether/_engine_submaps.dm | 34 +++++++++++++++ .../{ => tether}/engine_rust.dmm | 0 .../{ => tether}/engine_singulo.dmm | 0 .../{ => tether}/engine_sme.dmm | 0 .../{ => tether}/engine_tesla.dmm | 0 vorestation.dme | 1 + 7 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm rename maps/submaps/engine_submaps_vr/{ => tether}/engine_rust.dmm (100%) rename maps/submaps/engine_submaps_vr/{ => tether}/engine_singulo.dmm (100%) rename maps/submaps/engine_submaps_vr/{ => tether}/engine_sme.dmm (100%) rename maps/submaps/engine_submaps_vr/{ => tether}/engine_tesla.dmm (100%) diff --git a/maps/submaps/engine_submaps_vr/engine.dm b/maps/submaps/engine_submaps_vr/engine.dm index ffac9b7096b..e71293115d1 100644 --- a/maps/submaps/engine_submaps_vr/engine.dm +++ b/maps/submaps/engine_submaps_vr/engine.dm @@ -1,41 +1,6 @@ -// This causes engine maps to get 'checked' and compiled, when undergoing a unit test. -// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. -// When adding a new engine, please add it to this list. -#if MAP_TEST -#include "engine_rust.dmm" -#include "engine_singulo.dmm" -#include "engine_sme.dmm" -#endif - -/datum/map_template/engine - name = "Engine Content" - desc = "It would be boring to have the same engine every day right?" - // annihilate = TRUE - Would wipe out in a rectangular area unfortunately - allow_duplicates = FALSE - -/datum/map_template/engine/rust - name = "R-UST Engine" - desc = "R-UST Fusion Tokamak Engine" - mappath = 'maps/submaps/engine_submaps_vr/engine_rust.dmm' - -/datum/map_template/engine/singulo - name = "Singularity Engine" - desc = "Lord Singuloth" - mappath = 'maps/submaps/engine_submaps_vr/engine_singulo.dmm' - -/datum/map_template/engine/supermatter - name = "Supermatter Engine" - desc = "Old Faithful Supermatter" - mappath = 'maps/submaps/engine_submaps_vr/engine_sme.dmm' - -/datum/map_template/engine/tesla - name = "Edison's Bane" - desc = "The Telsa Engine" - mappath = 'maps/submaps/engine_submaps_vr/engine_tesla.dmm' - - - -// Landmark for where to load in the engine on permament map +// Landmark for where to load in the engine on permament map. +// Map-specific engine subtypes are in maps/submaps/engine_submaps_vr/mapfolder/engine.dmm +// If you're adding a new map, add your folder as mapname, and then copy the _engine_submaps.dm from one of the other folders to the new one, and make your submaps! /obj/effect/landmark/engine_loader name = "Engine Loader" var/clean_turfs // A list of lists, where each list is (x, ) diff --git a/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm b/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm new file mode 100644 index 00000000000..4f60a57efe9 --- /dev/null +++ b/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm @@ -0,0 +1,34 @@ +// This causes engine maps to get 'checked' and compiled, when undergoing a unit test. +// This is so Travis can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. +// When adding a new engine, please add it to this list. +#if MAP_TEST +#include "engine_rust.dmm" +#include "engine_singulo.dmm" +#include "engine_sme.dmm" +#endif + +/datum/map_template/engine + name = "Engine Content" + desc = "It would be boring to have the same engine every day right?" + // annihilate = TRUE - Would wipe out in a rectangular area unfortunately + allow_duplicates = FALSE + +/datum/map_template/engine/rust + name = "R-UST Engine" + desc = "R-UST Fusion Tokamak Engine" + mappath = 'maps/submaps/engine_submaps_vr/tether/engine_rust.dmm' + +/datum/map_template/engine/singulo + name = "Singularity Engine" + desc = "Lord Singuloth" + mappath = 'maps/submaps/engine_submaps_vr/tether/engine_singulo.dmm' + +/datum/map_template/engine/supermatter + name = "Supermatter Engine" + desc = "Old Faithful Supermatter" + mappath = 'maps/submaps/engine_submaps_vr/tether/engine_sme.dmm' + +/datum/map_template/engine/tesla + name = "Edison's Bane" + desc = "The Telsa Engine" + mappath = 'maps/submaps/engine_submaps_vr/tether/engine_tesla.dmm' \ No newline at end of file diff --git a/maps/submaps/engine_submaps_vr/engine_rust.dmm b/maps/submaps/engine_submaps_vr/tether/engine_rust.dmm similarity index 100% rename from maps/submaps/engine_submaps_vr/engine_rust.dmm rename to maps/submaps/engine_submaps_vr/tether/engine_rust.dmm diff --git a/maps/submaps/engine_submaps_vr/engine_singulo.dmm b/maps/submaps/engine_submaps_vr/tether/engine_singulo.dmm similarity index 100% rename from maps/submaps/engine_submaps_vr/engine_singulo.dmm rename to maps/submaps/engine_submaps_vr/tether/engine_singulo.dmm diff --git a/maps/submaps/engine_submaps_vr/engine_sme.dmm b/maps/submaps/engine_submaps_vr/tether/engine_sme.dmm similarity index 100% rename from maps/submaps/engine_submaps_vr/engine_sme.dmm rename to maps/submaps/engine_submaps_vr/tether/engine_sme.dmm diff --git a/maps/submaps/engine_submaps_vr/engine_tesla.dmm b/maps/submaps/engine_submaps_vr/tether/engine_tesla.dmm similarity index 100% rename from maps/submaps/engine_submaps_vr/engine_tesla.dmm rename to maps/submaps/engine_submaps_vr/tether/engine_tesla.dmm diff --git a/vorestation.dme b/vorestation.dme index 693ca50376b..957daf2846f 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -3716,6 +3716,7 @@ #include "maps\submaps\_readme.dm" #include "maps\submaps\engine_submaps_vr\engine.dm" #include "maps\submaps\engine_submaps_vr\engine_areas.dm" +#include "maps\submaps\engine_submaps_vr\tether\_engine_submaps.dm" #include "maps\submaps\space_submaps\space.dm" #include "maps\submaps\space_submaps\debrisfield\debrisfield.dm" #include "maps\submaps\surface_submaps\mountains\mountains.dm"