From d4b18b2e8026613bea124757bb101e85517322a8 Mon Sep 17 00:00:00 2001 From: tattle <66640614+dragomagol@users.noreply.github.com> Date: Mon, 17 Apr 2023 19:51:03 -0700 Subject: [PATCH] Fixes nightmares not spawning (#74790) ## About The Pull Request #74598 broke nightmare spawning by not using the new proc to choose a valid spawn location. This fixes that. ![image](https://user-images.githubusercontent.com/66640614/232394350-0788a8d5-f950-427b-8add-87700a39b857.png) ## Why It's Good For The Game Fixes #74756 ## Changelog :cl: Tattle fix: Nightmares will once again spawn /:cl: Co-authored-by: tattle --- .../dynamic/dynamic_rulesets_midround.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 60c353cbfcf..ace9605d616 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -509,9 +509,8 @@ cost = 5 minimum_players = 15 repeatable = TRUE - var/list/spawn_locs = list() -/datum/dynamic_ruleset/midround/from_ghosts/nightmare/acceptable(population=0, threat=0) +/datum/dynamic_ruleset/midround/from_ghosts/nightmare/acceptable(population = 0, threat = 0) var/turf/spawn_loc = find_maintenance_spawn(atmos_sensitive = TRUE, require_darkness = TRUE) //Checks if there's a single safe, dark tile on station. if(!spawn_loc) return FALSE @@ -521,17 +520,17 @@ var/datum/mind/player_mind = new /datum/mind(applicant.key) player_mind.active = TRUE - var/mob/living/carbon/human/S = new (pick(spawn_locs)) - player_mind.transfer_to(S) + var/mob/living/carbon/human/new_nightmare = new (find_maintenance_spawn(atmos_sensitive = TRUE, require_darkness = TRUE)) + player_mind.transfer_to(new_nightmare) player_mind.set_assigned_role(SSjob.GetJobType(/datum/job/nightmare)) player_mind.special_role = ROLE_NIGHTMARE player_mind.add_antag_datum(/datum/antagonist/nightmare) - S.set_species(/datum/species/shadow/nightmare) + new_nightmare.set_species(/datum/species/shadow/nightmare) - playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) - message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Nightmare by the midround ruleset.") - log_dynamic("[key_name(S)] was spawned as a Nightmare by the midround ruleset.") - return S + playsound(new_nightmare, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) + message_admins("[ADMIN_LOOKUPFLW(new_nightmare)] has been made into a Nightmare by the midround ruleset.") + log_dynamic("[key_name(new_nightmare)] was spawned as a Nightmare by the midround ruleset.") + return new_nightmare /// Midround Space Dragon Ruleset (From Ghosts) /datum/dynamic_ruleset/midround/from_ghosts/space_dragon