Add annotation to Domains

This commit is contained in:
Van
2025-08-30 12:45:46 +00:00
parent 3cf1757278
commit e53303a4fa

View File

@@ -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)