Bugfix and new item
authorMaciej Kasatkin <mk@realbadangel.pl>
Mon, 29 Oct 2012 23:39:35 +0000 (00:39 +0100)
committerMaciej Kasatkin <mk@realbadangel.pl>
Mon, 29 Oct 2012 23:39:35 +0000 (00:39 +0100)
flashlight.lua
items.lua
textures/technic_mv_transformer.png [new file with mode: 0644]

index 11252468269e61c87754d9c1ff70bfc7e7f3fb25..674b5ace5031dc8263ccdd8cf09c9477a2e338b6 100644 (file)
@@ -144,6 +144,7 @@ minetest.register_node("technic:light_off", {
 })
 
 function check_for_flashlight (player)
+if player==nil then return false
 local inv = player:get_inventory()
 local hotbar=inv:get_list("main")
                for i=1,8,1 do
index 5f460f5705267b658fc3fbba512f191e84eee0a6..527fc6f6d7362f380b72de6a5747e366320f71ad 100644 (file)
--- a/items.lua
+++ b/items.lua
@@ -140,3 +140,18 @@ minetest.register_craft({
        }
 })
 
+minetest.register_craftitem( "technic:mv_transformer", {
+       description = "Medium Voltage Transformer",
+       inventory_image = "technic_mv_transformer.png",
+       on_place_on_ground = minetest.craftitem_place_item,
+})
+
+minetest.register_craft({
+       output = 'technic:mv_transformer',
+       recipe = {
+               {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+               {'technic:copper_coil', 'default:steel_ingot', 'technic:copper_coil'},
+               {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
+       }
+})
+
diff --git a/textures/technic_mv_transformer.png b/textures/technic_mv_transformer.png
new file mode 100644 (file)
index 0000000..7c4688e
Binary files /dev/null and b/textures/technic_mv_transformer.png differ