mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Add the landmarks
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user