From dbf3e7d2468fa85e2d59e858e1de68856d6de19e Mon Sep 17 00:00:00 2001 From: r4d6 <50276533+r4d6@users.noreply.github.com> Date: Thu, 19 Dec 2019 15:27:45 -0500 Subject: [PATCH] Add the landmarks --- code/game/objects/effects/landmarks.dm | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index ed88d51c2d..42f554e27f 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -432,3 +432,48 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) GLOB.ruin_landmarks -= src ruin_template = null . = ..() + +//------Station Rooms Landmarks------------// +/obj/effect/landmark/stationroom + var/list/template_names = list() + layer = BULLET_HOLE_LAYER + +/obj/effect/landmark/stationroom/New() + ..() + GLOB.stationroom_landmarks += src + +/obj/effect/landmark/stationroom/Destroy() + if(src in GLOB.stationroom_landmarks) + GLOB.stationroom_landmarks -= src + return ..() + +/obj/effect/landmark/stationroom/proc/load(template_name) + var/turf/T = get_turf(src) + if(!T) + return FALSE + if(!template_name) + for(var/t in template_names) + if(!SSmapping.station_room_templates[t]) + log_world("Station room spawner placed at ([T.x], [T.y], [T.z]) has invalid ruin name of \"[t]\" in its list") + template_names -= t + template_name = safepick(template_names) + if(!template_name) + GLOB.stationroom_landmarks -= src + qdel(src) + return FALSE + var/datum/map_template/template = SSmapping.station_room_templates[template_name] + if(!template) + return FALSE + testing("Ruin \"[template_name]\" placed at ([T.x], [T.y], [T.z])") + template.load(T, centered = FALSE) + template.loaded++ + GLOB.stationroom_landmarks -= src + qdel(src) + message_admins("Stationroom loaded successfully") + return TRUE + +// The landmark for the Engine + +/obj/effect/landmark/stationroom/box/engine + template_names = list("Engine SM", "Engine Singulo", "Engine Tesla") + icon = 'icons/rooms/box/engine.dmi'