Files
fulpstation/code/modules/events/carp_migration.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

34 lines
1.1 KiB
Plaintext

/datum/round_event_control/carp_migration
name = "Carp Migration"
typepath = /datum/round_event/carp_migration
weight = 15
min_players = 2
earliest_start = 10 MINUTES
max_occurrences = 6
/datum/round_event/carp_migration
announceWhen = 3
startWhen = 50
var/hasAnnounced = FALSE
/datum/round_event/carp_migration/setup()
startWhen = rand(40, 60)
/datum/round_event/carp_migration/announce(fake)
priority_announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
/datum/round_event/carp_migration/start()
var/mob/living/simple_animal/hostile/carp/fish
for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list)
if(prob(95))
fish = new (C.loc)
else
fish = new /mob/living/simple_animal/hostile/carp/megacarp(C.loc)
fishannounce(fish) //Prefer to announce the megacarps over the regular fishies
fishannounce(fish)
/datum/round_event/carp_migration/proc/fishannounce(atom/fish)
if (!hasAnnounced)
announce_to_ghosts(fish) //Only anounce the first fish
hasAnnounced = TRUE