Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. /c
  2. local surface = game.player.surface
  3.  
  4. for c in surface.get_chunks() do
  5. for key, entity in pairs( surface.find_entities_filtered( { area = { { c.x * 32, c.y * 32 }, { c.x * 32 + 32, c.y * 32 + 32 } } } ) ) do
  6. if entity.name == "deadlock-loader-5" then
  7. local X = entity.position.x
  8. local Y = entity.position.y
  9. entity.destroy()
  10. surface.create_entity( { name = "rapid-transport-belt-mk2-loader", position = { X, Y }, force = game.player.force } )
  11. end
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement