4989c88a22
http://forums.nanotrasen.com/viewtopic.php?f=16&t=12245#p189186 Ported all the random events to Pete/Gia's event system: >Event system now supports weighting. default is 10. a weight of 5 is half as likely as default, 20 twice as likely....etc. >Increased the frequency of events (dust happens over 60% of the time though) >tidied up some ninja code: ninjas now get ~5 objectives. So they are hardmode. >made the gravity toggle into a random event >event system now supports round-start events >event system now supports holiday events >event system now supports events which can only happen after the round has lasted a certain number of ticks >event system now supports max_occurrences for events. Setting any event's max_occurrences to 0 will stop it randomly occurring >events now support being fed associative lists inside new(). This allows you to override their variables easily. >wormhole events no longer cause loads of lag. They are extremely deadly. wormholes should be avoided Other: >replaced the procs for fetching candidates for ninjas and aliums with /proc/get_candidates(be_special_flag), it returns a list of active clients with that be_special preference enabled. >minor fixes to minds >your memories are displayed to you at Login() >removed aliens_allowed >removed ninjas_allowed >pick_n_take() is now more efficient (uses Cut() rather than Remove() Things I added: - Made the pandemic call ..() instead of doing the checks itself. - Made the staff of animation use more charge. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5720 316c924e-a436-60f5-8080-3fe189b3f50e
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
/datum/event_control/electrical_storm
|
|
name = "Electrical Storm"
|
|
typepath = /datum/event/electrical_storm
|
|
earliest_start = 6000
|
|
weight = 40
|
|
|
|
/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()
|