From 852987416d31574931d44583941d69f01aa7115f Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Fri, 24 Nov 2023 08:42:50 +0100 Subject: [PATCH] Add Tool Workshop craft --- compatibility.lua | 2 ++ machines/tool_workshop.lua | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/compatibility.lua b/compatibility.lua index 4dcd890..38d38e2 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -537,6 +537,7 @@ if industrialtest.mclAvailable then industrialtest.elementKeys.stoneWithGold="mcl_core:stone_with_gold" industrialtest.elementKeys.copperBlock="mcl_copper:block" industrialtest.elementKeys.stoneWithCopper="mcl_copper:stone_with_copper" + industrialtest.elementKeys.ironPickaxe="mcl_tools:pick_iron" industrialtest.elementKeys.lavaSource="mcl_core:lava_source" industrialtest.elementKeys.waterSource="mcl_core:water_source" @@ -755,6 +756,7 @@ elseif industrialtest.mtgAvailable then industrialtest.elementKeys.tinBlock="default:tinblock" industrialtest.elementKeys.stoneWithTin="default:stone_with_tin" industrialtest.elementKeys.bronzeBlock="default:bronzeblock" + industrialtest.elementKeys.ironPickaxe="default:pick_steel" industrialtest.elementKeys.lavaSource="default:lava_source" industrialtest.elementKeys.waterSource="default:water_source" else diff --git a/machines/tool_workshop.lua b/machines/tool_workshop.lua index 9bb2c81..844fb6d 100644 --- a/machines/tool_workshop.lua +++ b/machines/tool_workshop.lua @@ -169,6 +169,17 @@ industrialtest.internal.registerMachine({ paramtype2="facedir", legacy_facedir_simple=true }, + activeCustomKeys={ + tiles={ + "industrialtest_machine_block.png", + "industrialtest_machine_block.png", + "industrialtest_machine_block.png", + "industrialtest_machine_block.png", + "industrialtest_machine_block.png", + "industrialtest_machine_block.png^industrialtest_tool_workshop_front_active.png", + "industrialtest_machine_block.png" + }, + }, onConstruct=toolWorkshop.onConstruct, onTimer=toolWorkshop.onTimer, activeOnTimer=toolWorkshop.activeOnTimer, @@ -177,3 +188,12 @@ industrialtest.internal.registerMachine({ onMetadataInventoryPut=toolWorkshop.metadataChange, onMetadataInventoryMove=toolWorkshop.metadataChange }) +minetest.register_craft({ + type="shaped", + output="industrialtest:tool_workshop", + recipe={ + {industrialtest.elementKeys.copperIngot,industrialtest.elementKeys.ironPickaxe,industrialtest.elementKeys.copperIngot}, + {"","industrialtest:advanced_machine_block",""}, + {industrialtest.elementKeys.ironIngot,industrialtest.elementKeys.ironIngot,industrialtest.elementKeys.ironIngot} + } +})