# Space stations (design 19.1; read by src/world/structures/Stations.cpp). See README.md in this folder for
# the format.
#
# One station over a world (in the start system the one beside the home world), and in busier systems a few more (`more stations` below), each
# built from modules joined by corridors.
# The layout pass places the core and each section around it, then each module fills in from its
# template: a builder (code) lays out its shell, and its rooms and fittings come from here.
#
# Directions and sizes are in blocks. A module's own frame: `width` across, `length` away from the
# module it hangs off (its entrance is in the middle of the near wall), decks stacked
# `deck height` apart, each a floor slab and the air above it. Row order is part of the data: it
# decides which random number goes where.

[station Layout]
# Height above its world: this share of the way from the top of its air out to the edge of
# its sphere of influence, but never nearer the air than `clearance`.
altitude = 0.4
clearance = 1500
deck height = 5
# Corridors between modules, on the lowest deck: hooped tubes round a floor this wide, their
# length drawn per corridor (from the core, counted from the edge of its drum).
corridor width = 5
corridor length = 4 .. 7
core = Concourse
# A section: module, the side of the core it hangs off (north is -Z, east +X).
section = Hangar, north
section = Engineering, south
section = Dormitories, east
section = Office, west
# The section still being fitted out: one of these modules gets it, past its far end.
sealed = Annex, Dormitories, Office, Engineering
# The modules bolted on later, in a different style: this many of these, drawn in order.
newer = Dormitories, Office, Engineering
newer count = 1 .. 2
# The station's name; {name} is a name from the structure name parts.
name = {name} Station
# People passing through while a player is near: how many, and the sections they walk between
# (from one to another, staying a while in each).
travellers = 6
travel = Hangar, Concourse, Dormitories, Office
# More stations (design 19.1): a settled system reached through a gate, whose holder builds a
# station, adds this many besides the one by its first gate, each over another of its worlds or
# off the outer edge of a belt (this share of them at a belt, while it has one). The start system
# and the frontier keep their one.
more stations = 1 .. 3
belt share = 0.35

# Styles: the blocks a module is built from. A block is a type, then any of `base hue`, `base sat`,
# `base val`, `accent hue`, `form` and `tint` with a number. `lining` and `light` may be `none`.
# `trim` is the ribs, roof edges and frames: keep it a plain block, as a station has a lot of it
# (a truss is a hundred times the quads of a hull plate).
[station-style Core]
hull = Hull, base val -0.3
lining = WallPanel
floor = FloorTile, base val 0.1
ceiling = WallPanel, form 0
trim = Hull, base val -0.7
window = HullWindow
light = CeilingLight
light spacing = 6

[station-style Newer]
hull = Hull, base val 0.25, base sat -0.6
lining = WallPanel, accent hue 0.6
floor = FloorTile
ceiling = WallPanel, form 0, base val 0.2
trim = Hull, base val -0.2, base sat -0.6
window = HullWindow
light = CeilingLight
light spacing = 5

[station-style Sealed]
hull = Hull, base val -0.55
lining = none
floor = Concrete, base val -0.2
ceiling = Hull, base val -0.55
trim = Hull, base val -0.8
window = HullWindow
light = none
light spacing = 8

# The Hives', the Concord's and the Syndicate's kits (galaxy.txt, step 37c).
[station-style Hive]
hull = HexWall
lining = Chitin, look 0, form 0.2
floor = Resin, form 0.2
ceiling = Chitin, look 0, form 0.8
trim = Chitin, look 0, form 0.8
window = HullWindow
light = CeilingLight, look 2
light spacing = 6

[station-style Bazaar]
hull = Sandstone, look 0
lining = GlazedTile, form 0.1
floor = GlazedTile, form 0.9
ceiling = Sandstone, look 0
trim = CopperPanel, form 0.2
window = HullWindow, look 0
light = CeilingLight, look 0
light spacing = 4

[station-style Den]
hull = Hull, base val -0.75, look 1
lining = WallPanel, base val -0.6, accent hue -0.4
floor = Concrete, look 0
ceiling = Hull, base val -0.75
trim = MetalTrim, form 0.9
window = HullWindow
light = CeilingLight, base hue 0.9
light spacing = 6

