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

Foundation for FrameworkZ. More...

Public Member Functions

void AddAllHookHandlers (hookName)
 Add a new hook handler to the list for all categories.
 
void AddHookHandler (hookName, category)
 Add a new hook handler to the list.
 
void ExecuteAllHooks (hookName,...)
 Execute all of the hooks.
 
void ExecuteFrameworkHooks (hookName,...)
 Execute the framework hooks.
 
void ExecuteGamemodeHooks (hookName,...)
 Execute the gamemode hooks.
 
void ExecuteGenericHooks (hookName,...)
 Execute generic hooks.
 
void ExecuteHook (hookName, category,...)
 Execute hooks.
 
void ExecuteModuleHooks (hookName,...)
 Execute module hooks.
 
void ExecutePluginHooks (hookName,...)
 Execute plugin hooks.
 
void GetModule (moduleName)
 
table GetModuleMetaObject (moduleName)
 Get the meta object stored on a module. Not every module will have a meta object. This is a very specific use case and is used for getting instantiable objects such as PLAYER objects or CHARACTER objects.
 
string GetVersion ()
 Get the version of the FrameworkZ Framework.
 
void InitializeClient ()
 
table New ()
 Create a new instance of the FrameworkZ Framework.
 
table NewModule (moduleObject, moduleName)
 Create a new module for the FrameworkZ Framework.
 
void OnFillInventoryObjectContextMenu (playerID, context, items)
 
void OnGameStart ()
 Called when the game starts. Executes the OnGameStart function for all modules.
 
void OnMainMenuEnter ()
 
void OnOpenEscapeMenu ()
 
void OnServerStarted ()
 Called when the server starts. Executes the OnServerStarted function for all modules.
 
void PostInitializeClient ()
 
void PreInitializeClient ()
 
void RegisterFramework ()
 
void RegisterFrameworkHandler ()
 Register hook handlers for the framework.
 
void RegisterGamemodeHandler (gamemode)
 Register hook handlers for the gamemode.
 
void RegisterGenericHandler ()
 Register hook handlers for a plugin.
 
void RegisterHandler (hookName, handler, object, functionName, category)
 Register a handler for a hook.
 
void RegisterHandlers (objectOrHandlers, category)
 Register handlers for a specific category.
 
void RegisterModule (module)
 
void RegisterModuleHandler (module)
 Register hook handlers for a module.
 
void RegisterPluginHandler (plugin)
 Register hook handlers for a plugin.
 
void RemoveHookHandler (hookName, category)
 Remove a hook handler from the list.
 
void UnregisterFrameworkHandler ()
 Unregister hook handlers for the framework.
 
void UnregisterGamemodeHandler (gamemode)
 Unregister hook handlers for the gamemode.
 
void UnregisterGenericHandler ()
 Unregister hook handlers for a plugin.
 
void UnregisterHandler (hookName, handler, object, functionName, category)
 Unregister a handler from a hook.
 
void UnregisterHandlers (objectOrHandlers, category)
 Unregister handlers for a specific category.
 
void UnregisterModuleHandler (module)
 Unregister hook handlers for a module.
 
void UnregisterPluginHandler (plugin)
 Unregister hook handlers for a plugin.
 

Detailed Description

Foundation for FrameworkZ.

Definition at line 69 of file 2000_Foundation.lua.

Member Function Documentation

◆ AddAllHookHandlers()

void AddAllHookHandlers ( hookName )

Add a new hook handler to the list for all categories.

Parameters
hookNamestring The name of the hook handler to add.

◆ AddHookHandler()

void AddHookHandler ( hookName ,
category  )

Add a new hook handler to the list.

Parameters
hookNamestring The name of the hook handler to add.
categorystring The category of the hook (framework, module, plugin, generic).

◆ ExecuteAllHooks()

void ExecuteAllHooks ( hookName ,
... )

Execute all of the hooks.

Parameters
hookNamestring The name of the hook.
...\vararg Additional arguments to pass to the hook functions.

◆ ExecuteFrameworkHooks()

void ExecuteFrameworkHooks ( hookName ,
... )

Execute the framework hooks.

Parameters
hookNamestring The name of the hook.
...\vararg Additional arguments to pass to the hook functions.

◆ ExecuteGamemodeHooks()

void ExecuteGamemodeHooks ( hookName ,
... )

Execute the gamemode hooks.

Parameters
hookNamestring The name of the hook.
...\vararg Additional arguments to pass to the hook functions.

◆ ExecuteGenericHooks()

void ExecuteGenericHooks ( hookName ,
... )

Execute generic hooks.

Parameters
hookNamestring The name of the hook.
...\vararg Additional arguments to pass to the hook functions.

◆ ExecuteHook()

void ExecuteHook ( hookName ,
category ,
... )

Execute hooks.

Parameters
hookNamestring The name of the hook.
categorystring The category of the hook (framework, module, plugin, generic).
...\vararg Additional arguments to pass to the hook functions.

◆ ExecuteModuleHooks()

void ExecuteModuleHooks ( hookName ,
... )

Execute module hooks.

Parameters
hookNamestring The name of the hook.
...\vararg Additional arguments to pass to the hook functions.

◆ ExecutePluginHooks()

