new ActionStore()
Manages game action firing and listeners.
- Source:
Members
-
dayEnd :Array.<HungryGames~Action>
-
Fired after a day has ended. Does not fire if game has ended.
Type:
- Array.<HungryGames~Action>
- Default Value:
-
- ["","",""]
- Source:
-
dayPlayerAlive :Array.<HungryGames~MemberAction>
-
Fired for all players who end day alive.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
dayPlayerDead :Array.<HungryGames~MemberAction>
-
Fired for all players who end day dead.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
dayPlayerWounded :Array.<HungryGames~MemberAction>
-
Fired for all players who end day wounded.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
dayStart :Array.<HungryGames~Action>
-
Fired prior to the day starting.
Type:
- Array.<HungryGames~Action>
- Default Value:
-
- [""]
- Source:
-
eventInstant :Array.<HungryGames~Action>
-
Fired as the event message being sent.
Type:
- Array.<HungryGames~Action>
- Default Value:
-
- [""]
- Source:
-
eventPlayerAffected :Array.<HungryGames~MemberAction>
-
Fired during the event for all players.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerDeath :Array.<HungryGames~MemberAction>
-
Fired during the event if players get killed.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerGainWeapon :Array.<HungryGames~MemberAction>
-
Fired during the event if players gain weapons.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerHealed :Array.<HungryGames~MemberAction>
-
Fired during the event if players get healed.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerKilled :Array.<HungryGames~MemberAction>
-
Fired during the event if players kill another player.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerLoseWeapon :Array.<HungryGames~MemberAction>
-
Fired during the event if players lose weapons.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerRevive :Array.<HungryGames~MemberAction>
-
Fired during the event if players get revived.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerUnAffected :Array.<HungryGames~MemberAction>
-
Fired during the event if player state is not changed for a player.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerUseWeapon :Array.<HungryGames~MemberAction>
-
Fired during the event if players use their weapon.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
eventPlayerWound :Array.<HungryGames~MemberAction>
-
Fired during the event if players get wounded.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
gameAbort :Array.<HungryGames~Action>
-
Fired after the game has aborted.
Type:
- Array.<HungryGames~Action>
- Default Value:
-
- []
- Source:
-
gameEnd :Array.<HungryGames~Action>
-
Fired after the game has ended.
Type:
- Array.<HungryGames~Action>
- Default Value:
-
- ["","",""]
- Source:
-
gamePlayerAlive :Array.<HungryGames~MemberAction>
-
Fired for all player who end the game alive.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
gamePlayerDead :Array.<HungryGames~MemberAction>
-
Fired for all player who end the game dead.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
gamePlayerLose :Array.<HungryGames~MemberAction>
-
Fired for all player who lost the game.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
gamePlayerWin :Array.<HungryGames~MemberAction>
-
Fired for all player who won the game.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
gamePlayerWounded :Array.<HungryGames~MemberAction>
-
Fired for all player who end the game wounded.
Type:
- Array.<HungryGames~MemberAction>
- Default Value:
-
- []
- Source:
-
gameStart :Array.<HungryGames~Action>
-
Fired prior to the game starting.
Type:
- Array.<HungryGames~Action>
- Default Value:
-
- []
- Source:
-
serializable
-
Get a serializable version of this class instance. Strips all private variables, and all functions. Assumes all public variables are serializable if they aren't a function.
- Source:
Methods
-
<static> from(client, id, obj)
-
Convert a serialized action store back into the object.
Parameters:
Name Type Description client
Discord~Client Client reference for obtaining discord object references. id
string The Guild ID this action store is for. obj
object Parsed data from save file. - Source:
Returns:
Parsed object data. -
insert(name, action)
-
Insert an action for a trigger.
Parameters:
Name Type Description name
string The name of the trigger to insert the action. action
HungryGames~Action The action to insert. - Source:
Returns:
True if success, false if unable to find trigger by given name.- Type
- boolean
-
remove(name, id)
-
Remove an action from a trigger.
Parameters:
Name Type Description name
string The name of the trigger to remove from. id
string The id of the action to remove. - Source:
Returns:
The removed action, or null if unable to find action.- Type
- Action