# The nations' kits (design 19.7, step 37c): what each one's stations are built of. The kit blocks
# are kitblocks.txt's, written out here as their type and traits.
[station-style Republic]
hull = Hull, base val 0.5, base sat -0.9, look 1
lining = WallPanel, base val 0.45, form 0.6
floor = FloorTile, base val 0.15
ceiling = WallPanel, form 0, base val 0.4
trim = MetalTrim, form 0.1
window = HullWindow, look 0
light = CeilingLight, look 0
light spacing = 5

[station-style Ascendancy]
hull = Basalt, look 0
lining = Granite, look 0
floor = Basalt, look 0
ceiling = RivetedIron, form 0.2
trim = MetalTrim, form 0.35
window = HullWindow
light = CeilingLight, look 1
light spacing = 7

[station-style Dominion]
hull = Basalt, look 1
lining = RivetedIron, form 0.8
floor = Basalt, look 1
ceiling = RivetedIron, form 0.2
trim = MetalTrim, form 0.9
window = HullWindow
light = CeilingLight, look 1
light spacing = 9

[station-style Reaches]
hull = ScrapPanel
lining = Corrugated, look 0
floor = DeckPlate
ceiling = ScrapPanel
trim = RivetedIron, form 0.8
window = HullWindow
light = CeilingLight
light spacing = 8

# ---------------------------------------------------------------------------------------------
# Modules. `builder` names the code that lays out the shell; `title` is what its signs say.

# The core: a two-deck hall inside a round drum (`drum` its radius) under a shallow dome (`dome`
# high at the middle). Shop units line its walls on both decks, a gallery runs round the upper
# deck over an open atrium, stairs join the decks, a window in the atrium floor looks
# down on the planet and a glass cap in the dome looks up. Shops take units in a drawn order, lower
# deck first; units left over are closed and let.
[station-module Concourse]
builder = concourse
title = Concourse
width = 44
length = 44
decks = 2
style = Core
unit depth = 7
unit width = 8
atrium = 19
window = 9
drum = 32
dome = 9
shops = General, Shipwright, Outfitter, Survey, Cantina, Employment

# The hangar: one hall under an arched roof `vault` high, `pads` on its floor (of `pad`) in
# `pad rows` rows (the first nearest the shield), a hangar shield across its far end, and its
# rooms along the near wall.
[station-module Hangar]
builder = hangar
title = Hangar
width = 60
length = 50
decks = 3
vault = 22
style = Core
pads = 8
pad rows = 2
pad size = 10
pad = FloorTile, base val 0.35, tint 0.5
room = 1, Dockmaster, 11, DockOffice, area dockmaster
room = 1, Cargo Bay, 14, CargoBay

# Rooms off a hallway down the middle: rooms fill the left side, then the right, deck by deck,
# in the order listed. A room is `deck, name, length, fitting`, then `area KIND` if it is a
# facility of its own and `staff` behind a staff-only door. A room's length counts the wall at
# its far end; a side holds `length - 3` of them, and its fitting must be narrower than the room.
# With more than one deck, stairs at the far end of the hallway join them. The decks sit in a
# cylinder of `radius` along the module, rounded off at its far end. `staff = yes` puts the
# module's own entrance behind a staff-only door; `roof` is wings (a solar wing either side, each
# `wing length` out from the hull and twice `wing width` across), antenna (a mast with a dish),
# solar (rows of panels, for a module without a cylinder) or none.
[station-module Dormitories]
builder = rooms
title = Dormitories
width = 26
length = 40
decks = 2
style = Core
hallway = 4
radius = 15
room = 1, Bunk Room A, 10, Bunks
room = 1, Bunk Room B, 10, Bunks
room = 1, Bunk Room C, 10, Bunks
room = 1, Washroom, 7, Washroom
room = 1, Medbay, 10, Medbay, area medbay
room = 1, Bunk Room D, 10, Bunks
room = 1, Bunk Room E, 10, Bunks
room = 1, Washroom, 7, Washroom
room = 2, Crew Quarters, 8, Quarters, staff
room = 2, Crew Quarters, 8, Quarters, staff
room = 2, Crew Quarters, 8, Quarters, staff
room = 2, Crew Mess, 9, Mess, staff
room = 2, Bunk Room F, 10, Bunks
room = 2, Bunk Room G, 10, Bunks
room = 2, Washroom, 7, Washroom

