mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-11 06:08:19 -06:00
prepared for 1.0.0
This commit is contained in:
4
TODO
4
TODO
@@ -1,12 +1,12 @@
|
|||||||
bugs:
|
bugs:
|
||||||
|
request threshold is being bypassed somehow
|
||||||
|
|
||||||
major:
|
major:
|
||||||
do hardcore testing
|
do hardcore testing
|
||||||
models & art
|
models & art
|
||||||
railloader compat
|
|
||||||
|
|
||||||
minor:
|
minor:
|
||||||
|
railloader compat
|
||||||
close gui when the combinator is destroyed
|
close gui when the combinator is destroyed
|
||||||
do not play close sound when a different gui is opened
|
do not play close sound when a different gui is opened
|
||||||
gui can desync if settings are changed outside of it while it is open
|
gui can desync if settings are changed outside of it while it is open
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
[mod-setting-name]
|
[mod-setting-name]
|
||||||
cybersyn-ticks-per-second=Central planning updates per second
|
cybersyn-ticks-per-second=Central planning updates per second
|
||||||
|
cybersyn-wait-time=Required inactivity duration (sec)
|
||||||
cybersyn-request-threshold=Default requester threshold
|
cybersyn-request-threshold=Default requester threshold
|
||||||
cybersyn-network-flag=Default network flags
|
cybersyn-network-flag=Default sub-network flags
|
||||||
cybersyn-warmup-time=Station warmup time (sec)
|
cybersyn-warmup-time=Station warmup time (sec)
|
||||||
cybersyn-stuck-train-time=Stuck train timeout (sec)
|
cybersyn-stuck-train-time=Stuck train timeout (sec)
|
||||||
|
|
||||||
[mod-setting-description]
|
[mod-setting-description]
|
||||||
cybersyn-ticks-per-second=How many times per second the central planner should update the state of the network and schedule deliveries. Only one deliveries can be made per update. This value will be rounded up to a divisor of 60.
|
cybersyn-ticks-per-second=How many times per second the central planner should update the state of the network and schedule deliveries. Only one deliveries can be made per update. This value will be rounded up to a divisor of 60.
|
||||||
|
cybersyn-wait-time=How many seconds the duration of a train's inactivity order will be set to. Trains will be forced to wait in the station or depot until this amount of time has passed without the train receiving any kind of interaction. Non-zero values prevent inserters from getting stuck and prevent trains from leaving depots without refueling. Decimal values are allowed, they will be rounded up to a multiple of 1/60 (0.01667).
|
||||||
cybersyn-request-threshold=The default request threshold when a request threshold signal is not given to a station. When a station receives a negative item signal that surpasses its request threshold, so long as any station exists with a positive signal greater than the request threshold, a delivery of that item will be scheduled between the two stations.
|
cybersyn-request-threshold=The default request threshold when a request threshold signal is not given to a station. When a station receives a negative item signal that surpasses its request threshold, so long as any station exists with a positive signal greater than the request threshold, a delivery of that item will be scheduled between the two stations.
|
||||||
cybersyn-network-flag=The default set of networks a station will service when no network signal is given to a station. This integer is interpretted bit-wise to give 32 possible network flags to choose from.
|
cybersyn-network-flag=The default set of sub-networks a station will service when no network signal is given to a station. This integer is interpretted bit-wise to give 32 possible sub-network flags to choose from.
|
||||||
cybersyn-warmup-time=How many seconds a cybernetic combinator will wait before connecting to the Cybersyn network. This is a grace period to modify or correct the circuit network before trains start dispatching to a newly blueprinted station.
|
cybersyn-warmup-time=How many seconds a cybernetic combinator will wait before connecting to the Cybersyn network. This is a grace period to modify or correct the circuit network before trains start dispatching to a newly blueprinted station.
|
||||||
cybersyn-stuck-train-time=After this many seconds from a train's dispatch, an alert will be sent to let you know a train is probably stuck and has not completed its delivery. The player will likely have to debug their network to get the train unstuck.
|
cybersyn-stuck-train-time=After this many seconds from a train's dispatch, an alert will be sent to let you know a train is probably stuck and has not completed its delivery. The player will likely have to debug their network to get the train unstuck.
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ OPERATION_DEPOT = "+"
|
|||||||
OPERATION_WAGON_MANIFEST = "-"
|
OPERATION_WAGON_MANIFEST = "-"
|
||||||
|
|
||||||
NETWORK_SIGNAL_DEFAULT = {name="signal-A", type="virtual"}
|
NETWORK_SIGNAL_DEFAULT = {name="signal-A", type="virtual"}
|
||||||
|
INACTIVITY_TIME = 60
|
||||||
|
|
||||||
DELTA = 1/2048
|
DELTA = 1/2048
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ end
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
local create_loading_order_condition = {type = "inactivity", compare_type = "and", ticks = 120}
|
local create_loading_order_condition = {type = "inactivity", compare_type = "and", ticks = INACTIVITY_TIME}
|
||||||
---@param stop LuaEntity
|
---@param stop LuaEntity
|
||||||
---@param manifest Manifest
|
---@param manifest Manifest
|
||||||
function create_loading_order(stop, manifest)
|
function create_loading_order(stop, manifest)
|
||||||
@@ -68,7 +68,7 @@ function create_unloading_order(stop)
|
|||||||
return {station = stop.backer_name, wait_conditions = create_unloading_order_condition}
|
return {station = stop.backer_name, wait_conditions = create_unloading_order_condition}
|
||||||
end
|
end
|
||||||
|
|
||||||
local create_inactivity_order_condition = {{type = "inactivity", compare_type = "and", ticks = 120}}
|
local create_inactivity_order_condition = {{type = "inactivity", compare_type = "and", ticks = INACTIVITY_TIME}}
|
||||||
---@param depot_name string
|
---@param depot_name string
|
||||||
function create_inactivity_order(depot_name)
|
function create_inactivity_order(depot_name)
|
||||||
return {station = depot_name, wait_conditions = create_inactivity_order_condition}
|
return {station = depot_name, wait_conditions = create_inactivity_order_condition}
|
||||||
|
|||||||
@@ -645,7 +645,9 @@ local function on_train_arrives_buffer(map_data, stop, train)
|
|||||||
set_r_wagon_combs(map_data, station, train)
|
set_r_wagon_combs(map_data, station, train)
|
||||||
end
|
end
|
||||||
elseif train.status == STATUS_P and train.p_station_id == station_id then
|
elseif train.status == STATUS_P and train.p_station_id == station_id then
|
||||||
elseif train.status == STATUS_R and train.r_station_id == station_id then
|
--this player intervention that is considered valid
|
||||||
|
elseif (train.status == STATUS_R or train.status == STATUS_R_TO_D) and train.r_station_id == station_id then
|
||||||
|
--this player intervention that is considered valid
|
||||||
else
|
else
|
||||||
on_failed_delivery(map_data, train)
|
on_failed_delivery(map_data, train)
|
||||||
remove_train(map_data, train, train.entity.id)
|
remove_train(map_data, train, train.entity.id)
|
||||||
|
|||||||
@@ -9,28 +9,37 @@ data:extend({
|
|||||||
minimum_value = 1,
|
minimum_value = 1,
|
||||||
maximum_value = 60,
|
maximum_value = 60,
|
||||||
},
|
},
|
||||||
|
--{
|
||||||
|
-- type = "int-setting",
|
||||||
|
-- name = "cybersyn-wait-time",
|
||||||
|
-- order = "ab",
|
||||||
|
-- setting_type = "runtime-global",
|
||||||
|
-- default_value = 2000,
|
||||||
|
-- minimum_value = 1,
|
||||||
|
-- maximum_value = 2147483647,
|
||||||
|
--},
|
||||||
{
|
{
|
||||||
type = "int-setting",
|
type = "double-setting",
|
||||||
name = "cybersyn-request-threshold",
|
name = "cybersyn-request-threshold",
|
||||||
order = "ab",
|
order = "ac",
|
||||||
setting_type = "runtime-global",
|
setting_type = "runtime-global",
|
||||||
default_value = 2000,
|
default_value = 1,
|
||||||
minimum_value = 1,
|
minimum_value = 0,
|
||||||
maximum_value = 2147483647,
|
maximum_value = 2147483647,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "int-setting",
|
type = "int-setting",
|
||||||
name = "cybersyn-network-flag",
|
name = "cybersyn-network-flag",
|
||||||
order = "ac",
|
order = "ad",
|
||||||
setting_type = "runtime-global",
|
setting_type = "runtime-global",
|
||||||
default_value = 1,
|
default_value = -1,
|
||||||
minimum_value = -2147483648,
|
minimum_value = -2147483648,
|
||||||
maximum_value = 2147483647,
|
maximum_value = 2147483647,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "int-setting",
|
type = "int-setting",
|
||||||
name = "cybersyn-warmup-time",
|
name = "cybersyn-warmup-time",
|
||||||
order = "ad",
|
order = "ae",
|
||||||
setting_type = "runtime-global",
|
setting_type = "runtime-global",
|
||||||
default_value = 20,
|
default_value = 20,
|
||||||
minimum_value = 0,
|
minimum_value = 0,
|
||||||
@@ -39,7 +48,7 @@ data:extend({
|
|||||||
{
|
{
|
||||||
type = "int-setting",
|
type = "int-setting",
|
||||||
name = "cybersyn-stuck-train-time",
|
name = "cybersyn-stuck-train-time",
|
||||||
order = "ae",
|
order = "af",
|
||||||
setting_type = "runtime-global",
|
setting_type = "runtime-global",
|
||||||
default_value = 600,
|
default_value = 600,
|
||||||
minimum_value = 0,
|
minimum_value = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user