bug fixes

master
Joachim Stolberg 2019-05-21 23:41:17 +02:00
parent 1ffd1e4bb6
commit 97bb86afa0
3 changed files with 6 additions and 3 deletions

View File

@ -29,7 +29,10 @@ local Cable = tubelib2.Tube:new({
primary_node_names = {"techage:electric_cableS", "techage:electric_cableA"},
secondary_node_names = {},
after_place_tube = function(pos, param2, tube_type, num_tubes)
minetest.swap_node(pos, {name = "techage:electric_cable"..tube_type, param2 = param2 % 32})
-- Don't replace "hidden" cable
if M(pos):get_string("techage_hidden_nodename") == "" then
minetest.swap_node(pos, {name = "techage:electric_cable"..tube_type, param2 = param2 % 32})
end
M(pos):set_int("tl2_param2", param2)
end,
})

View File

@ -161,7 +161,7 @@ function techage.power.power_cut(pos, dir, cable, cut)
if param2 ~= 0 then
meta:set_int("cable_cut", param2)
meta:set_int("tl2_param2", 0)
cable:after_dig_node(npos)
cable:after_dig_tube(npos, {param2 = param2})
end
else
local param2 = meta:get_int("cable_cut")

View File

@ -120,7 +120,7 @@ minetest.register_node("techage:powerswitch_on", {
})
minetest.register_craft({
output = "techage:powerswitch_on 2",
output = "techage:powerswitch 2",
recipe = {
{"", "", ""},
{"dye:yellow", "dye:red", "dye:yellow"},