When players drag a belt backwards (e.g. the belt is pointing right but the player is dragging left) and it makes an underground belt, the "belt_to_ground_type" property is reversed on the underground belts in the "created_entity" in the "on_built_entity" event. In the example of dragging left, the right one is reported as an input while the left one is reported as an output. You can recreate this by running this script and dragging a belt backwards through an obstacle:
Code: Select all
/c script.on_event(defines.events.on_built_entity,
function(event)
if event.created_entity.type == "underground-belt" then
game.print("pos = " ..serpent.line(event.created_entity.position) .. ", belt_to_ground_type = " .. event.created_entity.belt_to_ground_type)
end
end
)