From 0f7810e53895f5742ab577559584539e6533a0dc Mon Sep 17 00:00:00 2001
From: auouymous <5005204+auouymous@users.noreply.github.com>
Date: Sat, 06 Feb 2021 12:41:09 +0100
Subject: [PATCH] Public/private mode for self-contained injector (#567)

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

diff --git a/technic_chests/iron_chest.lua b/technic_chests/iron_chest.lua
index eb016c6..a1945bc 100644
--- a/technic_chests/iron_chest.lua
+++ b/technic_chests/iron_chest.lua
@@ -1,32 +1,42 @@
+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 = {
-		{'default:steel_ingot','default:steel_ingot','default:steel_ingot'},
-		{'default:steel_ingot','default:chest','default:steel_ingot'},
-		{'default:steel_ingot','default:steel_ingot','default:steel_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 = {
-		{'default:steel_ingot','default:steel_ingot','default:steel_ingot'},
-		{'default:steel_ingot','default:chest_locked','default:steel_ingot'},
-		{'default:steel_ingot','default:steel_ingot','default:steel_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 = {
-		{'default:steel_ingot'},
-		{'technic:iron_chest'},
+		'basic_materials:padlock',
+		'technic:iron_chest',
 	}
 })
 
 technic.chests:register("Iron", {
 	width = 9,
+	height = 5,
+	sort = true,
+	autosort = false,
 	infotext = false,
 	color = false,
 	locked = false,
@@ -34,6 +44,9 @@
 
 technic.chests:register("Iron", {
 	width = 9,
+	height = 5,
+	sort = true,
+	autosort = false,
 	infotext = false,
 	color = false,
 	locked = true,

--
Gitblit v1.8.0