diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm index 9cfdc92b649..aa24ddeb07b 100644 --- a/code/__DEFINES/antagonists.dm +++ b/code/__DEFINES/antagonists.dm @@ -330,7 +330,7 @@ GLOBAL_LIST_INIT(human_invader_antagonists, list( // If this flag is enabled the antagonist datum allows the antagonist to be inducted into a nuclear operative team. #define FLAG_ANTAG_CAN_BE_INDUCTED (1 << 0) -#define HUNTER_PACK_COPS "cop_hunters" -#define HUNTER_PACK_RUSSIAN "russian_hunters" -#define HUNTER_PACK_BOUNTY "bounty_hunters" -#define HUNTER_PACK_PSYKER "psyker_hunters" +#define HUNTER_PACK_COPS "Spacepol Fugitive Hunters" +#define HUNTER_PACK_RUSSIAN "Russian Fugitive Hunters" +#define HUNTER_PACK_BOUNTY "Bounty Fugitive Hunters" +#define HUNTER_PACK_PSYKER "Psyker Fugitive Hunters" diff --git a/code/modules/events/ghost_role/fugitive_event.dm b/code/modules/events/ghost_role/fugitive_event.dm index 54523bafde3..a70cf3e31b3 100644 --- a/code/modules/events/ghost_role/fugitive_event.dm +++ b/code/modules/events/ghost_role/fugitive_event.dm @@ -56,7 +56,13 @@ //after spawning playsound(src, 'sound/weapons/emitter.ogg', 50, TRUE) new /obj/item/storage/toolbox/mechanical(landing_turf) //so they can actually escape maint - addtimer(CALLBACK(src, PROC_REF(spawn_hunters)), 10 MINUTES) + var/hunter_backstory = pick( + HUNTER_PACK_COPS, + HUNTER_PACK_RUSSIAN, + HUNTER_PACK_BOUNTY, + HUNTER_PACK_PSYKER, + ) + addtimer(CALLBACK(src, PROC_REF(spawn_hunters), hunter_backstory), 10 MINUTES) role_name = "fugitive hunter" return SUCCESSFUL_SPAWN @@ -98,9 +104,11 @@ 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/spawn_hunters() - var/backstory = pick(HUNTER_PACK_COPS, HUNTER_PACK_RUSSIAN, HUNTER_PACK_BOUNTY, HUNTER_PACK_PSYKER) - var/datum/map_template/shuttle/ship +/datum/round_event/ghost_role/fugitives/proc/spawn_hunters(backstory) + var/list/candidates = poll_ghost_candidates("Do you wish to be considered for a group of [backstory]?", ROLE_FUGITIVE_HUNTER) + shuffle_inplace(candidates) + + var/datum/map_template/shuttle/hunter/ship switch(backstory) if(HUNTER_PACK_COPS) ship = new /datum/map_template/shuttle/hunter/space_cop @@ -114,11 +122,22 @@ var/x = rand(TRANSITIONEDGE,world.maxx - TRANSITIONEDGE - ship.width) var/y = rand(TRANSITIONEDGE,world.maxy - TRANSITIONEDGE - ship.height) var/z = SSmapping.empty_space.z_value - var/turf/T = locate(x,y,z) - if(!T) + var/turf/placement_turf = locate(x,y,z) + if(!placement_turf) CRASH("Fugitive Hunters (Created from fugitive event) found no turf to load in") - if(!ship.load(T)) + if(!ship.load(placement_turf)) CRASH("Loading [backstory] ship failed!") + + for(var/turf/shuttle_turf in ship.get_affected_turfs(placement_turf)) + for(var/obj/effect/mob_spawn/ghost_role/human/fugitive/spawner in shuttle_turf) + if(length(candidates)) + var/mob/our_candidate = candidates[1] + var/mob/spawned_mob = spawner.create_from_ghost(our_candidate) + candidates -= our_candidate + notify_ghosts("[spawner.prompt_name] has awoken: [spawned_mob]!", source = spawned_mob, action = NOTIFY_ORBIT, header="Come look!") + else + notify_ghosts("[spawner.prompt_name] spawner has been created!", source = spawner, action = NOTIFY_ORBIT, header="Spawn Here!") + priority_announce("Unidentified ship detected near the station.") #undef TEAM_BACKSTORY_SIZE diff --git a/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm b/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm index a603f495114..35a2028aea2 100644 --- a/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/fugitive_hunter_roles.dm @@ -7,10 +7,6 @@ show_flavor = FALSE var/back_story = "error" -/obj/effect/mob_spawn/ghost_role/human/fugitive/Initialize(mapload) - . = ..() - notify_ghosts("Hunters are waking up looking for refugees!", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_FUGITIVE) - /obj/effect/mob_spawn/ghost_role/human/fugitive/special(mob/living/carbon/human/spawned_human) . = ..() var/datum/antagonist/fugitive_hunter/fughunter = new