Module structure

Source
Expand description

Re-export of all constants related to structures.

Re-exports§

pub use super::extra::CONSTRUCTION_SITE_DROP_RATIO;
pub use super::extra::LAB_REACTION_RANGE;
pub use super::extra::TERMINAL_SEND_COST_SCALE;

Enums§

StructureType
Translates STRUCTURE_* constants.

Constants§

CONSTRUCTION_COST_ROAD_SWAMP_RATIO
Build, decay, and hits multiplier for roads built on swamp tiles.
CONSTRUCTION_COST_ROAD_WALL_RATIO
Build, decay, and hits multiplier for roads built on natural wall tiles (tunnels)
CONTAINER_CAPACITY
Store capacity of container structures.
CONTAINER_DECAY
Hits lost on the container per decay.
CONTAINER_DECAY_TIME
Ticks between hit loss due to decay in unowned rooms.
CONTAINER_DECAY_TIME_OWNED
Ticks between hit loss due to decay in owned rooms.
CONTAINER_HITS
Initial hits for container structures; consider using the StructureType::initial_hits function.
EXTENSION_HITS
Initial hits for extension structures; consider using the StructureType::initial_hits function.
EXTRACTOR_COOLDOWN
Ticks of cooldown for the extractor timer after tick that at least one creep successfully used Creep::harvest.
EXTRACTOR_HITS
Initial hits for extractor structures; consider using the StructureType::initial_hits function.
FACTORY_CAPACITY
Store capacity of factory structures.
FACTORY_HITS
Initial hits for factory structures; consider using the StructureType::initial_hits function.
INVADER_CORE_CONTROLLER_DOWNGRADE
Duration of stronghold ‘deployment’, during which they are invulnerable.
INVADER_CORE_CONTROLLER_POWER
The reservation points added or removed per tick by invader cores.
INVADER_CORE_HITS
Initial hits for invader cores; consider using the StructureType::initial_hits function.
LAB_ENERGY_CAPACITY
Store capacity for energy in lab structures.
LAB_HITS
Initial hits for lab structures; consider using the StructureType::initial_hits function.
LAB_MINERAL_CAPACITY
Store capacity for minerals in lab structures.
LINK_CAPACITY
Energy capacity of link structures.
LINK_COOLDOWN
Ticks of link cooldown after transferring energy per distance to destination.
LINK_HITS
Initial hits for link structures; consider using the StructureType::initial_hits function.
LINK_LOSS_RATIO
Percentage of the energy that is lost when transferred by StructureLink::transfer_energy.
NUKER_COOLDOWN
Cooldown for nuker structers after firing.
NUKER_ENERGY_CAPACITY
Energy capacity of the nuker, which is spent to fire a nuke.
NUKER_GHODIUM_CAPACITY
Ghodium capacity of the nuker, which is spent to fire a nuke.
NUKER_HITS
Initial hits for nuker structures; consider using the StructureType::initial_hits function.
OBSERVER_HITS
Initial hits for observer structures; consider using the StructureType::initial_hits function.
POWER_BANK_HITS
Initial hits for power bank structures; consider using the StructureType::initial_hits function.
POWER_SPAWN_ENERGY_CAPACITY
Maximum energy capacity for a power spawn to use in StructurePowerSpawn::process_power.
POWER_SPAWN_HITS
Initial hits for power spawn structures; consider using the StructureType::initial_hits function.
POWER_SPAWN_POWER_CAPACITY
Maximum power capacity for a power spawn to use in StructurePowerSpawn::process_power.
RAMPART_DECAY_AMOUNT
Hits lost per decay period for ramparts
RAMPART_DECAY_TIME
Ticks between rampart decays, losing RAMPART_DECAY_AMOUNT hits.
RAMPART_HITS
Initial hits for rampart structures when built; consider using the StructureType::initial_hits function.
RAMPART_HITS_MAX_RCL2
Max rampart hits at RCL 2; consider using the rampart_hits_max function.
RAMPART_HITS_MAX_RCL3
Max rampart hits at RCL 3; consider using the rampart_hits_max function.
RAMPART_HITS_MAX_RCL4
Max rampart hits at RCL 4; consider using the rampart_hits_max function.
RAMPART_HITS_MAX_RCL5
Max rampart hits at RCL 5; consider using the rampart_hits_max function.
RAMPART_HITS_MAX_RCL6
Max rampart hits at RCL 6; consider using the rampart_hits_max function.
RAMPART_HITS_MAX_RCL7
Max rampart hits at RCL 7; consider using the rampart_hits_max function.
RAMPART_HITS_MAX_RCL8
Max rampart hits at RCL 8; consider using the rampart_hits_max function.
ROAD_DECAY_AMOUNT
Hits lost upon decay for roads, before swamp/tunnel multipliers
ROAD_DECAY_TIME
Ticks between road decay events without traffic
ROAD_HITS
Maximum hits for road structures, before swamp/tunnel multipliers
ROAD_WEAROUT
Tick penalty to a road’s decay, per creep body part, when a creep steps on it.
ROAD_WEAROUT_POWER_CREEP
Tick penalty to a road’s decay when a power creep steps on it.
RUIN_DECAY
Ticks that ruins will last when structures are destroyed.
SPAWN_ENERGY_CAPACITY
Maximum energy capacity of spawn structures.
SPAWN_HITS
Initial hits for spawn structures; consider using the StructureType::initial_hits function.
STORAGE_CAPACITY
Store capacity for storage structures without power creep effects.
STORAGE_HITS
Initial hits for storage structures; consider using the StructureType::initial_hits function.
STRONGHOLD_DECAY_TICKS
Average ticks until collapse for a stronghold.
TERMINAL_CAPACITY
Store capacity of terminal structures.
TERMINAL_HITS
Initial hits for terminal structures; consider using the StructureType::initial_hits function.
TERMINAL_SEND_COST
Currently unused in game (see market::calc_transaction_cost and TERMINAL_SEND_COST_SCALE instead).
TOWER_CAPACITY
Energy capacity of tower structures.
TOWER_HITS
Initial hits for tower structures; consider using the StructureType::initial_hits function.
WALL_HITS
Initial hits for wall structures when built; consider using the StructureType::initial_hits function.
WALL_HITS_MAX
Maximum hits for wall structures.

Functions§

extension_energy_capacity
Translates the EXTENSION_ENERGY_CAPACITY constant, the energy capacity of each source structure at a given room control level.
invader_core_creep_spawn_time
Ticks per body part that invader cores of each level take to spawn defensive creeps.
invader_core_expand_time
Ticks between creation of invader cores in rooms in the sector for each level of stronghold.
rampart_hits_max
Translates the RAMPART_HITS_MAX constant, the maximum rampart hits for a given room control level.
ruin_decay_structures
Structures with special rules for their ruins’ ticks to live, currently only power banks.
stronghold_rampart_hits
Rampart hits for each level of stronghold.