mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-27 18:12:00 +00:00
* Anomalies now have observer-visible countdowns 🆑 coiax add: Anomalies now have observer-visible countdowns to their detonation. /🆑 - Behind the scenes, moved the detonation code from the event to the anomalies themselves. May be some differences of lifespan, given we're going from event ticks to world.time, but meh. * Changes the name of the anomaly cores
34 lines
976 B
Plaintext
34 lines
976 B
Plaintext
/datum/round_event_control/anomaly
|
|
name = "Anomaly: Energetic Flux"
|
|
typepath = /datum/round_event/anomaly
|
|
|
|
min_players = 1
|
|
max_occurrences = 0 //This one probably shouldn't occur! It'd work, but it wouldn't be very fun.
|
|
weight = 15
|
|
|
|
/datum/round_event/anomaly
|
|
var/area/impact_area
|
|
var/obj/effect/anomaly/newAnomaly
|
|
announceWhen = 1
|
|
|
|
|
|
/datum/round_event/anomaly/setup(loop=0)
|
|
var/safety_loop = loop + 1
|
|
if(safety_loop > 50)
|
|
kill()
|
|
end()
|
|
impact_area = findEventArea()
|
|
if(!impact_area)
|
|
setup(safety_loop)
|
|
var/list/turf_test = get_area_turfs(impact_area)
|
|
if(!turf_test.len)
|
|
setup(safety_loop)
|
|
|
|
/datum/round_event/anomaly/announce()
|
|
priority_announce("Localized energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
|
|
|
|
/datum/round_event/anomaly/start()
|
|
var/turf/T = safepick(get_area_turfs(impact_area))
|
|
if(T)
|
|
newAnomaly = new /obj/effect/anomaly/flux(T)
|