Archivemanager
Based on game build 714014 | Last updated: 2026-03-20
Overview
Archivemanager is a server-only component responsible for controlling the power state of Archive structures. It toggles a private power flag and synchronizes this state with the global WORLDSTATETAGS system using the ARCHIVES_ENERGIZED tag. This component asserts that it only exists on the master simulation (TheWorld.ismastersim), preventing it from running on clients.
Usage example
local inst = CreateEntity()
inst:AddComponent("archivemanager")
-- Turn power on
inst.components.archivemanager:SwitchPowerOn(true)
-- Check current state
local is_on = inst.components.archivemanager:GetPowerSetting()
Dependencies & tags
Components used: None identified.
Tags: Modifies the world state tag ARCHIVES_ENERGIZED via WORLDSTATETAGS.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
inst | Entity | nil | The entity instance that owns this component. |
Main functions
SwitchPowerOn(setting)
- Description: Toggles the internal power state and updates the world state tag. Pushes an event corresponding to the new state.
- Parameters:
setting(boolean) -trueto enable power,falseto disable. - Returns: Nothing.
- Error states: No effect if the requested
settingmatches the current internal state.
GetPowerSetting()
- Description: Retrieves the current power state of the archive.
- Parameters: None.
- Returns:
boolean-trueif power is enabled,falseotherwise.
GetDebugString()
- Description: Returns a string representation of the current power state for debugging purposes.
- Parameters: None.
- Returns:
string- The string result oftostring(_power_enabled).
Events & listeners
- Listens to: None.
- Pushes:
arhivepoweron- Fired when power is switched on (note the typo in the event name). - Pushes:
arhivepoweroff- Fired when power is switched off (note the typo in the event name).