Skip to content

Module: Main

Andre Issa edited this page Sep 12, 2021 · 20 revisions

Members accessible via the ModUtil table

This module relates to operations that rely on being performed after "Content/Scripts/Main.lua" finishes.

Mod.Data *table Special proxy for the ModData global table as a save-safety preserving interface
Mod.Register modName(string) ~ parent(nil|table) mod(Mod)
Creates a new table mod with metatable ModUtil.Metatables.Mod, and assigns it to the field [modName] in the parent (or global) table, and associates the path to the table in ModUtil.Identifiers
Entangled.ModData value(table) proxy(*table)
Returns a proxy for the value such that any operations on the proxy preserve the save-safety (in Hades) of the value table
Mod.Data mod(Mod) proxy(*table)
Retrieves a proxy for the saved data table (value in the ModData global table) corresponding to the mod (creates the data table (and ModData) if it doesn't yet exist) via ModUtil.Entangled.ModData
LoadOnce func((args)->())
Enlists func to be called once on the next OnAnyLoad trigger
CancelLoadOnce func((args)->())
Cancels the enlistment of func by ModUtil.LoadOnce
Clone this wiki locally