Skip to content

Commit

Permalink
Hotfix for crashy migration introduced in 3.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Nov 10, 2024
1 parent b24ceb4 commit 5d70c7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 3.0.20
Date: 2024-11-9
Changes:
- Hotfix for crashy migration introduced in 3.0.19
---------------------------------------------------------------------------------------------------
Version: 3.0.19
Date: 2024-11-9
Changes:
Expand Down
6 changes: 5 additions & 1 deletion migrations/biofluid-in-space-age.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ require "scripts.biofluid.biofluid"
storage.network_positions = nil
storage.biofluid_undergrounds = nil

storage.biofluid_robots = storage.biofluid_robots or {}
storage.biofluid_requesters = storage.biofluid_requesters or {}
storage.biofluid_providers = storage.biofluid_providers or {}
storage.biofluid_bioports = storage.biofluid_bioports or {}
storage.biofluid_networks = storage.biofluid_networks or {}

for _, network_data in pairs(storage.biofluid_networks or {}) do
for _, network_data in pairs(storage.biofluid_networks) do
local providers = network_data.providers
for _, provider in pairs(providers or {}) do
if provider.valid then
Expand Down
2 changes: 1 addition & 1 deletion scripts/biofluid/biofluid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function Biofluid.built_pipe()
local allocated_fluids_from_providers = {}

for _, network in pairs(storage.biofluid_networks) do
for provider_unit_number, amount in pairs(network.allocated_fluids_from_providers) do
for provider_unit_number, amount in pairs(network.allocated_fluids_from_providers or {}) do
allocated_fluids_from_providers[provider_unit_number] = amount + (allocated_fluids_from_providers[provider_unit_number] or 0)
end
end
Expand Down

0 comments on commit 5d70c7f

Please sign in to comment.