Puts an actor in the queue.
time before its first turn. Spawning a monster with a small random delay stops a room full of them from acting in lockstep.
higher-priority actors resolve first when scheduled at the same time.
whoever acts next, without removing them; time advances to their turn
Pushes a specific actor's next turn back, independent of whose turn it currently is - a stun or slow effect landing on someone other than the current actor, for instance.
time added to that actor's next scheduled turn
Charges the current actor for what it did, and hands the turn on.
time the action took at speed 1; divided by the actor's speed. A cost of 0
is a free action: the actor keeps its place at now but still goes behind any other
actor already tied with it, since its sequence number is refreshed like any other spend.
the time at which an actor next acts, for a debug view or an interface
Captures the queue as plain data, identifying each actor by whatever id the caller assigns it - the scheduler holds actor references, not ids, so it cannot invent one itself.
StaticrestoreRebuilds a scheduler from a snapshot taken by toJSON, restoring now and the
sequence counter so that ties among actors added afterwards resolve exactly as they
would have if the scheduler had never been serialised.
resolves a snapshot id back to the live actor object it names
the current time; advances to each actor's turn as it comes up