Skip to content

Commit

Permalink
Added SPECTATOR_FARM_ID dischargeable access check
Browse files Browse the repository at this point in the history
  • Loading branch information
scfmod committed Dec 18, 2023
1 parent 15b3f1a commit 84b5070
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/ConstructionDeliveryArea.lua
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ end
---@param farmId number
function ConstructionDeliveryArea:getIsFillAllowedFromFarm(farmId)
if g_construction:getRequireFarmAccess() then
return self.placeable:getOwnerFarmId() == farmId
local placeableFarmId = self.placeable:getOwnerFarmId()

return placeableFarmId == FarmManager.SPECTATOR_FARM_ID or placeableFarmId == farmId
end

return true
Expand Down

0 comments on commit 84b5070

Please sign in to comment.