mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-16 00:12:45 -06:00
added layout counting
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
--[[
|
||||
global: {
|
||||
total_ticks: int
|
||||
layout_top_id: int
|
||||
stations: {[stop_id]: Station}
|
||||
trains: {[train_id]: Train}
|
||||
trains_available: {[train_id]: bool}
|
||||
layouts: {[layout_id]: Layout}
|
||||
layout_train_count: {[layout_id]: int}
|
||||
}
|
||||
Station: {
|
||||
deliveries_total: int
|
||||
@@ -18,9 +21,7 @@ Station: {
|
||||
deliveries: {
|
||||
[item_name]: int
|
||||
}
|
||||
train_layout: [ [ {
|
||||
[car_type]: bool
|
||||
} ] ]
|
||||
train_layout: [char]
|
||||
accepted_layouts: {
|
||||
[layout_id]: bool
|
||||
}
|
||||
@@ -30,7 +31,6 @@ Train: {
|
||||
layout_id: int
|
||||
item_slot_capacity: int
|
||||
fluid_capacity: int
|
||||
depot_id: int
|
||||
depot_name: string
|
||||
status: int
|
||||
p_station_id: stop_id
|
||||
@@ -41,12 +41,16 @@ Train: {
|
||||
count: int
|
||||
}]
|
||||
}
|
||||
Layout: string
|
||||
]]
|
||||
|
||||
--TODO: only init once
|
||||
global.total_ticks = 0
|
||||
global.stations = {}
|
||||
global.trains = {}
|
||||
global.trains_available = {}
|
||||
global.layouts = {}
|
||||
global.layout_train_count = {}
|
||||
global.layout_top_id = 1
|
||||
|
||||
STATUS_D = 0
|
||||
STATUS_D_TO_P = 1
|
||||
|
||||
Reference in New Issue
Block a user