From dfcf64c1d07f4006045af37b0b01dbfc82dbb1d1 Mon Sep 17 00:00:00 2001
From: SmallJoker <mk939@ymail.com>
Date: Sat, 26 Aug 2023 10:57:05 +0200
Subject: [PATCH] Chainsaw: new setting to disable safe cutting

---
 technic_chests/iron_chest.lua |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/technic_chests/iron_chest.lua b/technic_chests/iron_chest.lua
index a1f5c63..a1945bc 100644
--- a/technic_chests/iron_chest.lua
+++ b/technic_chests/iron_chest.lua
@@ -1,32 +1,40 @@
+local cast_iron_ingot
+if minetest.get_modpath("technic_worldgen") then
+	cast_iron_ingot = "technic:cast_iron_ingot"
+else
+	cast_iron_ingot = "default:steel_ingot"
+end
 
 minetest.register_craft({
 	output = 'technic:iron_chest 1',
 	recipe = {
-		{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
-		{'technic:cast_iron_ingot','default:chest','technic:cast_iron_ingot'},
-		{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
+		{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
+		{cast_iron_ingot,'default:chest',cast_iron_ingot},
+		{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
 	}
 })
 
 minetest.register_craft({
 	output = 'technic:iron_locked_chest 1',
 	recipe = {
-		{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
-		{'technic:cast_iron_ingot','default:chest_locked','technic:cast_iron_ingot'},
-		{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
+		{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
+		{cast_iron_ingot,'default:chest_locked',cast_iron_ingot},
+		{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
 	}
 })
 
 minetest.register_craft({
 	output = 'technic:iron_locked_chest 1',
+	type = "shapeless",
 	recipe = {
-		{'technic:wrought_iron_ingot'},
-		{'technic:iron_chest'},
+		'basic_materials:padlock',
+		'technic:iron_chest',
 	}
 })
 
 technic.chests:register("Iron", {
 	width = 9,
+	height = 5,
 	sort = true,
 	autosort = false,
 	infotext = false,
@@ -36,6 +44,7 @@
 
 technic.chests:register("Iron", {
 	width = 9,
+	height = 5,
 	sort = true,
 	autosort = false,
 	infotext = false,

--
Gitblit v1.8.0