mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 04:52:10 +00:00
Removed overriding of event values via feeding in an associative list into datum/round_event/New(). Instead you can do basic initializations (i.e. feed it constants) by doing new /datum/round_event{variablename=5;}(). This method is handled well by the compiler (it's the same method the maps use), so it will detect unrecognized variablenames etc.
More complex initializations for post setup() stuff can be done by accessing variables directly Event.variablename = whatever;
round_events now have a processing variable, which effectively pauses them.
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
/datum/round_event_control/weightless
|
|
name = "Gravity Systems Failure"
|
|
typepath = /datum/round_event/weightless
|
|
weight = 15
|
|
|
|
/datum/round_event/weightless
|
|
startWhen = 5
|
|
endWhen = 65
|
|
|
|
/datum/round_event/weightless/setup()
|
|
startWhen = rand(0,10)
|
|
endWhen = rand(40,80)
|
|
|
|
/datum/round_event/weightless/announce()
|
|
command_alert("Warning: Failsafes for the station's artificial gravity arrays have been triggered. Please be aware that if this problem recurs it may result in formation of gravitational anomalies. Nanotrasen wishes to remind you that the unauthorised formation of anomalies within Nanotrasen facilities is strictly prohibited by health and safety regulation [rand(99,9999)][pick("a","b","c")]:subclause[rand(1,20)][pick("a","b","c")].")
|
|
|
|
/datum/round_event/weightless/start()
|
|
for(var/area/A in world)
|
|
A.gravitychange(0)
|
|
|
|
if(control)
|
|
control.weight *= 2
|
|
|
|
/datum/round_event/weightless/end()
|
|
for(var/area/A in world)
|
|
A.gravitychange(1)
|
|
|
|
if(announceWhen >= 0)
|
|
command_alert("Artificial gravity arrays are now functioning within normal parameters. Please report any irregularities to your respective head of staff.")
|
|
|
|
|