mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 05:22:40 +00:00
-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
29 lines
955 B
Plaintext
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()
|