90 lines
1.9 KiB
Lua
90 lines
1.9 KiB
Lua
-- Global methods for require classes.
|
|
|
|
---@return Item
|
|
function Smc.requireItem()
|
|
---@type Item
|
|
local class = Mod.getInfo('smc__core__item').require('Item')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return Node
|
|
function Smc.requireNode()
|
|
---@type Node
|
|
local class = Mod.getInfo('smc__core__node').require('Node')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return Tool
|
|
function Smc.requireTool()
|
|
---@type Tool
|
|
local class = Mod.getInfo('smc__core__tool').require('Tool')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return Plant
|
|
function Smc.requirePlant()
|
|
---@type Plant
|
|
local class = Mod.getInfo('smc__core__plant').require('Plant')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return ItemFactory
|
|
function Smc.requireItemFactory()
|
|
---@type ItemFactory
|
|
local class = Mod.getInfo('smc__core__item_factory').require('ItemFactory')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return TileSheet
|
|
function Smc.requireTileSheet()
|
|
---@type TileSheet
|
|
local class = Mod.getInfo('smc__core__tilesheet').require('TileSheet')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return BaseUI
|
|
function Smc.requireBaseUI()
|
|
---@type BaseUI
|
|
local class = Mod.getInfo('smc__core__base_ui').require('BaseUI')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return Formspec
|
|
function Smc.requireFormspec()
|
|
---@type Formspec
|
|
local class = Mod.getInfo('smc__core__formspec').require('Formspec')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return CraftSystem
|
|
function Smc.requireCraftSystem()
|
|
---@type CraftSystem
|
|
local class = Mod.getInfo('smc__core__craft_system').require('CraftSystem')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return CraftSystem.PrimitiveCraftHandler
|
|
function Smc.requireCraftSystemPrimitiveCraftHandler()
|
|
---@type CraftSystem.PrimitiveCraftHandler
|
|
local class = Mod.getInfo('smc__core__craft_system').require('CraftSystem.PrimitiveCraftHandler')
|
|
|
|
return class
|
|
end
|
|
|
|
---@return CraftSystem.ImmersiveCraftHandler
|
|
function Smc.requireCraftSystemImmersiveCraftHandler()
|
|
---@type CraftSystem.ImmersiveCraftHandler
|
|
local class = Mod.getInfo('smc__core__craft_system').require('CraftSystem.ImmersiveCraftHandler')
|
|
|
|
return class
|
|
end
|