Skip to content

Commit

Permalink
fix on_build event entities
Browse files Browse the repository at this point in the history
  • Loading branch information
przemo1232 committed Oct 25, 2024
1 parent d36029a commit 70ab108
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/beacons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ local function beacon_check(reciver)
end

Beacons.events.on_built = function(event)
local entity = event.created_entity or event.entity
local entity = event.entity
if not entity.valid then return end
if entity.type == "beacon" then
if not our_beacons[entity.name] then return end
Expand Down
2 changes: 1 addition & 1 deletion scripts/tailings-pond.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ local function scorch_earth(pond)
end

Pond.events.on_built = function(event)
local entity = event.entity or event.created_entity
local entity = event.entity
if not entity.valid or entity.name ~= "tailings-pond" then return end
entity.direction = defines.direction.north
local pond = {
Expand Down

0 comments on commit 70ab108

Please sign in to comment.