Initialize a singleton Game instance for a specific view using socket data retrieved from the server.
The named view which is active for this game instance.
An object of all the World data vended by the server when the client first connects
The ID of the currently active client session retrieved from the browser cookie
The open web-socket which should be used to transact game-state data
The named view which is currently active.
The object of world data passed from the server.
The client session id which is currently active.
A reference to the open Socket.io connection.
The id of the active World user, if any.
The game World which is currently active.
The System which is used to power this game World.
A Map of active Modules which are currently eligible to be enabled in this World. The subset of Modules which are designated as active are currently enabled.
A mapping of CompendiumCollection instances, one per Compendium pack.
The singleton DocumentIndex instance.
The UUID redirects tree.
A mapping of WorldCollection instances, one per primary Document type.
The collection of Actor documents which exists in the World.
The collection of Cards documents which exists in the World.
The collection of Combat documents which exists in the World.
The collection of Cards documents which exists in the World.
The collection of Item documents which exists in the World.
The collection of JournalEntry documents which exists in the World.
The collection of Macro documents which exists in the World.
The collection of ChatMessage documents which exists in the World.
The collection of Playlist documents which exists in the World.
The collection of Scene documents which exists in the World.
The collection of RollTable documents which exists in the World.
The collection of User documents which exists in the World.
The Release data for this version of Foundry
Whether the Game is running in debug mode
A flag for whether texture assets for the game canvas are currently loading
The user role permissions setting.
A flag for whether the Game has successfully reached the "ready" hook
The singleton compendium art manager.
The singleton Audio Helper.
The singleton game Canvas.
The singleton Clipboard Helper.
Localization support.
The singleton ClientIssues manager.
The singleton Gamepad Manager.
The singleton Keyboard Manager.
Client keybindings which are used to configure application behavior
The singleton Mouse Manager.
The singleton New User Experience manager.
Client settings which are used to configure application behavior.
A singleton GameTime instance which manages the progression of time within the game world.
The singleton TooltipManager.
The singleton Tours collection.
The singleton Video Helper.
A singleton web Worker manager.
Static
Private
#socketAn array of buffered events which are received by the socket before the game is ready to use that data. Buffered events are replayed in the order they are received until the buffer is empty.
A registry of document sub-types and their respective data models.
A registry of document types supported by the active world.
Returns the current version of the Release, usable for comparisons using isNewerVersion
Is the current session user authenticated as an application administrator?
A state variable which tracks whether the game session is currently paused
A convenient reference to the currently active canvas tool
Initialize the Compendium packs which are present within this Game Create a Collection which maps each Compendium pack using it's collection ID
Toggle the pause state of the game
Trigger the pauseGame
Hook when the paused state changes
The desired pause state; true for paused, false for un-paused
Optional
push: boolean = falsePush the pause state change to other connected clients? Requires an GM user.
The new paused state
Open Character sheet for current token or controlled actor
The ActorSheet which was toggled, or null if the User has no character
Private
#updatePrivate
#parseParse the configured UUID redirects and arrange them as a foundry.utils.StringTree.
Private
#handlePrivate
Handle a hot reload request from the server
The hot reload data
Private
#hotHandle hot reloading of CSS files
The hot reload data
Private
#hotHandle hot reloading of HTML files, such as Handlebars templates
The hot reload data
Private
#hotHandle hot reloading of JSON files, such as language files
The hot reload data
Private
_onPrivate
_onPrivate
_onPrivate
_onPrivate
_onPrivate
_onPrivate
_onPrivate
_onPrivate
_onPrivate
_initializePrivate
_initializePrivate
_initializeStatic
createStatic
connectStatic
getStatic
getStatic
getStatic
Private
#bufferStatic
Private
#applyStatic
Private
_handle
The core Game instance which encapsulates the data, settings, and states relevant for managing the game experience. The singleton instance of the Game class is available as the global variable game.