CraftSystem (and other): Changing the approach to the crafting system. Adding crafting types, correcting calls to the crafting system
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
local Item, Node, TileSheet = Smc.requireItem(), Smc.requireNode(), Smc.requireTileSheet()
|
||||
|
||||
local PrimitiveCraftHandler = Smc.requireCraftSystemPrimitiveCraftHandler()
|
||||
local CraftSystem = Smc.requireCraftSystem()
|
||||
|
||||
local InventoryCraftHandler = CraftSystem:getPrimitiveCraftHandler('inside_player_inventory')
|
||||
|
||||
---@type Node.NodeDefinition
|
||||
local defaultLogDef = {
|
||||
@@ -253,7 +255,7 @@ local function registerWood(name, x, def)
|
||||
}
|
||||
})
|
||||
|
||||
PrimitiveCraftHandler:registerCraft('wood:'..name..'_planks', {
|
||||
InventoryCraftHandler:registerCraft('wood:'..name..'_planks', {
|
||||
recipe = {
|
||||
'wood:'..name..'_log'
|
||||
},
|
||||
@@ -261,7 +263,7 @@ local function registerWood(name, x, def)
|
||||
group = 'wood:planks_blocks',
|
||||
})
|
||||
|
||||
PrimitiveCraftHandler:registerCraft('wood:'..name..'_log_stripped', {
|
||||
InventoryCraftHandler:registerCraft('wood:'..name..'_log_stripped', {
|
||||
recipe = {
|
||||
'wood:'..name..'_log'
|
||||
},
|
||||
@@ -269,7 +271,7 @@ local function registerWood(name, x, def)
|
||||
group = 'wood:logs_stripped',
|
||||
})
|
||||
|
||||
PrimitiveCraftHandler:registerCraft('wood:'..name..'_bar', {
|
||||
InventoryCraftHandler:registerCraft('wood:'..name..'_bar', {
|
||||
recipe = {
|
||||
'wood:'..name..'_log'
|
||||
},
|
||||
@@ -277,7 +279,7 @@ local function registerWood(name, x, def)
|
||||
group = 'wood:bars',
|
||||
})
|
||||
|
||||
PrimitiveCraftHandler:registerCraft('wood:'..name..'_plank', {
|
||||
InventoryCraftHandler:registerCraft('wood:'..name..'_plank', {
|
||||
recipe = {
|
||||
'wood:'..name..'_bar'
|
||||
},
|
||||
@@ -285,7 +287,7 @@ local function registerWood(name, x, def)
|
||||
group = 'wood:planks',
|
||||
})
|
||||
|
||||
PrimitiveCraftHandler:registerCraft('wood:'..name..'_stick', {
|
||||
InventoryCraftHandler:registerCraft('wood:'..name..'_stick', {
|
||||
recipe = {
|
||||
'wood:'..name..'_bar'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user