FrameworkZ 4.4.2
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
FrameworkZ::Entities Class Reference

Entities module for FrameworkZ. Defines and interacts with ENTITY object. More...

Public Member Functions

void EmitSound (worldObject, sound)
 
void GetData (worldObject, index)
 
table GetEntityByID (entityID)
 Get an entity by their ID.
 
string Initialize (data, name)
 Initialize an entity.
 
boolean IsEntity (object)
 Checks if an object is an entity (needs optimization from cached entities).
 
void LoadGridsquare (square)
 
table New (name)
 Create a new entity object.
 
void OnGameStart ()
 
void OnObjectAboutToBeRemoved (object)
 
void OnObjectAdded (object)
 Called when an object is added to the world. Adds the entity to the object's mod data.
 
void OnPreFillWorldObjectContextMenu (player, context, worldObjects, test)
 
void SetData (worldObject, index, value)
 

Data Fields

FrameworkZ Entities __index
 
FrameworkZ Entities
 
FrameworkZ Entities List
 

Detailed Description

Entities module for FrameworkZ. Defines and interacts with ENTITY object.

Definition at line 13 of file Entities.lua.

Member Function Documentation

◆ EmitSound()

void EmitSound ( worldObject ,
sound  )

◆ GetData()

void GetData ( worldObject ,
index  )

◆ GetEntityByID()

table GetEntityByID ( entityID )

Get an entity by their ID.

Parameters
entityIDstring The entity's ID.
Returns
table Entity Object

◆ Initialize()

string Initialize ( data ,
name  )

Initialize an entity.

Parameters
datatable The entity's object data
namestring The entity's name (i.e. ID)
Returns
string Entity ID

◆ IsEntity()

boolean IsEntity ( object )

Checks if an object is an entity (needs optimization from cached entities).

Parameters
objecttable The object to check.
Returns
boolean Whether or not the object is an entity and its entity ID if it is an entity.
integer The entity ID if the object is an entity.

◆ LoadGridsquare()

void LoadGridsquare ( square )

◆ New()

table New ( name )

Create a new entity object.

Parameters
namestring The entity's name (i.e. ID).
squaretable The square the entity is on.
Returns
table The entity's object table.

◆ OnGameStart()

void OnGameStart ( )

◆ OnObjectAboutToBeRemoved()

void OnObjectAboutToBeRemoved ( object )

◆ OnObjectAdded()

void OnObjectAdded ( object )

Called when an object is added to the world. Adds the entity to the object's mod data.

Parameters
objecttable The object that was added to the world.

◆ OnPreFillWorldObjectContextMenu()

void OnPreFillWorldObjectContextMenu ( player ,
context ,
worldObjects ,
test  )

◆ SetData()

void SetData ( worldObject ,
index ,
value  )

Field Documentation

◆ __index

Definition at line 15 of file Entities.lua.

◆ Entities

Definition at line 19 of file Entities.lua.

◆ List

Definition at line 17 of file Entities.lua.


The documentation for this class was generated from the following file: