Files
Aurora.3/code/datums/state_machine/transition.dm
Matt Atlas 57067892d8 Ports the weather system from Nebula. (#18706)
* part 1

* compiles?

* IT WORKS

* vis contents

* fixes

* umbrelloid

* umbrella 2

* dsasdd

* stuff

* lmao

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
2024-03-24 14:05:00 +00:00

17 lines
648 B
Plaintext

// Used to connect `/singleton/state`s together so the FSM knows what state to switch to, and on what conditions.
// On a directed graph, these would be the arrows connecting the nodes representing states.
/singleton/state_transition
var/list/from = null
var/singleton/state/target = null
// Called by one or more state decls acting as nodes in a directed graph.
/singleton/state_transition/Initialize()
. = ..()
LAZYINITLIST(from)
if(ispath(target))
target = GET_SINGLETON(target)
// Tells the FSM if it should or should not be allowed to transfer to the target state.
/singleton/state_transition/proc/is_open(datum/holder)
return FALSE