Generalize check for cable below battery box

This commit is contained in:
Thomas--S 2017-04-13 22:36:52 +02:00
parent 06abe11dd0
commit fc2f6d8976

View File

@ -136,8 +136,7 @@ function technic.register_battery_box(data)
local below = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}) local below = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if below.name ~= "technic:"..ltier.."_cable" if not technic.is_tier_cable(below.name, tier) then
and not string.find(below.name, "technic:"..ltier.."_cable_plate") then
meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier)) meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier))
return return
end end