Files
fulpstation/code/modules/events/abductor.dm
MrDoomBringer 8c156a99fe Makes events ghost-announce their spawned atom much more consistently (#41278)
Fixes #41217

cl MrDoomBringer
fix: Events now announce follow-able atoms to ghosts much more reliably
/cl

Implements @ShizCalev's suggestion to just have the event ghost-announce normally, then call a separate ghost announcement for the "atom of interest" as it is created.
2018-11-14 22:27:35 +13:00

36 lines
1.1 KiB
Plaintext
Executable File

/datum/round_event_control/abductor
name = "Abductors"
typepath = /datum/round_event/ghost_role/abductor
weight = 10
max_occurrences = 1
min_players = 20
gamemode_blacklist = list("nuclear","wizard","revolution")
/datum/round_event/ghost_role/abductor
minimum_required = 2
role_name = "abductor team"
fakeable = FALSE //Nothing to fake here
/datum/round_event/ghost_role/abductor/spawn_role()
var/list/mob/dead/observer/candidates = get_candidates(ROLE_ABDUCTOR, null, ROLE_ABDUCTOR)
if(candidates.len < 2)
return NOT_ENOUGH_PLAYERS
var/mob/living/carbon/human/agent = makeBody(pick_n_take(candidates))
var/mob/living/carbon/human/scientist = makeBody(pick_n_take(candidates))
var/datum/team/abductor_team/T = new
if(T.team_number > ABDUCTOR_MAX_TEAMS)
return MAP_ERROR
log_game("[key_name(scientist)] has been selected as [T.name] abductor scientist.")
log_game("[key_name(agent)] has been selected as [T.name] abductor agent.")
scientist.mind.add_antag_datum(/datum/antagonist/abductor/scientist, T)
agent.mind.add_antag_datum(/datum/antagonist/abductor/agent, T)
spawned_mobs += list(agent, scientist)
return SUCCESSFUL_SPAWN