Merge pull request #92 from mamoniot/dev

Dev
This commit is contained in:
Monica Moniot
2023-05-14 13:19:12 -04:00
committed by GitHub
6 changed files with 26 additions and 32 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +1,6 @@
{
"name": "cybersyn",
"version": "1.2.15",
"version": "1.2.16",
"title": "Project Cybersyn",
"author": "Mami",
"factorio_version": "1.1",

View File

@@ -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",

View File

@@ -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)

View File

@@ -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