1
0
鏡像自 https://github.com/minetest-mods/technic.git 已同步 2025-09-18 13:40:35 +02:00

Fix visible cable connection for irregular items

The switching station and supply converter only semantically connect to
cables in particular directions.  Make them visually connect only in
the matching directions.  This is done by special-casing in the cable
update logic.  If more irregular items arise in the future, or the
existing items start to need facedir logic, this should be generalised
into something like the connect_sides system for pneumatic tubes.
此提交包含在:
Zefram
2014-08-17 13:40:15 +01:00
父節點 35b10adb40
當前提交 d0001a20c9
共有 2 個檔案被更改,包括 6 行新增4 行删除

查看文件

@@ -130,7 +130,11 @@ end
function technic.cables_should_connect(pos1, pos2, tier)
local name = minetest.get_node(pos2).name
if technic.is_tier_cable(name, tier) then
if name == "technic:switching_station" then
return pos2.y == pos1.y + 1 and "machine" or false
elseif name == "technic:supply_converter" then
return math.abs(pos2.y - pos1.y) == 1 and "machine" or false
elseif technic.is_tier_cable(name, tier) then
return "cable"
elseif technic.machines[tier][name] then
return "machine"