From e353a50b78d0d3300f575590add6e232ed5fd182 Mon Sep 17 00:00:00 2001 From: adamsong Date: Mon, 27 Jun 2022 17:27:11 -0400 Subject: [PATCH 1/3] Fixes whale spawning --- .../code/game/objects/effects/landmarks.dm | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/yogstation/code/game/objects/effects/landmarks.dm b/yogstation/code/game/objects/effects/landmarks.dm index c2ce36c60110..faf7c2c04dc7 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/choose + var/chose_result = "" + var/count = 1 + +/obj/effect/landmark/stationroom/choose() + if(choose_result != "") + return choose_result + var/list/landmarks = list() + for(var/obj/effect/landmark/choose/L in GLOB.stationroom_landmarks) + if(L.type == src.type) + landmarks |= L + + for(var/i = 0, i < count, i++) + var/obj/effect/landmark/choose/L = pick_n_take(landmarks) + L.choose_result = pick(landmarks.template_names) + + for(var/obj/effect/landmark/choose/L in landmarks) + L.choose_result = EMPTY_SPAWN + +/obj/effect/landmark/stationroom/choose/gax/ai_whale + template_names = list("AI Whale") /obj/effect/landmark/start/infiltrator name = "infiltrator" From 684fe08821b693898da943aedb93de394e75c984 Mon Sep 17 00:00:00 2001 From: adamsong Date: Mon, 27 Jun 2022 17:30:43 -0400 Subject: [PATCH 2/3] Forgot to add bugfixes --- .../code/game/objects/effects/landmarks.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yogstation/code/game/objects/effects/landmarks.dm b/yogstation/code/game/objects/effects/landmarks.dm index faf7c2c04dc7..4a40f32984d2 100644 --- a/yogstation/code/game/objects/effects/landmarks.dm +++ b/yogstation/code/game/objects/effects/landmarks.dm @@ -167,26 +167,26 @@ GLOBAL_LIST_EMPTY(chosen_station_templates) "Maint sixsectorsdown", "Maint advbotany", "Maint beach", "Maint botany_apiary", "Maint gamercave", "Maint ladytesla_altar", "Maint olddiner", "Maint smallmagician", "Maint fourshops") /// Type of landmark that find all others of the same type, and only spawns count number of ruins at them -/obj/effect/landmark/stationroom/choose - var/chose_result = "" +/obj/effect/landmark/stationroom/limited_spawn + var/choose_result = "" var/count = 1 -/obj/effect/landmark/stationroom/choose() +/obj/effect/landmark/stationroom/limited_spawn/choose() if(choose_result != "") return choose_result var/list/landmarks = list() - for(var/obj/effect/landmark/choose/L in GLOB.stationroom_landmarks) + 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/choose/L = pick_n_take(landmarks) - L.choose_result = pick(landmarks.template_names) + var/obj/effect/landmark/stationroom/limited_spawn/L = pick_n_take(landmarks) + L.choose_result = pick(L.template_names) - for(var/obj/effect/landmark/choose/L in landmarks) + for(var/obj/effect/landmark/stationroom/limited_spawn/L in landmarks) L.choose_result = EMPTY_SPAWN -/obj/effect/landmark/stationroom/choose/gax/ai_whale +/obj/effect/landmark/stationroom/limited_spawn/gax/ai_whale template_names = list("AI Whale") /obj/effect/landmark/start/infiltrator From 7410545914864de25b25836c7cb374039ffc15ed Mon Sep 17 00:00:00 2001 From: adamsong Date: Mon, 27 Jun 2022 17:32:26 -0400 Subject: [PATCH 3/3] Adds map change (maybe) --- _maps/map_files/GaxStation/GaxStation.dmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" = (