[station-module Office]
builder = rooms
title = Station Office
width = 26
length = 28
decks = 1
style = Core
hallway = 4
radius = 14
roof = antenna
room = 1, Station Office, 10, StationOffice, area office
room = 1, Records, 8, Records, staff
room = 1, Holding, 7, Holding, staff
room = 1, Security Desk, 9, SecurityDesk, area security
room = 1, Waiting Room, 8, Waiting

[station-module Engineering]
builder = rooms
title = Engineering
width = 26
length = 34
decks = 1
style = Core
hallway = 4
radius = 14
roof = wings
wing length = 40
wing width = 10
staff = yes
room = 1, Reactor Room, 12, Reactors, staff
room = 1, Core Room, 9, Core, staff
room = 1, Life Support, 10, LifeSupport, staff
room = 1, Workshop, 9, Workshop, staff
room = 1, Stores, 9, Stores, staff

# Still being fitted out: bare frames and crates behind a wall where its door will go.
[station-module Annex]
builder = rooms
title = Annex
width = 26
length = 18
decks = 1
style = Sealed
hallway = 4
radius = 14
room = 1, Unfinished, 12, Frames
room = 1, Unfinished, 12, Crates

# ---------------------------------------------------------------------------------------------
# Staff: who works at the station, while a player is near. `role` is one of dockmaster,
# shopkeeper, officer, doctor and broker (their lines are in dialog.txt). `post` is where they
# stand: `area KIND` behind the counter of each room that is a facility of that kind, `shops`
# behind every open shop's counter, `shop KIND` among the tables of each shop of that kind, or
# `section MODULE` on that section's floor, near its middle.
[station-staff Dockmaster]
role = dockmaster
post = area dockmaster

[station-staff Shopkeepers]
role = shopkeeper
post = shops

[station-staff Officer]
role = officer
post = area office

[station-staff Security]
role = officer
post = area security

[station-staff Doctor]
role = doctor
post = area medbay

# Quest givers: a broker in the cantina, and another on the concourse floor.
[station-staff Cantina Broker]
role = broker
post = shop cantina

[station-staff Concourse Broker]
role = broker
post = section Concourse

# ---------------------------------------------------------------------------------------------
# Shops: what a shopfront's sign says ({name} is drawn from the structure name parts), how many
# units it takes, its fitting and the facility kind it is.
[station-shop General]
title = {name} Supply
units = 1
fitting = GeneralStore
kind = general

[station-shop Shipwright]
title = {name} Shipwrights
units = 1
fitting = Shipwright
kind = shipwright

[station-shop Outfitter]
title = {name} Outfitters
units = 1
fitting = Outfitter
kind = outfitter

[station-shop Survey]
title = {name} Survey Office
units = 1
fitting = SurveyOffice
kind = survey

# The job board, in an office of its own: its screen on the back wall, a clerk at the desk.
[station-shop Employment]
title = {name} Employment Office
units = 1
fitting = EmploymentOffice
kind = employment

[station-shop Cantina]
title = The {name} Cantina
units = 2
fitting = Cantina
kind = cantina

# ---------------------------------------------------------------------------------------------
# Fittings: what fills a room or a shop unit, in cells. `key` names what each letter places:
# a block type, then `back`, `left` or `right` to turn it from facing the room's front (where
# its door or counter is); `.` leaves a cell empty. After a room is laid out its furniture is
# turned to suit it: a chair beside a table, desk or bench faces it, and anything facing a wall
# turns out into the room. Rows run from the back wall toward the front,
# columns across the room, centred. A multi-cell block's letter is its origin (a bed's is its
# foot: its pillow takes the cell behind). A shop unit's front row is its counter.

[station-fitting Bunks]
key = B Bed, L Locker, T Table, C Chair
row = .........
row = B.B...B.B
row = .........
row = .........
row = L.L.T.L.L

[station-fitting Washroom]
key = S Shelf, L Locker, B Barrel
row = BBBBBB
row = ......
row = ......
row = S.LL.S

