Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- API build_from_cursor to no do flip logic
- if selected.ghost_type == 'underground-belt' then
- if selected.belt_to_ground_type == 'output' then
- direction = (direction + 4) % 8
- end
- local name = selected.ghost_name
- local belt_type = selected.belt_to_ground_type
- player.build_from_cursor {position = position, direction = direction}
- local ent = player.surface.find_entity(name, position)
- if ent then
- if ent.belt_to_ground_type ~= belt_type then
- ent.rotate()
- end
- end
- elseif selected.ghost_type == 'pipe-to-ground' then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement