# Power (design 7.2 and 24.10): one model for every grid, a ship's, a base's on a world, a
# platform's, a facility's. Read at startup by the game and the server
# (src/model/universe/GridData.cpp).
#
# A grid is every powered block a player placed, on a planet, a platform or a ship, joined through
# power cable, through blocks that conduct, or by touching another powered block of theirs. Grids
# of different owners never join. Its sources give bars; its systems take them in the order below,
# and the last in the order go without first when it runs short. A ship's crew may split its bars
# between its own systems (the Ship page); what they leave feeds its machines.
#
# [system Order]
#   priority       the systems in the order they are fed, comma separated
# [system NAME]    Engines, Thrusters, Weapons, LifeSupport, Shields, Quantum, Gravity, Scanner,
#                  Machines, Lights
#   cap            the most bars it can use, however many parts it has
# [seat NAME]      Cockpit, Core, Station: what a seat carries of its own
#   supply         its own reactor, in bars
#   block          the block that reactor is, on a grid (counted once, at its origin)
#   systems        the systems it has a bar's worth of built in (the drive, a ship's scanner)
#
# [grid Settings]
#   tick             seconds between a grid's power steps on the server
#   lights per bar   lamps, ceiling and floor lights one bar keeps lit
#   fuel per bar     fuel a ship's tank gives up each second for every bar its reactors put out
#                    (a cockpit's six bars empty its 60 units in about an hour)
#   sun reach        metres a solar panel looks toward the sun for something solid in the way
#
# [part TYPE]      a powered block, by its block type (as assets/data/world names them)
#   supply         bars it gives at all times
#   needs fuel     yes: only while it burns fuel (a reactor)
#   solar          bars it gives in full sun (less as the sun sets or the sky clouds over, none
#                  at night or with something solid between it and the sun)
#   store          bar-seconds it holds (a battery)
#   rate           the most bars it takes in or gives out at once (a battery)
#   light          yes: a light the grid feeds (lights per bar of them take a bar)
#   terminal       yes: E on it opens the grid tab
#   draw           bars a machine takes while it's on the grid (step 29b)
#   burning        bars it gives while it burns fuel (the combustion generator)
#   system         the system it is a part of (a thruster: Engines)
#   bars           bars it can use there (its system can use what its parts can, up to its cap)
#   base           yes: a weapon a base's grid runs too (a turret on a crewed platform)
#
# [conduct Blocks] blocks that carry power between powered blocks without being powered
#   types          block types, comma separated. Hull conducts; rock, soil, wood, glass and most
#                  building blocks don't, and break a grid in two.

[grid Settings]
tick = 1
lights per bar = 4
fuel per bar = 0.003
sun reach = 40

[system Order]
priority = LifeSupport, Gravity, Engines, Thrusters, Weapons, Quantum, Shields, Scanner, Machines, Lights

[system Engines]
cap = 8

[system Thrusters]
cap = 4

[system Weapons]
cap = 6

[system LifeSupport]
cap = 2

[system Shields]
cap = 6

[system Quantum]
cap = 1

[system Gravity]
cap = 2

[system Scanner]
cap = 1

# A seat's own reactor. The drive is part of every cockpit and core, and so is a ship's scanner.
[seat Cockpit]
supply = 6
block = Cockpit
systems = Quantum, Scanner

[seat Core]
supply = 8
block = CorvetteCore
systems = Quantum, Scanner

[seat Station]
supply = 160
systems = Quantum

[seat None]
systems = Quantum

# The systems' parts. A grid that isn't a ship's runs the two that make a room liveable: life
# support fills the sealed rooms it stands in with air, a gravity generator pulls toward the deck.
[part Thruster]
system = Engines
bars = 1

[part LargeEngine]
system = Engines
bars = 2

[part Maneuver]
system = Thrusters
bars = 0.5

[part LaserCannon]
system = Weapons
bars = 1

[part MiningLaser]
system = Weapons
bars = 1

# A laser turret (a place's own robot turret) draws a weapon bar on its place's grid.
[part LaserTurret]
system = Weapons
bars = 1
base = yes

# A turret cannon on a cockpit's hardpoint is a weapon bar like a cannon's, on a ship or a base.
[part TurretCannon]
system = Weapons
bars = 1
base = yes

[part LifeSupport]
system = LifeSupport
bars = 1

[part ShieldGenerator]
system = Shields
bars = 1

[part GravityGenerator]
system = Gravity
bars = 1

[part SolarPanel]
solar = 1

# No power is free in a survival world: a reactor gives its bars only while it burns fuel. On a
# base it burns what is in its own fuel slot (assets/data/machines.txt); on a ship it burns the
# tank, as the seat's own reactor does.
[part Reactor]
supply = 4
needs fuel = yes

[part BatteryBank]
store = 1200
rate = 2

[part Lamp]
light = yes

[part CeilingLight]
light = yes

[part FloorLight]
light = yes

[part Console]
terminal = yes

# Factory machines (step 29b; assets/data/machines.txt has what they do).
[part DrillRig]
draw = 2

[part Smelter]
draw = 1

[part Assembler]
draw = 1

[part CombustionGenerator]
burning = 2

[part Printer]
draw = 2

# A claw (design 7.2): a quarter of a bar, so a reactor runs a row of them.
[part Claw]
draw = 0.25

# An item lift (design 7.2): each cell of its shaft draws a tenth of a bar, so a ten-high lift
# draws one.
[part ItemLift]
draw = 0.1

[conduct Blocks]
types = PowerCable, Hull, Truss, DeckPlate, PlatformFrame, Rail, RailCurve, RailSlope, RailSwitch, RailBuffer, RailVertical, RailStop
