mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-03 13:32:17 +00:00
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns Edit: Most left out ones are in mecha which should be done in mecha refactor already Oh my look how clean it is Co-authored-by: TiviPlus <TiviPlus> Co-authored-by: Couls <coul422@gmail.com> Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: Couls <coul422@gmail.com>
34 lines
905 B
Plaintext
34 lines
905 B
Plaintext
/datum/round_event_control/electrical_storm
|
|
name = "Electrical Storm"
|
|
typepath = /datum/round_event/electrical_storm
|
|
earliest_start = 10 MINUTES
|
|
min_players = 5
|
|
weight = 20
|
|
alert_observers = FALSE
|
|
|
|
/datum/round_event/electrical_storm
|
|
var/lightsoutAmount = 1
|
|
var/lightsoutRange = 25
|
|
announceWhen = 1
|
|
|
|
/datum/round_event/electrical_storm/announce(fake)
|
|
priority_announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
|
|
|
|
|
|
/datum/round_event/electrical_storm/start()
|
|
var/list/epicentreList = list()
|
|
|
|
for(var/i=1, i <= lightsoutAmount, i++)
|
|
var/turf/T = find_safe_turf()
|
|
if(istype(T))
|
|
epicentreList += T
|
|
|
|
if(!epicentreList.len)
|
|
return
|
|
|
|
for(var/centre in epicentreList)
|
|
for(var/a in GLOB.apcs_list)
|
|
var/obj/machinery/power/apc/A = a
|
|
if(get_dist(centre, A) <= lightsoutRange)
|
|
A.overload_lighting()
|