mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-10 08:08:14 -06:00
Experimental 1.2.2 (#21)
---------------------------------------------------------------------------------------------------
Version: 1.2.2
Date: 2022-12-29
Features:
- Added a station combinator setting to enable or disable the inactivity condition in a train's orders, disabled by default (but not in <=1.2.1 worlds)
- Added a depot combinator setting to enable depot bypass, enabled by default
- Added a depot combinator setting to force trains to park at the same depot, enabled by default
- Added network "each" for depots
- Added a map setting to modify the default locked slots per cargo wagon value
- Added a map setting to modify the default priority value
- Added a map setting to allow trains with cargo at depots, disabled by default
Changes:
- Inverted the sign of combinator outputs, a map setting has been added to maintain backwards compatibility with <=1.2.1 worlds
- Overhauled the wagon control combinator algorithm to spread items out between cargo wagons
- Trains with cargo held in the depot now check if they have been emptied and reset when they have
- Cargo capacity is now prioritized over distance when choosing trains
- Increased the default request threshold to 2000
- Improved English localization
Bugfixes:
- Fixed a bug where trains with cargo sometimes weren't getting held at depots
- Fixed a crash caused by changing a station combinator to the "each" network during a bad tick
- Fixed a crash when changing a refueler away from network each
- Multiple rare bugs and crashes relating to wagon control combinators are fixed
- Fixed a bug with refueler direct orders not being applied after moving through a space elevator
- Fixed a bug where filtered slots sometimes weren't being removed
---------------------------------------------------------------------------------------------------
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
---@field public stations {[uint]: Station}
|
||||
---@field public active_station_ids uint[]
|
||||
---@field public warmup_station_ids uint[]
|
||||
---@field public queue_station_update {[uint]: true?}?
|
||||
---@field public depots {[uint]: Depot}
|
||||
---@field public refuelers {[uint]: Refueler}
|
||||
---@field public trains {[uint]: Train}
|
||||
@@ -29,6 +30,7 @@
|
||||
---@field public is_p true?
|
||||
---@field public is_r true?
|
||||
---@field public is_stack true?
|
||||
---@field public enable_inactive true?
|
||||
---@field public allows_all_trains true?
|
||||
---@field public deliveries_total int
|
||||
---@field public last_delivery_tick int
|
||||
@@ -50,7 +52,7 @@
|
||||
---@class Depot
|
||||
---@field public entity_stop LuaEntity
|
||||
---@field public entity_comb LuaEntity
|
||||
---@field public available_train_id uint?--train_id
|
||||
---@field public available_train_id uint?--train_id, only present when a train is parked here
|
||||
|
||||
---@class Refueler
|
||||
---@field public entity_stop LuaEntity
|
||||
@@ -76,13 +78,13 @@
|
||||
---@field public last_manifest_tick int
|
||||
---@field public has_filtered_wagon true?
|
||||
---@field public is_available true?
|
||||
---@field public parked_at_depot_id uint?
|
||||
---@field public depot_name string
|
||||
---@field public depot_id uint
|
||||
---@field public use_any_depot true?
|
||||
---@field public disable_bypass true?
|
||||
---@field public network_name string? --can only be nil when the train is parked at a depot
|
||||
---@field public network_flag int
|
||||
---@field public priority int
|
||||
---@field public refueler_id uint?
|
||||
---@field public se_depot_surface_i uint --se only
|
||||
---@field public se_is_being_teleported true? --se only
|
||||
---@field public se_awaiting_removal any? --se only
|
||||
---@field public se_awaiting_rename any? --se only
|
||||
@@ -105,17 +107,21 @@
|
||||
---@field public tps double
|
||||
---@field public update_rate int
|
||||
---@field public r_threshold int
|
||||
---@field public priority int
|
||||
---@field public locked_slots int
|
||||
---@field public network_flag int
|
||||
---@field public warmup_time double
|
||||
---@field public stuck_train_time double
|
||||
---@field public fuel_threshold double
|
||||
---@field public depot_bypass_enabled boolean
|
||||
---@field public invert_sign boolean
|
||||
---@field public allow_cargo_in_depot boolean
|
||||
---@field public missing_train_alert_enabled boolean --interface setting
|
||||
---@field public stuck_train_alert_enabled boolean --interface setting
|
||||
---@field public react_to_nonempty_train_in_depot boolean --interface setting
|
||||
---@field public react_to_train_at_incorrect_station boolean --interface setting
|
||||
---@field public react_to_train_early_to_depot boolean --interface setting
|
||||
|
||||
--if this is uncommented it means there are migrations to write
|
||||
|
||||
---@alias cybersyn.global MapData
|
||||
---@type CybersynModSettings
|
||||
mod_settings = {}
|
||||
@@ -150,9 +156,3 @@ function init_global()
|
||||
|
||||
IS_SE_PRESENT = remote.interfaces["space-exploration"] ~= nil
|
||||
end
|
||||
|
||||
---@param v string
|
||||
---@param h string?
|
||||
function once(v, h)
|
||||
return not h and v or nil--[[@as string|nil]]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user