Skip to content

Commit

Permalink
fix crash with farm buildings & deconstruction planner
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Aug 10, 2023
1 parent 074d7be commit 10fb2a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Date: ?
- fixed that whenever your ulric transformation expired it would reset all connected caravan schedules
- added fallback icon sprites for vessel to ground
- removed caravan map tags. this results in a 15x UPS improvement. for some reason that API call is extremely laggy
- fix crash with farm buildings & deconstruction planner
TURD:
- auog path 2 is now unethical
- fish path 2 now can improve your hydrolysate production
Expand Down
3 changes: 2 additions & 1 deletion scripts/farming/farming.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ Farming.events[121] = function()
local first_index_checked_this_tick = global.next_farm_index
for i = 1, 60 do
local farm = global.enabled_farm_buildings[global.next_farm_index]
if not farm.valid then

if not farm or not farm.valid then
table.remove(global.enabled_farm_buildings, global.next_farm_index)
elseif farm.get_module_inventory().is_empty() then
Farming.disable_machine(farm)
Expand Down

0 comments on commit 10fb2a9

Please sign in to comment.