prepared for 1.0.0

This commit is contained in:
Monica Moniot
2022-11-29 15:12:28 -05:00
parent c4d8d3d21b
commit 090c60e627
6 changed files with 29 additions and 15 deletions

View File

@@ -22,6 +22,7 @@ OPERATION_DEPOT = "+"
OPERATION_WAGON_MANIFEST = "-"
NETWORK_SIGNAL_DEFAULT = {name="signal-A", type="virtual"}
INACTIVITY_TIME = 60
DELTA = 1/2048

View File

@@ -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}

View File

@@ -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)