Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Fugitive Hunters can spawn early if emergency shuttle is called #2164

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions code/modules/events/ghost_role/fugitive_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
HUNTER_PACK_BOUNTY,
HUNTER_PACK_PSYKER,
)
addtimer(CALLBACK(src, PROC_REF(spawn_hunters), hunter_backstory), 10 MINUTES)
addtimer(CALLBACK(src, PROC_REF(check_spawn_hunters), hunter_backstory, 10 MINUTES), 1 MINUTES)
role_name = "fugitive hunter"
return SUCCESSFUL_SPAWN

Expand Down Expand Up @@ -103,7 +103,13 @@
S.put_in_hands(A)
new /obj/item/autosurgeon(landing_turf)

//security team gets called in after 10 minutes of prep to find the refugees
/datum/round_event/ghost_role/fugitives/proc/check_spawn_hunters(backstory, remaining_time)
//if the emergency shuttle has been called, spawn hunters now to give them a chance
if(remaining_time == 0 || SSshuttle.emergency.mode != EMERGENCY_IDLE_OR_RECALLED)
spawn_hunters(backstory)
return
addtimer(CALLBACK(src, PROC_REF(check_spawn_hunters), backstory, remaining_time - 1 MINUTES), 1 MINUTES)

/datum/round_event/ghost_role/fugitives/proc/spawn_hunters(backstory)
var/list/candidates = SSpolling.poll_ghost_candidates("Do you wish to be considered for a group of [backstory]?", check_jobban = ROLE_FUGITIVE_HUNTER, pic_source = /obj/machinery/sleeper, role_name_text = backstory)
shuffle_inplace(candidates)
Expand Down
Loading