private void UpdateStatus(EntityUid uid, ChargerComponent component)
{
var status = GetStatus(uid, component);
- if (component.Status == status || !TryComp(uid, out ApcPowerReceiverComponent? receiver))
- return;
+ TryComp(uid, out AppearanceComponent? appearance);
if (!_container.TryGetContainer(uid, component.SlotId, out var container))
return;
- TryComp(uid, out AppearanceComponent? appearance);
+ _appearance.SetData(uid, CellVisual.Occupied, container.ContainedEntities.Count != 0, appearance);
+ if (component.Status == status || !TryComp(uid, out ApcPowerReceiverComponent? receiver))
+ return;
component.Status = status;
default:
throw new ArgumentOutOfRangeException();
}
-
- _appearance.SetData(uid, CellVisual.Occupied, container.ContainedEntities.Count != 0, appearance);
}
private CellChargerStatus GetStatus(EntityUid uid, ChargerComponent component)
wires-board-name-telecomserver = TelecomServer
wires-board-name-medicalscanner = MedicalScanner
wires-board-name-reclaimer = Reclaimer
+wires-board-name-recharger = Recharger
wires-board-name-minigravitygenerator = MiniGravityGenerator
wires-board-name-dawinstrument = DawInstrument
wires-board-name-airlock = Airlock Control
components:
- type: Sprite
sprite: Structures/Power/cell_recharger.rsi
+ layers:
+ - map: ["enum.PowerChargerVisualLayers.Base"]
+ state: "empty"
+ - map: ["enum.PowerChargerVisualLayers.Light"]
+ state: "light-off"
+ shader: "unshaded"
+ - state: open
+ map: ["enum.WiresVisualLayers.MaintenancePanel"]
+ visible: false
- type: Machine
board: CellRechargerCircuitboard
+ - type: Wires
+ boardName: wires-board-name-recharger
+ layoutId: Recharger
+ - type: WiresPanel
+ - type: GenericVisualizer
+ visuals:
+ enum.WiresVisuals.MaintenancePanelState:
+ enum.WiresVisualLayers.MaintenancePanel:
+ True: { visible: true }
+ False: { visible: false }
- type: PowerCellSlot
cellSlotId: charger_slot
# fitsInCharger is true i dont think this will ever affect anything negatively but it lets it function
"y": 32
},
"license": "CC-BY-SA-3.0",
- "copyright": "https://github.com/tgstation/tgstation/commit/7dcdbc1468ffdc8689b984cb6b181d48ae41dbf2, potato based on https://github.com/vgstation-coders/vgstation13/commit/1dbcf389b0ec6b2c51b002df5fef8dd1519f8068 edited by @Doru991",
+ "copyright": "sprites based on https://github.com/vgstation-coders/vgstation13/commit/1dbcf389b0ec6b2c51b002df5fef8dd1519f8068. power cells edited by EmoGarbage404, potato edited by @Doru991",
"states": [
{
"name": "potato"
"y": 32
},
"license": "CC-BY-SA-3.0",
- "copyright": "Taken from Goonstation at commit https://github.com/goonstation/goonstation/commit/4f88b9314336631929c9cdddb1567fc08f83bf9e and modified by potato1234x (github) for ss14",
+ "copyright": "Taken from Goonstation at commit https://github.com/goonstation/goonstation/commit/4f88b9314336631929c9cdddb1567fc08f83bf9e and modified by potato1234x (github), then again by EmoGarbage404 (github) for ss14",
"states": [
{
"name": "light-off"