Field of Game
game.entities
The kinds of entity: define a pack's own, amend the game's own, and read a kind of the game: a mob kind by either spelling (game.entities.cow, game.entities.Cow), a kind that is not a mob by its name (game.entities.arrow); nil where the game has none. It iterates every kind, including pack definitions: for name, kind in game.entities do.
game.entities: Entities & { [string]: (EntityKind | EntityDef)? }
Used in
game.entities.names { mob = true } -- {"pig", "sheep", "cow", ...}Game dataentity here: players are in `players`, never in `world.entities`. `game.entities.<kind>`Game data| Physics, gameplay hooks or persistence | `game.entities.define` and `world.spawn` | Gives a body behavior independent of its appearance. |Displayslocal car = game.entities.define {Displays`game.entities.<kind>`.Custom entitiesgame.entities.amend("pig", {Custom entitiesin `game.entities.define`, which answers `"take"` or `"ignore"`.Cancelling events