mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 13:52:31 +01:00
Take Item from Cable Plate Stack on Place (#345)
(when not in Creative) and Change drop to recipe.
This commit is contained in:
parent
d2fb249d94
commit
39bfb76cfb
@ -182,7 +182,7 @@ function technic.register_cable(tier, size)
|
|||||||
tiles = {"technic_"..ltier.."_cable.png"},
|
tiles = {"technic_"..ltier.."_cable.png"},
|
||||||
groups = table.copy(groups),
|
groups = table.copy(groups),
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
drop = "technic:"..ltier.."_cable",
|
drop = "technic:"..ltier.."_cable_plate_1",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -210,6 +210,10 @@ function technic.register_cable(tier, size)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
minetest.set_node(pointed_thing.above, {name = "technic:"..ltier.."_cable_plate_"..num})
|
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
|
end
|
||||||
else
|
else
|
||||||
def.groups.not_in_creative_inventory = 1
|
def.groups.not_in_creative_inventory = 1
|
||||||
@ -227,6 +231,13 @@ function technic.register_cable(tier, size)
|
|||||||
{"", "", c},
|
{"", "", c},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = c,
|
||||||
|
recipe = {
|
||||||
|
{"technic:"..ltier.."_cable_plate_1"},
|
||||||
|
}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user