Skip to content

Commit

Permalink
Fix attempt to index field 'target' (a nil value)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quezler committed Dec 8, 2023
1 parent 6bc9e02 commit 31c218c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "se-interstellar-construction-requests-fulfillment",
"title": "Space Exploration - interstellar construction requests fulfillment",
"description": "Keeping building equipment stocked at every planet is tedious, just shoot it there from nauvis.",
"version": "1.0.2",
"version": "1.0.3",
"author": "Quezler",
"factorio_version": "1.1",
"dependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function Handler.shoot(struct)
end

function Handler.handle_construction_alert(alert)
if not alert.target then return end -- attempt to index field 'target' (a nil value)
if not alert.target.valid then return end -- ghost might have been removed or revived already
if alert.target.name ~= "entity-ghost" then return end -- can be "item-request-proxy" or "tile-ghost"

Expand Down

0 comments on commit 31c218c

Please sign in to comment.