machine parts + power cell resprite (#23913)
* machine parts + power cell resprite * logic fix
@@ -115,13 +115,14 @@ internal sealed class ChargerSystem : EntitySystem
|
|||||||
private void UpdateStatus(EntityUid uid, ChargerComponent component)
|
private void UpdateStatus(EntityUid uid, ChargerComponent component)
|
||||||
{
|
{
|
||||||
var status = GetStatus(uid, component);
|
var status = GetStatus(uid, component);
|
||||||
if (component.Status == status || !TryComp(uid, out ApcPowerReceiverComponent? receiver))
|
TryComp(uid, out AppearanceComponent? appearance);
|
||||||
return;
|
|
||||||
|
|
||||||
if (!_container.TryGetContainer(uid, component.SlotId, out var container))
|
if (!_container.TryGetContainer(uid, component.SlotId, out var container))
|
||||||
return;
|
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;
|
component.Status = status;
|
||||||
|
|
||||||
@@ -155,8 +156,6 @@ internal sealed class ChargerSystem : EntitySystem
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
_appearance.SetData(uid, CellVisual.Occupied, container.ContainedEntities.Count != 0, appearance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private CellChargerStatus GetStatus(EntityUid uid, ChargerComponent component)
|
private CellChargerStatus GetStatus(EntityUid uid, ChargerComponent component)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ wires-board-name-hydroponicstray = HydroponicsTray
|
|||||||
wires-board-name-telecomserver = TelecomServer
|
wires-board-name-telecomserver = TelecomServer
|
||||||
wires-board-name-medicalscanner = MedicalScanner
|
wires-board-name-medicalscanner = MedicalScanner
|
||||||
wires-board-name-reclaimer = Reclaimer
|
wires-board-name-reclaimer = Reclaimer
|
||||||
|
wires-board-name-recharger = Recharger
|
||||||
wires-board-name-minigravitygenerator = MiniGravityGenerator
|
wires-board-name-minigravitygenerator = MiniGravityGenerator
|
||||||
wires-board-name-dawinstrument = DawInstrument
|
wires-board-name-dawinstrument = DawInstrument
|
||||||
wires-board-name-airlock = Airlock Control
|
wires-board-name-airlock = Airlock Control
|
||||||
|
|||||||
@@ -72,8 +72,27 @@
|
|||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Structures/Power/cell_recharger.rsi
|
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
|
- type: Machine
|
||||||
board: CellRechargerCircuitboard
|
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
|
- type: PowerCellSlot
|
||||||
cellSlotId: charger_slot
|
cellSlotId: charger_slot
|
||||||
# fitsInCharger is true i dont think this will ever affect anything negatively but it lets it function
|
# fitsInCharger is true i dont think this will ever affect anything negatively but it lets it function
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 298 B |
@@ -5,7 +5,7 @@
|
|||||||
"y": 32
|
"y": 32
|
||||||
},
|
},
|
||||||
"license": "CC-BY-SA-3.0",
|
"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": [
|
"states": [
|
||||||
{
|
{
|
||||||
"name": "potato"
|
"name": "potato"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 582 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 121 B |
@@ -5,7 +5,7 @@
|
|||||||
"y": 32
|
"y": 32
|
||||||
},
|
},
|
||||||
"license": "CC-BY-SA-3.0",
|
"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": [
|
"states": [
|
||||||
{
|
{
|
||||||
"name": "light-off"
|
"name": "light-off"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 148 B |