Space Station 13 - Modules - TypesVar Details - Proc Details

event

NOTE: Times are measured in master controller ticks!

Vars

activeForHow long the event has existed. You don't need to change this.
announceWhenWhen in the lifetime to call announce().
endWhenWhen in the lifetime the event should end.
endedAtWhen this event ended.
impact_areaThe area the event will hit
isRunningIf this event is currently running. You should not change this.
nameThe human-readable name of the event
noAutoEndDoes the event end automatically after endWhen passes?
severitySeverity. Lower means less severe, higher means more severe. Does not have to be supported. Is set on New().
startWhenWhen in the lifetime to call start().
startedAtWhen this event started.

Procs

announceCalled when the tick is equal to the announceWhen variable.
endCalled on or after the tick is equal or more than endWhen
fake_announceOverride this to make a custom fake announcement that differs from the normal announcement. Used for false alarms. If this proc returns TRUE, the regular Announce() won't be called.
killCalled when start(), announce() and end() has all been called.
lastProcessAtReturns the latest point of event processing.
processDo not override this proc, instead use the appropiate procs.
setupCalled first before processing.
startCalled when the tick is equal to the startWhen variable.
tickCalled on or after the tick counter is equal to startWhen.

Var Details

activeFor

How long the event has existed. You don't need to change this.

announceWhen

When in the lifetime to call announce().

endWhen

When in the lifetime the event should end.

endedAt

When this event ended.

impact_area

The area the event will hit

isRunning

If this event is currently running. You should not change this.

name

The human-readable name of the event

noAutoEnd

Does the event end automatically after endWhen passes?

severity

Severity. Lower means less severe, higher means more severe. Does not have to be supported. Is set on New().

startWhen

When in the lifetime to call start().

startedAt

When this event started.

Proc Details

announce

Called when the tick is equal to the announceWhen variable.

Allows you to announce before starting or vice versa. Only called once. Ensure no sleep is called. Use INVOKE_ASYNC to call procs which do.

end

Called on or after the tick is equal or more than endWhen

You can include code related to the event ending. Do not place spawn() in here, instead use tick() to check for the activeFor variable. For example: if(activeFor == myOwnVariable + 30) doStuff() Only called once. Ensure no sleep is called. Use INVOKE_ASYNC to call procs which do.

fake_announce

Override this to make a custom fake announcement that differs from the normal announcement. Used for false alarms. If this proc returns TRUE, the regular Announce() won't be called.

kill

Called when start(), announce() and end() has all been called.

lastProcessAt

Returns the latest point of event processing.

process

Do not override this proc, instead use the appropiate procs.

This proc will handle the calls to the appropiate procs. Ensure none of the code paths have a sleep in them. Use INVOKE_ASYNC to call procs which do.

setup

Called first before processing.

Allows you to setup your event, such as randomly setting the startWhen and or announceWhen variables. Only called once.

start

Called when the tick is equal to the startWhen variable.

Allows you to start before announcing or vice versa. Only called once. Ensure no sleep is called. Use INVOKE_ASYNC to call procs which do.

tick

Called on or after the tick counter is equal to startWhen.

You can include code related to your event or add your own time stamped events. Called more than once. Ensure no sleep is called. Use INVOKE_ASYNC to call procs which do.