mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-11 08:08:15 -06:00
prepared for 1.0.0
This commit is contained in:
@@ -22,6 +22,7 @@ OPERATION_DEPOT = "+"
|
||||
OPERATION_WAGON_MANIFEST = "-"
|
||||
|
||||
NETWORK_SIGNAL_DEFAULT = {name="signal-A", type="virtual"}
|
||||
INACTIVITY_TIME = 60
|
||||
|
||||
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 manifest 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}
|
||||
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
|
||||
function create_inactivity_order(depot_name)
|
||||
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)
|
||||
end
|
||||
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
|
||||
on_failed_delivery(map_data, train)
|
||||
remove_train(map_data, train, train.entity.id)
|
||||
|
||||
Reference in New Issue
Block a user