void ExecutePluginHooks ( hookName ,
... )

Execute plugin hooks.

Parameters
hookNamestring The name of the hook.
...\vararg Additional arguments to pass to the hook functions.

◆ GetModule()

void GetModule ( moduleName )

◆ GetModuleMetaObject()

table GetModuleMetaObject ( moduleName )

Get the meta object stored on a module. Not every module will have a meta object. This is a very specific use case and is used for getting instantiable objects such as PLAYER objects or CHARACTER objects.

Parameters
moduleNamestring The name of the module.
Returns
table The meta object stored on the module or nil if nothing was found.

◆ GetVersion()

string GetVersion ( )

Get the version of the FrameworkZ Framework.

Returns
string The version of the FrameworkZ Framework.

◆ InitializeClient()

void InitializeClient ( )

◆ New()

table New ( )

Create a new instance of the FrameworkZ Framework.

Returns
table The new instance of the FrameworkZ Framework.

◆ NewModule()

table NewModule ( moduleObject ,
moduleName  )

Create a new module for the FrameworkZ Framework.

Parameters
MODULE_TABLEtable The table to use as the module.
moduleNamestring The name of the module.
Returns
table The new module.

◆ OnFillInventoryObjectContextMenu()

void OnFillInventoryObjectContextMenu ( playerID ,
context ,
items  )

◆ OnGameStart()

void OnGameStart ( )

Called when the game starts. Executes the OnGameStart function for all modules.

◆ OnMainMenuEnter()

void OnMainMenuEnter ( )

◆ OnOpenEscapeMenu()

void OnOpenEscapeMenu ( )

◆ OnServerStarted()

void OnServerStarted ( )

Called when the server starts. Executes the OnServerStarted function for all modules.

◆ PostInitializeClient()

void PostInitializeClient ( )

◆ PreInitializeClient()

void PreInitializeClient ( )

◆ RegisterFramework()

void RegisterFramework ( )

◆ RegisterFrameworkHandler()

void RegisterFrameworkHandler ( )

Register hook handlers for the framework.

Parameters
frameworktable The framework table containing the functions.

◆ RegisterGamemodeHandler()

void RegisterGamemodeHandler ( gamemode )

Register hook handlers for the gamemode.

Parameters
moduletable The module table containing the functions.

◆ RegisterGenericHandler()

void RegisterGenericHandler ( )

Register hook handlers for a plugin.

Parameters
plugintable The plugin table containing the functions.

◆ RegisterHandler()

void RegisterHandler ( hookName ,
handler ,
object ,
functionName ,
category  )

Register a handler for a hook.

Parameters
hookNamestring The name of the hook.
handlerfunction The function to call when the hook is executed.
objecttable (Optional) The object containing the function.
functionNamestring (Optional) The name of the function to call.
categorystring The category of the hook (framework, module, plugin, generic).

◆ RegisterHandlers()

void RegisterHandlers ( objectOrHandlers ,
category  )

Register handlers for a specific category.

Parameters
objecttable The object containing the functions.
categorystring The category of the hook (framework, module, plugin, generic).

◆ RegisterModule()

void RegisterModule ( module )

◆ RegisterModuleHandler()

void RegisterModuleHandler ( module )

Register hook handlers for a module.

Parameters
moduletable The module table containing the functions.

◆ RegisterPluginHandler()

void RegisterPluginHandler ( plugin )

Register hook handlers for a plugin.

Parameters
plugintable The plugin table containing the functions.

◆ RemoveHookHandler()

void RemoveHookHandler ( hookName ,
category  )

Remove a hook handler from the list.

Parameters
hookNamestring The name of the hook handler to remove.
categorystring The category of the hook (framework, module, plugin, generic).

◆ UnregisterFrameworkHandler()

void UnregisterFrameworkHandler ( )

Unregister hook handlers for the framework.

Parameters
frameworktable The framework table containing the functions.

◆ UnregisterGamemodeHandler()

void UnregisterGamemodeHandler ( gamemode )

Unregister hook handlers for the gamemode.

Parameters
moduletable The module table containing the functions.

◆ UnregisterGenericHandler()

void UnregisterGenericHandler ( )

Unregister hook handlers for a plugin.

Parameters
plugintable The plugin table containing the functions.

◆ UnregisterHandler()

void UnregisterHandler ( hookName ,
handler ,
object ,
functionName ,
category  )

Unregister a handler from a hook.

Parameters
hookNamestring The name of the hook.
handlerfunction The function to unregister.
objecttable (Optional) The object containing the function.
functionNamestring (Optional) The name of the function to unregister.
categorystring The category of the hook (framework, module, plugin, generic).

◆ UnregisterHandlers()

void UnregisterHandlers ( objectOrHandlers ,
category  )

Unregister handlers for a specific category.

Parameters
objecttable The object containing the functions.
categorystring The category of the hook (framework, module, plugin, generic).

◆ UnregisterModuleHandler()

void UnregisterModuleHandler ( module )

Unregister hook handlers for a module.

Parameters
moduletable The module table containing the functions.

◆ UnregisterPluginHandler()

void UnregisterPluginHandler ( plugin )

Unregister hook handlers for a plugin.

Parameters
plugintable The plugin table containing the functions.

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