summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas--S <Thomas--S@users.noreply.github.com>2017-04-12 21:13:39 +0200
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-12 15:13:39 -0400
commit39bfb76cfbf73e021775596bd7c03a653d9d80de (patch)
tree26d98958474453335585515dbab7f23daf9b9b71
parentd2fb249d94b1d17f170fc95dc035f973844ba10e (diff)
Take Item from Cable Plate Stack on Place (#345)
(when not in Creative) and Change drop to recipe.
-rw-r--r--technic/machines/register/cables.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/technic/machines/register/cables.lua b/technic/machines/register/cables.lua
index b0e2e06..d65c399 100644
--- a/technic/machines/register/cables.lua
+++ b/technic/machines/register/cables.lua
@@ -182,7 +182,7 @@ function technic.register_cable(tier, size)
tiles = {"technic_"..ltier.."_cable.png"},
groups = table.copy(groups),
sounds = default.node_sound_wood_defaults(),
- drop = "technic:"..ltier.."_cable",
+ drop = "technic:"..ltier.."_cable_plate_1",
paramtype = "light",
sunlight_propagates = true,
drawtype = "nodebox",
@@ -210,6 +210,10 @@ function technic.register_cable(tier, size)
end
end
minetest.set_node(pointed_thing.above, {name = "technic:"..ltier.."_cable_plate_"..num})
+ if not (creative and creative.is_enabled_for(placer)) then
+ itemstack:take_item()
+ end
+ return itemstack
end
else
def.groups.not_in_creative_inventory = 1
@@ -227,6 +231,13 @@ function technic.register_cable(tier, size)
{"", "", c},
}
})
+
+ minetest.register_craft({
+ output = c,
+ recipe = {
+ {"technic:"..ltier.."_cable_plate_1"},
+ }
+ })
end