Documentation

PlanetStructureType
in package

Defines intrinsic properties of planetary structure types.

Table of Contents

Constants

GOODS  = [PLANET_GENERATOR => [GOODS_WOOD => 20, GOODS_ORE => 15, GOODS_MACHINERY => 35, GOODS_COMPUTERS => 5], PLANET_HANGAR => [GOODS_WOOD => 25, GOODS_FOOD => 10, GOODS_ORE => 25], PLANET_TURRET => [GOODS_FOOD => 25, GOODS_ORE => 10, GOODS_MACHINERY => 25, GOODS_COMPUTERS => 10], PLANET_BUNKER => [GOODS_WOOD => 20, GOODS_FOOD => 35, GOODS_CIRCUITRY => 15], PLANET_WEAPON_MOUNT => [GOODS_WOOD => 20, GOODS_FOOD => 15, GOODS_MACHINERY => 10, GOODS_SLAVES => 5], PLANET_RADAR => [GOODS_WOOD => 100, GOODS_MACHINERY => 75, GOODS_CIRCUITRY => 150]]
Trade goods required to build each type of structure.
INFO  = [PLANET_GENERATOR => ['name' => 'Generator', 'image' => 'generator.png', 'tooltip' => 'Generators protect a planet with shields. Each generator can hold ' . PLANET_GENERATOR_SHIELDS . ' shields.', 'summary' => 'Increases planet\'s maximum shield capacity by ' . PLANET_GENERATOR_SHIELDS . ' shields'], PLANET_HANGAR => ['name' => 'Hangar', 'image' => 'hangar.png', 'tooltip' => 'Hangars house and launch combat drones. Each hangar holds ' . PLANET_HANGAR_DRONES . ' drones.', 'summary' => 'Increases planet\'s maximum drone capacity by ' . PLANET_HANGAR_DRONES . ' drones'], PLANET_BUNKER => ['name' => 'Bunker', 'image' => 'bunker.png', 'tooltip' => 'Bunkers are defensive structures with reinforced armour. Each bunker holds ' . PLANET_BUNKER_ARMOUR . ' units of armour.', 'summary' => 'Increases planet\'s maximum armour capacity by ' . PLANET_BUNKER_ARMOUR . ' armour'], PLANET_TURRET => ['name' => 'Turret', 'image' => 'turret.png', 'tooltip' => 'Turrets fire heavy laser beams. They can destroy either 250 shields or 250 armour.', 'summary' => 'Builds a turret capable of dealing 250 damage to enemy ships when fired on'], PLANET_WEAPON_MOUNT => ['name' => 'Weapon Mount', 'image' => 'weapon_mount.png', 'tooltip' => 'Weapon mounts can be fitted with ship weapons.', 'summary' => 'Builds a weapon mount capable of being retrofitted with ship weapons'], PLANET_RADAR => ['name' => 'Radar Station', 'image' => 'radar.png', 'tooltip' => 'Radar stations track hostile ships. Each station makes mounted weapons 5% more accurate.', 'summary' => 'Builds a radar that tracks hostile ships, making weapons 5% more accurate', 'hardware_cost' => [HARDWARE_SCANNER]]]
Information to display about each structure type.

Properties

$ID  : int
$planetTypeInfo  : array<string|int, mixed>

Methods

__construct()  : mixed
baseTime()  : int
creditCost()  : int
expGain()  : int
goods()  : array<int, int>
hardwareCost()  : array<string|int, int>
image()  : string
maxAmount()  : int
name()  : string
structureID()  : int
summary()  : string
tooltip()  : string

Constants

GOODS

Trade goods required to build each type of structure.

protected mixed GOODS = [PLANET_GENERATOR => [GOODS_WOOD => 20, GOODS_ORE => 15, GOODS_MACHINERY => 35, GOODS_COMPUTERS => 5], PLANET_HANGAR => [GOODS_WOOD => 25, GOODS_FOOD => 10, GOODS_ORE => 25], PLANET_TURRET => [GOODS_FOOD => 25, GOODS_ORE => 10, GOODS_MACHINERY => 25, GOODS_COMPUTERS => 10], PLANET_BUNKER => [GOODS_WOOD => 20, GOODS_FOOD => 35, GOODS_CIRCUITRY => 15], PLANET_WEAPON_MOUNT => [GOODS_WOOD => 20, GOODS_FOOD => 15, GOODS_MACHINERY => 10, GOODS_SLAVES => 5], PLANET_RADAR => [GOODS_WOOD => 100, GOODS_MACHINERY => 75, GOODS_CIRCUITRY => 150]]

INFO

Information to display about each structure type.

private mixed INFO = [PLANET_GENERATOR => ['name' => 'Generator', 'image' => 'generator.png', 'tooltip' => 'Generators protect a planet with shields. Each generator can hold ' . PLANET_GENERATOR_SHIELDS . ' shields.', 'summary' => 'Increases planet\'s maximum shield capacity by ' . PLANET_GENERATOR_SHIELDS . ' shields'], PLANET_HANGAR => ['name' => 'Hangar', 'image' => 'hangar.png', 'tooltip' => 'Hangars house and launch combat drones. Each hangar holds ' . PLANET_HANGAR_DRONES . ' drones.', 'summary' => 'Increases planet\'s maximum drone capacity by ' . PLANET_HANGAR_DRONES . ' drones'], PLANET_BUNKER => ['name' => 'Bunker', 'image' => 'bunker.png', 'tooltip' => 'Bunkers are defensive structures with reinforced armour. Each bunker holds ' . PLANET_BUNKER_ARMOUR . ' units of armour.', 'summary' => 'Increases planet\'s maximum armour capacity by ' . PLANET_BUNKER_ARMOUR . ' armour'], PLANET_TURRET => ['name' => 'Turret', 'image' => 'turret.png', 'tooltip' => 'Turrets fire heavy laser beams. They can destroy either 250 shields or 250 armour.', 'summary' => 'Builds a turret capable of dealing 250 damage to enemy ships when fired on'], PLANET_WEAPON_MOUNT => ['name' => 'Weapon Mount', 'image' => 'weapon_mount.png', 'tooltip' => 'Weapon mounts can be fitted with ship weapons.', 'summary' => 'Builds a weapon mount capable of being retrofitted with ship weapons'], PLANET_RADAR => ['name' => 'Radar Station', 'image' => 'radar.png', 'tooltip' => 'Radar stations track hostile ships. Each station makes mounted weapons 5% more accurate.', 'summary' => 'Builds a radar that tracks hostile ships, making weapons 5% more accurate', 'hardware_cost' => [HARDWARE_SCANNER]]]

Properties

Methods

__construct()

public __construct(int $ID, array<string, int> $planetTypeInfo) : mixed
Parameters
$ID : int
$planetTypeInfo : array<string, int>

hardwareCost()

public hardwareCost() : array<string|int, int>
Return values
array<string|int, int>

        
On this page

Search results