Advertisement
Guest User

Picker Extended underground belt fix

a guest
Jul 15th, 2021
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. -- API build_from_cursor to no do flip logic
  2. if selected.ghost_type == 'underground-belt' then
  3. if selected.belt_to_ground_type == 'output' then
  4. direction = (direction + 4) % 8
  5. end
  6. local name = selected.ghost_name
  7. local belt_type = selected.belt_to_ground_type
  8.  
  9. player.build_from_cursor {position = position, direction = direction}
  10. local ent = player.surface.find_entity(name, position)
  11. if ent then
  12. if ent.belt_to_ground_type ~= belt_type then
  13. ent.rotate()
  14. end
  15. end
  16. elseif selected.ghost_type == 'pipe-to-ground' then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement