From 4c2d734798e4a031dbc3b6c3d2fa8c196ca69fd2 Mon Sep 17 00:00:00 2001
From: RealBadAngel <mk@realbadangel.pl>
Date: Tue, 06 Nov 2012 23:45:42 +0100
Subject: [PATCH] Update battery_box_mv.lua

---
 iron_chest.lua |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/iron_chest.lua b/iron_chest.lua
index d6a4cc2..f0e0fcb 100644
--- a/iron_chest.lua
+++ b/iron_chest.lua
@@ -6,6 +6,16 @@
 		{'default:steel_ingot','default:steel_ingot','default:steel_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'},
+	}
+})
+
 minetest.register_craft({
 	output = 'technic:iron_locked_chest 1',
 	recipe = {
@@ -23,6 +33,8 @@
 	description = "Iron Locked Chest",
 	stack_max = 99,
 })
+
+minetest.register_alias("blabla", "technic:iron_chest")
 
 minetest.register_node("technic:iron_chest", {
 	description = "Iron Chest",
@@ -42,6 +54,15 @@
 		local inv = meta:get_inventory()
 		inv:set_size("main", 9*4)
 	end,
+
+	after_place_node = function(pos, placer)
+		ntop1 = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z})
+		ntop = minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z})
+                if ntop.name ~= "air" then
+                        minetest.node_dig(pos, ntop1, placer)
+		end
+	end,
+
 	can_dig = function(pos,player)
 		local meta = minetest.env:get_meta(pos);
 		local inv = meta:get_inventory()
@@ -149,3 +170,7 @@
 				" takes stuff from locked chest at "..minetest.pos_to_string(pos))
 	end,
 })
+
+function add_item (player)
+player:get_inventory():add_item("main", "blabla 1")
+end
\ No newline at end of file

--
Gitblit v1.8.0