diff --git a/_maps/map_files/GaxStation/GaxStation.dmm b/_maps/map_files/GaxStation/GaxStation.dmm index a1f19e981cdb..cad1c1025762 100644 --- a/_maps/map_files/GaxStation/GaxStation.dmm +++ b/_maps/map_files/GaxStation/GaxStation.dmm @@ -16777,7 +16777,7 @@ /turf/open/floor/plasteel, /area/crew_quarters/fitness) "iYZ" = ( -/obj/effect/landmark/stationroom/gax/ai_whale, +/obj/effect/landmark/stationroom/limited_spawn/gax/ai_whale, /turf/open/space/basic, /area/space) "iZa" = ( diff --git a/yogstation/code/game/objects/effects/landmarks.dm b/yogstation/code/game/objects/effects/landmarks.dm index c2ce36c60110..4a40f32984d2 100644 --- a/yogstation/code/game/objects/effects/landmarks.dm +++ b/yogstation/code/game/objects/effects/landmarks.dm @@ -166,9 +166,28 @@ GLOBAL_LIST_EMPTY(chosen_station_templates) template_names = list("Maint aquarium", "Maint bigconstruction", "Maint bigtheatre", "Maint deltalibrary", "Maint graffitiroom", "Maint junction", "Maint podrepairbay", "Maint pubbybar", "Maint roosterdome", "Maint sanitarium", "Maint snakefighter", "Maint vault", "Maint ward", "Maint assaultpod", "Maint maze", "Maint maze2", "Maint boxfactory", "Maint sixsectorsdown", "Maint advbotany", "Maint beach", "Maint botany_apiary", "Maint gamercave", "Maint ladytesla_altar", "Maint olddiner", "Maint smallmagician", "Maint fourshops") -/obj/effect/landmark/stationroom/gax/ai_whale - unique = TRUE - template_names = list("AI Whale",EMPTY_SPAWN,EMPTY_SPAWN,EMPTY_SPAWN) +/// Type of landmark that find all others of the same type, and only spawns count number of ruins at them +/obj/effect/landmark/stationroom/limited_spawn + var/choose_result = "" + var/count = 1 + +/obj/effect/landmark/stationroom/limited_spawn/choose() + if(choose_result != "") + return choose_result + var/list/landmarks = list() + for(var/obj/effect/landmark/stationroom/limited_spawn/L in GLOB.stationroom_landmarks) + if(L.type == src.type) + landmarks |= L + + for(var/i = 0, i < count, i++) + var/obj/effect/landmark/stationroom/limited_spawn/L = pick_n_take(landmarks) + L.choose_result = pick(L.template_names) + + for(var/obj/effect/landmark/stationroom/limited_spawn/L in landmarks) + L.choose_result = EMPTY_SPAWN + +/obj/effect/landmark/stationroom/limited_spawn/gax/ai_whale + template_names = list("AI Whale") /obj/effect/landmark/start/infiltrator name = "infiltrator"