diff options
author | Thomas--S <Thomas--S@users.noreply.github.com> | 2017-04-13 22:36:52 +0200 |
---|---|---|
committer | Thomas--S <Thomas--S@users.noreply.github.com> | 2017-04-13 22:36:52 +0200 |
commit | fc2f6d897680e1da4e5adf6f3345e142db83a3ca (patch) | |
tree | fe8aae1e5ec178dd17eeb7756f36bcfbfd5d556a | |
parent | 06abe11dd0800dd646e2092a7302ead99a23d9bc (diff) |
Generalize check for cable below battery box
-rw-r--r-- | technic/machines/register/battery_box.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua index e26ee09..c04875b 100644 --- a/technic/machines/register/battery_box.lua +++ b/technic/machines/register/battery_box.lua @@ -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 meta = minetest.get_meta(pos) - if below.name ~= "technic:"..ltier.."_cable" - and not string.find(below.name, "technic:"..ltier.."_cable_plate") then + if not technic.is_tier_cable(below.name, tier) then meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier)) return end |