diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index 6041ef75..670de340 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -1,4 +1,14 @@ --------------------------------------------------------------------------------------------------- +Version: 1.2.16 +Date: 2023-5-14 + Bugfixes: + - Fixed Nullius recipe being broken again + - Reran manager migrations to fix some people's worlds that used the beta branch + Translation: + - Chinese language update contributed by luaotix + - Russian language correction contributed by Eldrinn-Elantey + - Korean language contributed by manmen-mi +--------------------------------------------------------------------------------------------------- Version: 1.2.15 Date: 2023-4-30 Bugfixes: @@ -12,7 +22,6 @@ Date: 2023-4-30 Features: - Added opt-in WIP trains, inventory, and station manager gui (highly experimental, use at your own risk) Changes: - - Improved the recipe derivation logic for the cybernetic combinator, in all modpacks it should now consistently be about as difficult to craft as an arthmetic combinator. Vanilla recipe is unchanged, but several overhaul mods will receive new recipes. - The automatic allow list now consistently looks 3 tiles down the first curved rail it finds along a station for inserters or pumps. Previously it would conditionally look only 1 tile down. This should lead to more intuitive allow list behaviour for stations with trains that park slightly on curved rails. Bugfixes: - Provider override thresholds now correctly override the required train capacity as well; fix contributed by shopt diff --git a/cybersyn/data-final-fixes.lua b/cybersyn/data-final-fixes.lua index 940be260..c16f8535 100644 --- a/cybersyn/data-final-fixes.lua +++ b/cybersyn/data-final-fixes.lua @@ -1,8 +1,8 @@ flib = require("__flib__.table") require('scripts.constants') ---Credit to modo-lv for submitting the following code if mods["nullius"] then + -- Credit to modo-lv for submitting the following code -- Place combinator in the same subgroup as the regular train stop data.raw["recipe"][COMBINATOR_NAME].subgroup = data.raw["train-stop"]["train-stop"].subgroup data.raw["item"][COMBINATOR_NAME].subgroup = data.raw["item"]["train-stop"].subgroup @@ -10,21 +10,3 @@ if mods["nullius"] then -- Place combinator in the same place on the research tree as LTN table.insert(data.raw.technology["nullius-broadcasting-1"].prerequisites, "cybersyn-train-network") end - --- Reset the combinator recipe back to arithmetic combinator recipe in case a mod has changed it -local recipe = flib.deep_copy(data.raw["recipe"]["arithmetic-combinator"].ingredients) -for k, _ in pairs(recipe) do - local mult = 2 - for i, _ in pairs(recipe) do - if recipe[k][i] == "copper-cable" then - mult = 4 - break; - end - end - for i, _ in pairs(recipe) do - if type(recipe[k][i]) == "number" then - recipe[k][i] = mult*recipe[k][i] - end - end -end -data.raw["recipe"][COMBINATOR_NAME].ingredients = recipe diff --git a/cybersyn/info.json b/cybersyn/info.json index 06ebe558..739a874d 100644 --- a/cybersyn/info.json +++ b/cybersyn/info.json @@ -1,6 +1,6 @@ { "name": "cybersyn", - "version": "1.2.15", + "version": "1.2.16", "title": "Project Cybersyn", "author": "Mami", "factorio_version": "1.1", diff --git a/cybersyn/scripts/factorio-api.lua b/cybersyn/scripts/factorio-api.lua index a34109e7..cf78fc0b 100644 --- a/cybersyn/scripts/factorio-api.lua +++ b/cybersyn/scripts/factorio-api.lua @@ -48,7 +48,7 @@ function se_get_space_elevator_name(cache, surface) end if not entity or not entity.valid then - --Chaching failed, default to expensive lookup + --Caching failed, default to expensive lookup entity = surface.find_entities_filtered({ name = SE_ELEVATOR_STOP_PROTO_NAME, type = "train-stop", diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index ce6b93aa..978893d8 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -849,7 +849,7 @@ local function register_tick() script.on_nth_tick(nil) --edge case catch to register both main and manager tick if they're scheduled to run on the same ticks if mod_settings.manager_enabled and mod_settings.manager_ups == mod_settings.tps and mod_settings.tps > DELTA then - local nth_tick = ceil(60/mod_settings.tps) + local nth_tick = ceil(60/mod_settings.tps)--[[@as uint]] script.on_nth_tick(nth_tick, function() tick(global, mod_settings) manager.tick(global) diff --git a/cybersyn/scripts/migrations.lua b/cybersyn/scripts/migrations.lua index 51d406a9..108688b4 100644 --- a/cybersyn/scripts/migrations.lua +++ b/cybersyn/scripts/migrations.lua @@ -300,15 +300,6 @@ local migrations_table = { ---@type MapData local map_data = global - if not global.manager then - global.manager = { - players = {}, - } - for i, v in pairs(game.players) do - manager_gui.on_player_created({player_index = i}) - end - end - for _, e in pairs(map_data.refuelers) do if e.network_flag then e.network_mask = e.network_flag @@ -328,6 +319,18 @@ local migrations_table = { end end end, + ["1.2.16"] = function() + ---@type MapData + local map_data = global + if not map_data.manager then + map_data.manager = { + players = {}, + } + for i, v in pairs(game.players) do + manager_gui.on_player_created({player_index = i}) + end + end + end } --STATUS_R_TO_D = 5 ---@param data ConfigurationChangedData