mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 04:48:18 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user