mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-11 00:08:13 -06:00
added train schedule interface
This commit is contained in:
@@ -21,7 +21,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
---@param surface LuaSurface
|
---@param surface LuaSurface
|
||||||
local function se_get_space_elevator_name(surface)
|
function se_get_space_elevator_name(surface)
|
||||||
--TODO: check how expensive the following is and potentially cache it's results
|
--TODO: check how expensive the following is and potentially cache it's results
|
||||||
local entity = surface.find_entities_filtered({
|
local entity = surface.find_entities_filtered({
|
||||||
name = SE_ELEVATOR_STOP_PROTO_NAME,
|
name = SE_ELEVATOR_STOP_PROTO_NAME,
|
||||||
@@ -108,7 +108,7 @@ end
|
|||||||
|
|
||||||
---@param elevator_name string
|
---@param elevator_name string
|
||||||
---@param is_train_in_orbit boolean
|
---@param is_train_in_orbit boolean
|
||||||
local function se_create_elevator_order(elevator_name, is_train_in_orbit)
|
function se_create_elevator_order(elevator_name, is_train_in_orbit)
|
||||||
return {station = elevator_name..(is_train_in_orbit and SE_ELEVATOR_ORBIT_SUFFIX or SE_ELEVATOR_PLANET_SUFFIX)}
|
return {station = elevator_name..(is_train_in_orbit and SE_ELEVATOR_ORBIT_SUFFIX or SE_ELEVATOR_PLANET_SUFFIX)}
|
||||||
end
|
end
|
||||||
---@param train LuaTrain
|
---@param train LuaTrain
|
||||||
|
|||||||
@@ -403,6 +403,20 @@ function interface.remove_available_train(train_id)
|
|||||||
remove_available_train(global, train_id, train)
|
remove_available_train(global, train_id, train)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
|
--[[train schedule]]
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
interface.create_loading_order = create_loading_order
|
||||||
|
interface.create_unloading_order = create_unloading_order
|
||||||
|
interface.create_inactivity_order = create_inactivity_order
|
||||||
|
interface.create_direct_to_station_order = create_direct_to_station_order
|
||||||
|
interface.set_depot_schedule = set_depot_schedule
|
||||||
|
interface.lock_train = lock_train
|
||||||
|
interface.rename_manifest_schedule = rename_manifest_schedule
|
||||||
|
interface.se_get_space_elevator_name = se_get_space_elevator_name
|
||||||
|
interface.se_create_elevator_order = se_create_elevator_order
|
||||||
|
interface.set_manifest_schedule = set_manifest_schedule
|
||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
--[[alerts]]
|
--[[alerts]]
|
||||||
|
|||||||
Reference in New Issue
Block a user