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
This commit is contained in:
Rykka
2020-08-26 09:32:12 -04:00
parent 29b1890de5
commit aeb3a10235
7 changed files with 38 additions and 38 deletions
+3 -38
View File
@@ -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, )
@@ -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'
+1
View File
@@ -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"