Skip to content

Instantly share code, notes, and snippets.

@morsk
Created November 13, 2024 23:27
Show Gist options
  • Save morsk/93c80028ef2a856126fa806678032e80 to your computer and use it in GitHub Desktop.
Save morsk/93c80028ef2a856126fa806678032e80 to your computer and use it in GitHub Desktop.
Find Factorio Vehicles
/sc --[[ vehicle finder ]]
local found_vehicles = game.player.surface.find_entities_filtered{type = {"car", "spider-vehicle"}, force=game.player.force}
for _, vehicle in pairs(found_vehicles) do
game.player.print({"", vehicle.localised_name, ": ", vehicle.gps_tag})
end
if table_size(found_vehicles) == 0 then
game.player.print({"gui.nothing-found"})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment