diff --git a/PHI-CL/changelog.txt b/PHI-CL/changelog.txt index 6567757..27b7369 100644 --- a/PHI-CL/changelog.txt +++ b/PHI-CL/changelog.txt @@ -3,7 +3,7 @@ Version: 3.0.125 Date: 2025-08-17 Changes: - - [GM] Fixed an issue that it will crash on existing game, as of no init of code. + - [GM] Changes on the init and the calculation period. --------------------------------------------------------------------------------------------------- Version: 3.0.124 diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index fe4deba..bf3ed8c 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -200,19 +200,24 @@ script.on_configuration_changed(function() end end - storage.phi_cl = { - cargo_landing_pad_storage = {}, - combinator = { - research_set_combinator_count = 0, - research_queue = {}, - research_queue_set = {}, - research_progress = 0 - } - } + if storage.phi_cl then + if not storage.phi_cl.cargo_landing_pad_storage then + storage.phi_cl.cargo_landing_pad_storage = {} + end + + if not storage.phi_cl.combinator then + storage.phi_cl.combinator = { + research_set_combinator_count = 0, + research_queue = {}, + research_queue_set = {}, + research_progress = 0 + } + end + end end) if settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP' then - script.on_nth_tick(3600, function(_) + script.on_nth_tick(1800, function(_) -- local ec = game.surfaces[1].find_entities_filtered{type='cargo-landing-pad'} local ec_count = #ec