mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-07 22:08:04 -06:00
1.2.8 (#28)
Version: 1.2.8
Date: 2022-1-5
Features:
- Improved placeholder cybernetic combinator art
- Added a wagon control setting to bar unfiltered slots in adjacent cargo wagons
- Added a setting and keybind for toggling on or off the central planner
Changes:
- Sped up the rate at which copy-paste by blueprint will be noticed
Bugfixes:
- Fixed a bug with combinators sometimes failing to connect with train stops
- Fixed wagon control combinators outputting wagon contents after inserters have already taken out items
- Fixed a rare crash on world migration
Scripting:
- Added missing return values to some interface functions
- Migrated to non-deprecated flib modules
This commit is contained in:
@@ -185,13 +185,15 @@ local migrations_table = {
|
||||
for train_id, train in pairs(map_data.trains) do
|
||||
train.depot_id = train.parked_at_depot_id
|
||||
if not train.depot_id then
|
||||
local e = get_any_train_entity(train.entity)
|
||||
local stops = e.force.get_train_stops({name = train.depot_name, surface = e.surface})
|
||||
for stop in rnext_consume, stops do
|
||||
local new_depot_id = stop.unit_number
|
||||
if map_data.depots[new_depot_id] then
|
||||
train.depot_id = new_depot_id--[[@as uint]]
|
||||
break
|
||||
if train.entity.valid then
|
||||
local e = get_any_train_entity(train.entity)
|
||||
local stops = e.force.get_train_stops({name = train.depot_name, surface = e.surface})
|
||||
for stop in rnext_consume, stops do
|
||||
local new_depot_id = stop.unit_number
|
||||
if map_data.depots[new_depot_id] then
|
||||
train.depot_id = new_depot_id--[[@as uint]]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -200,7 +202,9 @@ local migrations_table = {
|
||||
end
|
||||
if not train.depot_id then
|
||||
train.entity.manual_mode = true
|
||||
send_alert_depot_of_train_broken(map_data, train.entity)
|
||||
if train.entity.valid then
|
||||
send_alert_depot_of_train_broken(map_data, train.entity)
|
||||
end
|
||||
local layout_id = train.layout_id
|
||||
local count = global.layout_train_count[layout_id]
|
||||
if count <= 1 then
|
||||
|
||||
Reference in New Issue
Block a user