Add annotation to Domains
This commit is contained in:
@@ -1,9 +1,24 @@
|
|||||||
Api = {}
|
Api = {}
|
||||||
|
|
||||||
|
---@alias Domen table<string,Mod|Subdomen> Global table for accessing public classes provided by mods.
|
||||||
|
---@alias Subdomen table<string,Mod>
|
||||||
|
|
||||||
|
---@type Domen
|
||||||
Core = {}
|
Core = {}
|
||||||
|
|
||||||
|
---@type Domen
|
||||||
Environment = {}
|
Environment = {}
|
||||||
|
|
||||||
|
---@type Domen
|
||||||
Game = {}
|
Game = {}
|
||||||
|
|
||||||
|
---@type Subdomen
|
||||||
Game.Items = {}
|
Game.Items = {}
|
||||||
|
|
||||||
|
---@type Subdomen
|
||||||
Game.Mobs = {}
|
Game.Mobs = {}
|
||||||
|
|
||||||
|
---@type Subdomen
|
||||||
Game.Structures = {}
|
Game.Structures = {}
|
||||||
Ui = {}
|
Ui = {}
|
||||||
|
|
||||||
@@ -16,7 +31,7 @@ local allowedDomains = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
--- Adds a mod to the global space under specified domain structure
|
--- Adds a mod to the global space under specified domain structure
|
||||||
---@param mod table The mod table containing functionality to expose -- TODO: !!!Describe a Mod class to EmmyLua!!!
|
---@param mod Mod The mod table containing functionality to expose
|
||||||
---@param location string Dot-separated path within domain structure (e.g. "Items.Log")
|
---@param location string Dot-separated path within domain structure (e.g. "Items.Log")
|
||||||
---@param force boolean? Whether to overwrite the target location.
|
---@param force boolean? Whether to overwrite the target location.
|
||||||
Api.addModToGlobalSpace = function(mod, location, force)
|
Api.addModToGlobalSpace = function(mod, location, force)
|
||||||
|
|||||||
Reference in New Issue
Block a user