View Source Kalevala.Event.Movement.Voting (kalevala v0.1.0)
A voting event tracks the state of a character wishing to change rooms
If movement is refused, adjust aborted
to be true to abort the event
Link to this section Summary
Functions
Generate an abort event after voting has occurred
Generate a commit event after voting has occurred
Link to this section Types
@type t() :: %Kalevala.Event.Movement.Voting{ aborted: term(), character: term(), exit_name: term(), from: term(), reason: term(), to: term() }
An event to allow for rooms to abort or commit the character moving.
Each room has a chance to reject movement
state
is an enum, one of the following atoms::request
,:commit
, or:abort
character
is the character performing the actionto
is the room the character is going towardsfrom
is the room the character is going away fromexit_name
is the name of the exit_name that the player is usingreason
is an atom such as:no_exit
for why the movement is aborted
Link to this section Functions
Generate an abort event after voting has occurred
Generate a commit event after voting has occurred