diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index dbae8b2..6bc22e0 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 1.1.2 +Date: 2022-12-8 + Changes: + - Fixed a crash on newly generated worlds +--------------------------------------------------------------------------------------------------- Version: 1.1.1 Date: 2022-12-8 Changes: diff --git a/cybersyn/info.json b/cybersyn/info.json index ee16679..7570e63 100644 --- a/cybersyn/info.json +++ b/cybersyn/info.json @@ -1,6 +1,6 @@ { "name": "cybersyn", - "version": "1.1.1", + "version": "1.1.2", "title": "Project Cybersyn", "author": "Mami", "factorio_version": "1.1", diff --git a/cybersyn/scripts/global.lua b/cybersyn/scripts/global.lua index fb85e85..a9be46c 100644 --- a/cybersyn/scripts/global.lua +++ b/cybersyn/scripts/global.lua @@ -142,6 +142,8 @@ function init_global() global.layouts = {} global.layout_train_count = {} global.layout_top_id = 1 + global.refuelers = {} + global.to_refuelers = {} IS_SE_PRESENT = remote.interfaces["space-exploration"] ~= nil if IS_SE_PRESENT then diff --git a/cybersyn/scripts/migrations.lua b/cybersyn/scripts/migrations.lua index e7362a4..1d09167 100644 --- a/cybersyn/scripts/migrations.lua +++ b/cybersyn/scripts/migrations.lua @@ -95,6 +95,14 @@ local migrations_table = { end end end, + ["1.1.2"] = function() + ---@type MapData + local map_data = global + map_data.tick_state = STATE_INIT + map_data.tick_data = {} + map_data.refuelers = map_data.refuelers or {} + map_data.to_refuelers = map_data.to_refuelers or {} + end, } --STATUS_R_TO_D = 5