-
Notifications
You must be signed in to change notification settings - Fork 2
Documentation
Andre Issa edited this page Sep 3, 2021
·
41 revisions
Types can be joined by | to indicate multiple suitable types
Base lua types:
- nil, boolean, number, string, thread, userdata
- table (with [KEYTYPES] and {VALUETYPES} if relevant)
- function (shown as type (ARGUMENTS)->(RETURNS))
Extra types defined for greater specificity:
- ~nil: anything that isn't nil
- *table: a table with a modified metatable
- Int: ...-2,-1,0,-1,2... (integers)
- +Int: 1,2,3... (positive integers)
- Array: tables with only Natural keys and all such keys between 1 and #table inclusive are not nil
- Path: String keys joined by single periods to mimic the shape of nested table fields
- Mod: A table registered as a mod, produced by ModUtil.Mod.Register
- File: file userdata (used by the io package)
- Button, Obstacle, Screen, Screen.Component: Hades specific objects
Members accessible via the ModUtil table.
Mods.Data | *table | Map from path to mod object for registered mods |
Mods.Inverse | *table | Map from mod object to path for registered mods |
Identifiers.Data | *table | Map from object to associated name (name is part of the object's string representation) |
Identifiers.Inverse | *table | Map from name to associated object (name is part of the object's string representation) |
Node.Data | *table | Collection of traversal nodes for use as special keys in index arrays |
Node.Inverse | *table | Lookup table of traversal nodes to distinguish them from regular keys |
Proxy |
data (table), meta (nil|table)
|
proxy (*table)
|
Raw |
obj (table)
|
raw (*table)
|
Callable |
obj (table|((...)->(...)))
|
callable (boolean)
|
Callable.Get |
obj (table|((...)->(...)))
|
parent (nil|table), func (nil|(self ,...)->(...))
|
Callable.Set |
obj (table), func (nil|(self ,...)->(...))
|
parent (nil|*table), func (nil|(self ,...)->(...))
|
Callable.Map |
obj (table), func (nil|(self ,...)->(...))
|
parent (nil|*table), func (nil|(self ,...)->(...))
|
Callable.Func.Get |
obj (table|((...)->(...)))
|
func (nil|(self ,...)->(...))
|
Callable.Func.Set |
obj (table), func (nil|(self ,...)->(...))
|
func (nil|(self ,...)->(...))
|
Callable.Func.Map |
obj (table), func (nil|(self ,...)->(...))
|
func (nil|(self ,...)->(...))
|
Args.Map |
map ((in )->(out )), ...
|
... |
Args.Take |
n (+Int), ...
|
... |
Args.Drop |
n (+Int), ...
|
... |
Table.Map |
tbl (table), map ((in)->(out))
|
out (tbl)
|
Table.Mutate |
tbl (table), map ((in)->(out))
|
|
Table.Replace |
target (table), data (table)
|
|
Table.UnKeyed |
in (table)
|
keyed (boolean)
|
String.Join |
sep (string), ...(string)
|
out (string)
|
String.Chunk |
text (string), chunkSize (+Int), maxChunks (+Int)
|
chunks (Array{string})
|
ToString |
object
|
repr (string)
|
ToString.Address |
object (table|(...)->(...)|thread|userdata)
|
repr (string)
|
ToString.Static |
object (table|(...)->(...)|thread|userdata)
|
repr (string)
|
ToString.Value |
object
|
repr (string)
|
ToString.Key |
object
|
repr (string)
|
ToString.TableKeys |
object (table)
|
repr (string)
|
ToString.Shallow |
object
|
repr (string)
|
ToString.Deep |
object , seen (nil|table)
|
repr (string)
|
ToString.Deep.NoNamespaces |
object , seen (nil|table)
|
repr (string)
|
ToString.Deep.Namespaces |
object , seen (nil|table)
|
repr (string)
|
... | ||
Print.ToFile |
file (string|File), ...
|
|
Print.Debug | ... | |
Print.Traceback |
level (+Int|nil)
|
|
Print.DebugInfo |
level (+Int|nil)
|
|
Print.Namespaces |
level (+Int|nil)
|
|
Print.Variables |
level (+Int|nil)
|
|
DebugCall |
func ((...)->(...)), ...
|
... |
Array.Slice |
state (Array), start (Int|nil), stop (Int|nil), step (Int|nil)
|
slice (Array)
|
Array.Copy |
data (Array)
|
copy (Array)
|
Array.Join | ...(Array) |
out (Array)
|
Table.Copy |
data (table)
|
copy (table)
|
Table.Copy.Deep |
data (table)
|
copy (table)
|
Table.Clear |
data (table)
|
data (table)
|
Table.Transpose |
data (table)
|
flipped (table)
|
Table.Flip |
data (table)
|
data (table)
|
Table.NilMerge |
in (table), nil (table)
|
in (table)
|
Table.Merge |
in (table), set (table)
|
in (table)
|
IndexArray.Get |
base (table), index (table)
|
result
|
IndexArray.Set |
base (table), index (Array), value
|
success (boolean)
|
IndexArray.Map |
base (table), index (Array)
|
success (boolean)
|
Path.Join | ...(Path) |
path (Path)
|
Path.Map |
path (Path)
|
success (boolean)
|
Path.IndexArray |
path (Path)
|
index (Array)
|
Path.Get |
path (Path)
|
result
|
Path.Set |
path (Path), value
|
success (boolean)
|
Path.Map |
path (Path)
|
success (boolean)
|
StackLevel |
level (nil|+Int)
|
info (nil|*table)
|
StackLevels |
level (nil|+Int)
|
info (nil|*table)
|
UpValues |
func ((...)->(...)|+Int|nil)
|
ups (*table)
|
UpValues.Ids |
func ((...)->(...)|+Int|nil)
|
ups (*table)
|
UpValues.Values |
func ((...)->(...)|+Int|nil)
|
ups (*table)
|
UpValues.Names |
func ((...)->(...)|+Int|nil)
|
ups (*table)
|
UpValues.Stacked |
func ((...)->(...)|+Int|nil)
|
ups (*table)
|
Locals |
level (+Int|nil)
|
locals (*table)
|
Locals.Values |
level (+Int|nil)
|
locals (*table)
|
Locals.Names |
level (+Int|nil)
|
locals (*table)
|
Locals.Stacked |
level (+Int|nil)
|
locals (*table)
|
Entangled.Union | ...(table) |
union (*table)
|
Entangled.Union.Add |
union (*table), ...(table)
|
|
Entangled.Union.Sub |
union (*table), ...(table)
|
|
Entangled.Map |
pair (table{*table})
|
|
Entangled.Map.Unique |
pair (table{*table})
|
|
Context |
prep ((info )->(...)), post ((info )->(...))
|
context (*table)
|
Context.Data |
data (table), context (()->())
|
|
Context.Meta |
object , context (()->())
|
|
Context.Call |
func ((...)->(...)), context (()->())
|
|
Context.Wrap |
func ((...)->(...)), context (()->()), mod (Mod)
|
|
Context.Wrap.Static |
func ((...)->(...)), context (()->()), mod (Mod)
|
|
Node.New |
parent (table), key (~nil)
|
tbl (table)
|
Node.Data.Meta.New |
object
|
meta (table)
|
Node.Data.Meta.Get |
object
|
meta (table)
|
Node.Data.Meta.Set |
object
|
success (boolean)
|
Node.Data.Call.New |
object (table|(...)->(...))
|
parent (nil|table), func (nil|(self ,...)->(...))
|
Node.Data.Call.Get |
object (table|(...)->(...))
|
parent (nil|table), func (nil|(self ,...)->(...))
|
Node.Data.Call.Set |
object (table|(...)->(...)), func (nil|(self ,...)->(...))
|
success (boolean)
|
Node.Data.UpValues.New |
func ((...)->(...)
|
ups (*table)
|
Node.Data.UpValues.Get |
func ((...)->(...)
|
ups (*table)
|
Node.Data.UpValues.Set | ||
Decorate |
base , deco ((base )->(post )), mod (Mod)
|
post
|
Wrap |
base , wrap ((base ,...)->(...)), mod (Mod)
|
func ((...)->(...))
|
Decorate.Pop |
object
|
base
|
Decorate.Refresh |
base
|
refbase
|
Override |
base , value , mod (Mod)
|
value
|
Restore |
base
|
refbase
|
Overriden |
object
|
value
|
Original |
object
|
value
|
ReferFunction |
get ((...)->(obj )), ...
|
func ((...)->(...))
|
ReferTable |
get ((...)->(obj )), ...
|
table (*table)
|