mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
The old one still exists, mainly so the associated admin buttons still work. At some point I'll add a nice little panel for event stuff and remove the old procs. event.dm is pretty well commented, and it should be pretty easy to figure it out. Casualties of the change are space dust (which should probably be implemented separately if we want it back), the black hole event (which was awful), space ninjas (which didn't turn up), ionstorms (the non-admin ones sucked anyway) and CLANG, which I will probably add at some point, if no one else does first. Also, I removed pierott's throat from the disease outbreak list. f that s. Thanks to Sukasa and BS12, as my system is loosely based off of theirs. Thanks Giacom for help with structuring and especially commenting this. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5511 316c924e-a436-60f5-8080-3fe189b3f50e
28 lines
905 B
Plaintext
28 lines
905 B
Plaintext
/datum/event/electrical_storm
|
|
var/lightsoutAmount = 1
|
|
var/lightsoutRange = 25
|
|
|
|
|
|
/datum/event/electrical_storm/announce()
|
|
command_alert("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() |