added space elevator compat

This commit is contained in:
Monica Moniot
2022-11-25 14:20:37 -05:00
parent 78958f4f22
commit be3f2f1d07
10 changed files with 293 additions and 75 deletions

View File

@@ -1,5 +1,4 @@
--By Mami
local get_distance = require("__flib__.misc").get_distance
local min = math.min
local max = math.max
local abs = math.abs
@@ -12,12 +11,6 @@ local table_sort = table.sort
local random = math.random
---@param stop0 LuaEntity
---@param stop1 LuaEntity
local function get_stop_dist(stop0, stop1)
return get_distance(stop0.position, stop1.position)
end
---@param map_data MapData
---@param station Station
@@ -217,7 +210,7 @@ local function send_train_between(map_data, r_station_id, p_station_id, depot, p
train.manifest = manifest
train.last_manifest_tick = map_data.total_ticks
train.entity.schedule = create_manifest_schedule(train.depot_name, p_station.entity_stop, r_station.entity_stop, manifest)
set_manifest_schedule(train.entity, depot.entity_stop, p_station.entity_stop, r_station.entity_stop, manifest)
set_comb2(map_data, p_station)
set_comb2(map_data, r_station)
if p_station.entity_comb1.valid then