Landmarks works (#19006)

Fixed some landmarks harddels.
Refactored various landmarks in their own subtype instead of using a
name-based switch system.
This commit is contained in:
Fluffy
2024-04-28 19:04:40 +02:00
committed by GitHub
parent fb05bfab41
commit 5c295f5a10
32 changed files with 645 additions and 937 deletions
+6 -2
View File
@@ -31,6 +31,7 @@
var/list/spawnpoints = null //List of the applicable spawnpoints (by name) - Use loc_type: GS_LOC_POS
var/landmark_name = null //Alternatively you can specify a landmark name - Use loc_type: GS_LOC_POS
var/landmark_type = null //Specify a landmark type to look for, instead of the name, this takes precedence over landmark_name
var/loc_type = GS_LOC_POS
@@ -148,10 +149,13 @@
spawnpoints -= spawnpoint //Set the spawnpoint at the bottom of the list.
spawnpoints += spawnpoint
return T
if(!isnull(landmark_name))
if(!isnull(landmark_name) || !isnull(landmark_type))
var/list/possible_landmarks = list()
for(var/obj/effect/landmark/landmark in GLOB.landmarks_list)
if(landmark.name == landmark_name)
if(landmark_type)
if(istype(landmark, landmark_type))
possible_landmarks += landmark
else if(landmark.name == landmark_name)
possible_landmarks += landmark
if(length(possible_landmarks))
var/obj/effect/landmark/L = pick(possible_landmarks)
@@ -4,7 +4,7 @@
tags = list("External")
enabled = FALSE
landmark_name = "JoinLate"
landmark_type = /obj/effect/landmark/latejoin
req_perms = null
max_count = 1