[station-fitting Medbay]
key = B Bed, M LabBench, K Console, S Shelf, L Locker
row = .........
row = B.B.B.B.B
row = .........
row = .........
row = M.K...S.L

[station-fitting Quarters]
key = B Bed, L Locker, T Table, C Chair, S Shelf
row = .......
row = B.....B
row = .......
row = .S.TC..
row = L.....L

[station-fitting Mess]
key = T Table, C Chair, O CookStation, S Shelf
row = O.S.S.O
row = .......
row = CTC.CTC
row = .......
row = CTC.CTC

[station-fitting StationOffice]
key = K Console, R ServerRack, S Shelf, T Table, C Chair, P Planter
row = R.K.K.R
row = ..C.C..
row = .......
row = P.CTC.P
row = S.....S

[station-fitting Records]
key = R ServerRack, S Shelf
row = RRRRRR
row = ......
row = SSSSSS

[station-fitting SecurityDesk]
key = K Console, L Locker, T Table, C Chair
row = LLLLLLL
row = .......
row = .K.K.K.
row = .C.C.C.
row = .......

[station-fitting Holding]
key = B Bed, L Locker
row = .....
row = B...B
row = .....
row = L...L

[station-fitting Waiting]
key = C Chair, T Table, P Planter
row = P.....P
row = CCC.CCC
row = .......
row = .T...T.

[station-fitting Reactors]
key = E Reactor, R ServerRack, K Console
row = E.E.E.E.E
row = .........
row = E.E.E.E.E
row = .........
row = R.K...K.R

[station-fitting Core]
key = Q StationCore, G GravityGenerator, K Console
row = G.....G
row = .......
row = ...Q...
row = .......
row = G.K.K.G

[station-fitting LifeSupport]
key = U LifeSupport, R ServerRack, K Console
row = U.U.U.U.U
row = .........
row = U.U.U.U.U
row = .........
row = R...K...R

[station-fitting Workshop]
key = F Fabricator, M LabBench, S Shelf, X Crate
row = S.F.F.S
row = .......
row = .M...M.
row = .......
row = X.....X

[station-fitting Stores]
key = S Shelf, X Crate, A Barrel
row = SSSSSSS
row = .......
row = XX.X.XX
row = .......
row = AA...AA

[station-fitting Frames]
key = T Truss, X Crate
row = T.T.T.T.T
row = T.T.T.T.T
row = .........
row = X.....X..

[station-fitting Crates]
key = X Crate, A Barrel, T Truss
row = XXX.XXX.X
row = XX..AA..X
row = .........
row = T.......T

[station-fitting DockOffice]
key = K Console, R ServerRack, S Shelf, T Table, C Chair
row = R.S.S.R
row = .......
row = ..T.T..
row = .......
row = K.K.K.K

[station-fitting CargoBay]
key = X Crate, A Barrel, S Shelf
row = SSSS..SSSS
row = ..........
row = XX.XX.XX.X
row = XX.XX.XX.X
row = ..........
row = AA......AA

[station-fitting GeneralStore]
key = S Shelf, X Crate, A Barrel, K Console, T Table
row = SSSSSSS
row = .......
row = .X.A.X.
row = .......
row = TTKTT..

[station-fitting Shipwright]
key = R ServerRack, S Shelf, X Crate, K Console, T Table, F Fabricator
row = R.F.F.R
row = .......
row = .X...X.
row = .......
row = TTKTT..

[station-fitting Outfitter]
key = L Locker, S Shelf, K Console, T Table
row = LLL.LLL
row = .......
row = .S...S.
row = .......
row = TTKTT..

[station-fitting SurveyOffice]
key = R ServerRack, M LabBench, K Console, T Table, S Shelf
row = R.M.M.R
row = .......
row = .S...S.
row = .......
row = TTKTT..

[station-fitting EmploymentOffice]
key = J JobBoard, T Table, K Console, C Chair, P Planter
row = ...J...
row = .......
row = .C.P.C.
row = .......
row = TTKTT..

[station-fitting Cantina]
key = O CookStation, S Shelf, T Table, C Chair, K Console, A Barrel
row = SOSAAAAASOS
row = ...........
row = .CTC...CTC.
row = ...........
row = .CTC...CTC.
row = TTTTKTT....
