mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-08 22:08:13 -06:00
1.2.5 Experimental (#22)
* prepared for 1.2.2 * updated todo * fixed bad code * made wagon control spread out items * updated changelog * implemented disabled inactivity condition * added depot settings * added a bunch of settings * fixed a crash from network each * started adding network each to depots * finished adding network each to depots * improved defaults * added capacity priority * fixed se bugs * updated changelog * flipped sign of outputs * fixed migrations * added support for cargo at depots * fixed crash * improved allow cargo in depots * fixed changelog * fixed migration * finished testing new features * added more map settings * updated readme * updated locale * updated readme * updated readme * bugfixes * updated version * added migration * fixed crash * 1.2.4 * 1.2.5 bugfix * fixed migration version
This commit is contained in:
@@ -6,7 +6,7 @@ Behold one of the most feature-rich and performant train logistics network mods
|
|||||||
|
|
||||||
## Quick Start Guide
|
## Quick Start Guide
|
||||||
|
|
||||||
Copy the contents of [Project Cybersyn Official Example Blueprints](https://raw.githubusercontent.com/mamoniot/project-cybersyn/main/cybersyn_blueprints.txt) and paste them into the import blueprint text box to see examples of how to create a functional network. I highly recommend taking a look at these; the blueprint book showcases both the basics of the mod and highly advanced designs you can create.
|
Copy the contents of [Project Cybersyn Official Example Blueprints](https://raw.githubusercontent.com/mamoniot/project-cybersyn/main/cybersyn_blueprints.txt) and paste them into the import string text box to see examples of how to create a functional network. I highly recommend taking a look at these; the blueprint book showcases both the basics of the mod and highly advanced designs you can create.
|
||||||
|
|
||||||
Within Project Cybersyn, you can think of requester stations as requester chests, provider stations as passive provider chests, depots as roboports and trains as the logistics bots. There is a direct correspondence between the Cybersyn train network and Factorio's robot logistics network.
|
Within Project Cybersyn, you can think of requester stations as requester chests, provider stations as passive provider chests, depots as roboports and trains as the logistics bots. There is a direct correspondence between the Cybersyn train network and Factorio's robot logistics network.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 1.2.5
|
||||||
|
Date: 2022-12-30
|
||||||
|
Bugfixes:
|
||||||
|
- Fixed a bug with migrating depots of old worlds
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 1.2.4
|
||||||
|
Date: 2022-12-29
|
||||||
|
Bugfixes:
|
||||||
|
- Fixed crash when changing combinator modes
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 1.2.3
|
||||||
|
Date: 2022-12-29
|
||||||
|
Bugfixes:
|
||||||
|
- Fixed a bug where new stations weren't receiving network ids
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 1.2.2
|
Version: 1.2.2
|
||||||
Date: 2022-12-29
|
Date: 2022-12-29
|
||||||
Features:
|
Features:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cybersyn",
|
"name": "cybersyn",
|
||||||
"version": "1.2.2",
|
"version": "1.2.5",
|
||||||
"title": "Project Cybersyn",
|
"title": "Project Cybersyn",
|
||||||
"author": "Mami",
|
"author": "Mami",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
|
|||||||
@@ -503,6 +503,9 @@ local function tick_poll_station(map_data, mod_settings)
|
|||||||
station_id = map_data.active_station_ids[tick_data.i]
|
station_id = map_data.active_station_ids[tick_data.i]
|
||||||
station = map_data.stations[station_id]
|
station = map_data.stations[station_id]
|
||||||
if station then
|
if station then
|
||||||
|
if station_id == 70487 then
|
||||||
|
local i = 0
|
||||||
|
end
|
||||||
--NOTE: polling trains_limit here is expensive and not strictly necessary but using it to early out saves more ups
|
--NOTE: polling trains_limit here is expensive and not strictly necessary but using it to early out saves more ups
|
||||||
if station.network_name and station.deliveries_total < station.entity_stop.trains_limit then
|
if station.network_name and station.deliveries_total < station.entity_stop.trains_limit then
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -139,6 +139,10 @@ local function on_station_built(map_data, stop, comb1, comb2)
|
|||||||
local id = stop.unit_number--[[@as uint]]
|
local id = stop.unit_number--[[@as uint]]
|
||||||
map_data.stations[id] = station
|
map_data.stations[id] = station
|
||||||
map_data.warmup_station_ids[#map_data.warmup_station_ids + 1] = id
|
map_data.warmup_station_ids[#map_data.warmup_station_ids + 1] = id
|
||||||
|
if not map_data.queue_station_update then
|
||||||
|
map_data.queue_station_update = {}
|
||||||
|
end
|
||||||
|
map_data.queue_station_update[id] = true
|
||||||
|
|
||||||
update_stop_if_auto(map_data, station, true)
|
update_stop_if_auto(map_data, station, true)
|
||||||
interface_raise_station_created(id)
|
interface_raise_station_created(id)
|
||||||
@@ -371,7 +375,7 @@ function combinator_update(map_data, comb, reset_display)
|
|||||||
if stop then
|
if stop then
|
||||||
id = stop.unit_number--[[@as uint]]
|
id = stop.unit_number--[[@as uint]]
|
||||||
station = map_data.stations[id]
|
station = map_data.stations[id]
|
||||||
if station.entity_comb1 ~= comb then
|
if station and station.entity_comb1 ~= comb then
|
||||||
station = nil
|
station = nil
|
||||||
end
|
end
|
||||||
if should_reset and station then
|
if should_reset and station then
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ local migrations_table = {
|
|||||||
local bits_old = params_old.second_constant or 0
|
local bits_old = params_old.second_constant or 0
|
||||||
|
|
||||||
bits = bit32.replace(bits, 1, SETTING_ENABLE_INACTIVE)--[[@as int]]
|
bits = bit32.replace(bits, 1, SETTING_ENABLE_INACTIVE)--[[@as int]]
|
||||||
bits = bit32.replace(bits, 1, SETTING_ENABLE_INACTIVE)--[[@as int]]
|
bits = bit32.replace(bits, 1, SETTING_USE_ANY_DEPOT)--[[@as int]]
|
||||||
bits_old = bit32.replace(bits_old, 1, SETTING_USE_ANY_DEPOT)--[[@as int]]
|
bits_old = bit32.replace(bits_old, 1, SETTING_ENABLE_INACTIVE)--[[@as int]]
|
||||||
bits_old = bit32.replace(bits_old, 1, SETTING_USE_ANY_DEPOT)--[[@as int]]
|
bits_old = bit32.replace(bits_old, 1, SETTING_USE_ANY_DEPOT)--[[@as int]]
|
||||||
params.second_constant = bits
|
params.second_constant = bits
|
||||||
params_old.second_constant = bits_old
|
params_old.second_constant = bits_old
|
||||||
@@ -223,7 +223,40 @@ local migrations_table = {
|
|||||||
train.se_depot_surface_i = nil
|
train.se_depot_surface_i = nil
|
||||||
train.parked_at_depot_id = nil
|
train.parked_at_depot_id = nil
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
|
["1.2.3"] = function()
|
||||||
|
---@type MapData
|
||||||
|
local map_data = global
|
||||||
|
for _, station in pairs(map_data.stations) do
|
||||||
|
set_station_from_comb(station)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
["1.2.5"] = function()
|
||||||
|
---@type MapData
|
||||||
|
local map_data = global
|
||||||
|
local setting = settings.global["cybersyn-invert-sign"]
|
||||||
|
setting.value = true
|
||||||
|
settings.global["cybersyn-invert-sign"] = setting
|
||||||
|
|
||||||
|
for id, comb in pairs(map_data.to_comb) do
|
||||||
|
local control = get_comb_control(comb)
|
||||||
|
local params = control.parameters
|
||||||
|
local params_old = map_data.to_comb_params[id]
|
||||||
|
local bits = params.second_constant or 0
|
||||||
|
local bits_old = params_old.second_constant or 0
|
||||||
|
|
||||||
|
bits = bit32.replace(bits, 1, SETTING_USE_ANY_DEPOT)--[[@as int]]
|
||||||
|
bits_old = bit32.replace(bits_old, 1, SETTING_USE_ANY_DEPOT)--[[@as int]]
|
||||||
|
params.second_constant = bits
|
||||||
|
params_old.second_constant = bits_old
|
||||||
|
|
||||||
|
control.parameters = params
|
||||||
|
map_data.to_comb_params[id] = params_old
|
||||||
|
end
|
||||||
|
for train_id, train in pairs(map_data.trains) do
|
||||||
|
train.use_any_depot = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
--STATUS_R_TO_D = 5
|
--STATUS_R_TO_D = 5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user