Add Api.getClassExtended

This commit is contained in:
Van
2025-08-30 13:06:23 +00:00
parent 94be603317
commit 8a54d3c48f

View File

@@ -30,6 +30,17 @@ local allowedDomains = {
Ui = true Ui = true
} }
--- Inherits a child class from a parent class
---@param ParentClass table
---@param ChildClass table?
---@return table
Api.getClassExtended = function(ParentClass, ChildClass)
local ChildClass = setmetatable(ChildClass or {}, { __index = ParentClass })
return ChildClass
end
--- Adds a mod to the global space under specified domain structure --- Adds a mod to the global space under specified domain structure
---@param mod Mod The mod table containing functionality to expose ---@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")