Files
Aurora.3/code/modules/events/electrical_storm.dm
NanakoAC 4c7e1eb595 False Alarm Fixes (#1022)
-Makes a lot of unsuitable events excluded from faking. Some of them could do with reworking to make them function, like the infestation and prison breaks, but for now i just had to exclude them
-Adds an In-character/descriptive name, used for the announcement apologising for the mistake
-Fixes an issue where using debug Trigger Event verb would fill the events list with empty severe events and cause runtime errors
2016-10-02 21:24:00 +03:00

29 lines
955 B
Plaintext

/datum/event/electrical_storm
var/lightsoutAmount = 1
var/lightsoutRange = 25
ic_name = "an electrical storm"
/datum/event/electrical_storm/announce()
command_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
/datum/event/electrical_storm/start()
var/list/epicentreList = list()
for(var/i=1, i <= lightsoutAmount, i++)
var/list/possibleEpicentres = list()
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
possibleEpicentres += newEpicentre
if(possibleEpicentres.len)
epicentreList += pick(possibleEpicentres)
else
break
if(!epicentreList.len)
return
for(var/obj/effect/landmark/epicentre in epicentreList)
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
apc.overload_lighting()