Files
GS13NG/code/modules/events/electrical_storm.dm
Poojawa 03086dfa91 Tg 1 28 sync testing/confirmation (#5178)
* maps, tgui, tools

* defines and helpers

* onclick and controllers

* datums

fucking caught that hulk reversal too.

* game and shuttle modular

* module/admin

* oh god they fucking moved antag shit again

* haaaaate. Haaaaaaaaaate.

* enables moff wings

* more modules things

* tgstation.dme

before I forget something important

* some mob stuff

* s'more mob/living stuff

* some carbon stuff

* ayy lmaos and kitchen meat

* Human stuff

* species things

moff wings have a 'none' version too

* the rest of the module stuff.

* some strings

* misc

* mob icons

* some other icons.

* It compiles FUCK BORERS

FUCK BORERS
2018-01-29 04:42:29 -06:00

34 lines
924 B
Plaintext

/datum/round_event_control/electrical_storm
name = "Electrical Storm"
typepath = /datum/round_event/electrical_storm
earliest_start = 6000
min_players = 5
weight = 40
alertadmins = 0
/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()