From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Thu, 11 Jan 2024 06:06:01 +0000 (-0500) Subject: machine parts + power cell resprite (#23913) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=b3014e6cb33cecb6796c3002385d862d581e2762;p=space-station-14.git machine parts + power cell resprite (#23913) * machine parts + power cell resprite * logic fix --- diff --git a/Content.Server/Power/EntitySystems/ChargerSystem.cs b/Content.Server/Power/EntitySystems/ChargerSystem.cs index 7926e1a84d..6feba0d52a 100644 --- a/Content.Server/Power/EntitySystems/ChargerSystem.cs +++ b/Content.Server/Power/EntitySystems/ChargerSystem.cs @@ -115,13 +115,14 @@ internal sealed class ChargerSystem : EntitySystem 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; @@ -155,8 +156,6 @@ internal sealed class ChargerSystem : EntitySystem default: throw new ArgumentOutOfRangeException(); } - - _appearance.SetData(uid, CellVisual.Occupied, container.ContainedEntities.Count != 0, appearance); } private CellChargerStatus GetStatus(EntityUid uid, ChargerComponent component) diff --git a/Resources/Locale/en-US/wires/wire-names.ftl b/Resources/Locale/en-US/wires/wire-names.ftl index 041d07d130..16a4ede6b1 100644 --- a/Resources/Locale/en-US/wires/wire-names.ftl +++ b/Resources/Locale/en-US/wires/wire-names.ftl @@ -29,6 +29,7 @@ wires-board-name-hydroponicstray = HydroponicsTray 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 diff --git a/Resources/Prototypes/Entities/Structures/Power/chargers.yml b/Resources/Prototypes/Entities/Structures/Power/chargers.yml index 1a9fc6f87f..f9ea39b63f 100644 --- a/Resources/Prototypes/Entities/Structures/Power/chargers.yml +++ b/Resources/Prototypes/Entities/Structures/Power/chargers.yml @@ -72,8 +72,27 @@ 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 diff --git a/Resources/Textures/Objects/Misc/stock_parts.rsi/capacitor.png b/Resources/Textures/Objects/Misc/stock_parts.rsi/capacitor.png index 548d47b78f..305087c37b 100644 Binary files a/Resources/Textures/Objects/Misc/stock_parts.rsi/capacitor.png and b/Resources/Textures/Objects/Misc/stock_parts.rsi/capacitor.png differ diff --git a/Resources/Textures/Objects/Misc/stock_parts.rsi/matter_bin.png b/Resources/Textures/Objects/Misc/stock_parts.rsi/matter_bin.png index 1e0d4f8618..bf30fab981 100644 Binary files a/Resources/Textures/Objects/Misc/stock_parts.rsi/matter_bin.png and b/Resources/Textures/Objects/Misc/stock_parts.rsi/matter_bin.png differ diff --git a/Resources/Textures/Objects/Misc/stock_parts.rsi/micro_mani.png b/Resources/Textures/Objects/Misc/stock_parts.rsi/micro_mani.png index 118f810d73..b67ee6be52 100644 Binary files a/Resources/Textures/Objects/Misc/stock_parts.rsi/micro_mani.png and b/Resources/Textures/Objects/Misc/stock_parts.rsi/micro_mani.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/antique.png b/Resources/Textures/Objects/Power/power_cells.rsi/antique.png index e8fbf6f287..3c0616cc21 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/antique.png and b/Resources/Textures/Objects/Power/power_cells.rsi/antique.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/high.png b/Resources/Textures/Objects/Power/power_cells.rsi/high.png index 966d10dcab..ad426aab85 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/high.png and b/Resources/Textures/Objects/Power/power_cells.rsi/high.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/hyper.png b/Resources/Textures/Objects/Power/power_cells.rsi/hyper.png index c2af41fc06..6a3a53c69b 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/hyper.png and b/Resources/Textures/Objects/Power/power_cells.rsi/hyper.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/medium.png b/Resources/Textures/Objects/Power/power_cells.rsi/medium.png index f231a622a7..baabc8510a 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/medium.png and b/Resources/Textures/Objects/Power/power_cells.rsi/medium.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/meta.json b/Resources/Textures/Objects/Power/power_cells.rsi/meta.json index 66dbf30841..6ed575b6f0 100644 --- a/Resources/Textures/Objects/Power/power_cells.rsi/meta.json +++ b/Resources/Textures/Objects/Power/power_cells.rsi/meta.json @@ -5,7 +5,7 @@ "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" diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/microreactor.png b/Resources/Textures/Objects/Power/power_cells.rsi/microreactor.png index d9e0f6d59f..5177c9aa89 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/microreactor.png and b/Resources/Textures/Objects/Power/power_cells.rsi/microreactor.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/o1.png b/Resources/Textures/Objects/Power/power_cells.rsi/o1.png index 7d28199193..348baff449 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/o1.png and b/Resources/Textures/Objects/Power/power_cells.rsi/o1.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/o2.png b/Resources/Textures/Objects/Power/power_cells.rsi/o2.png index 33c2be42d7..504d64fa70 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/o2.png and b/Resources/Textures/Objects/Power/power_cells.rsi/o2.png differ diff --git a/Resources/Textures/Objects/Power/power_cells.rsi/small.png b/Resources/Textures/Objects/Power/power_cells.rsi/small.png index 32feddb0da..854d0053b0 100644 Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/small.png and b/Resources/Textures/Objects/Power/power_cells.rsi/small.png differ diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/empty.png b/Resources/Textures/Structures/Power/cell_recharger.rsi/empty.png index e3d7f1dbd1..b78ee8ee5c 100644 Binary files a/Resources/Textures/Structures/Power/cell_recharger.rsi/empty.png and b/Resources/Textures/Structures/Power/cell_recharger.rsi/empty.png differ diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/full.png b/Resources/Textures/Structures/Power/cell_recharger.rsi/full.png index 6f0256e3f1..c133fd30e3 100644 Binary files a/Resources/Textures/Structures/Power/cell_recharger.rsi/full.png and b/Resources/Textures/Structures/Power/cell_recharger.rsi/full.png differ diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charged.png b/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charged.png index c12582f36e..03b9ffcef6 100644 Binary files a/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charged.png and b/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charged.png differ diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charging.png b/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charging.png index d11d1d8f12..15011fda1c 100644 Binary files a/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charging.png and b/Resources/Textures/Structures/Power/cell_recharger.rsi/light-charging.png differ diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/light-empty.png b/Resources/Textures/Structures/Power/cell_recharger.rsi/light-empty.png index 3480c524fb..82f905fdd9 100644 Binary files a/Resources/Textures/Structures/Power/cell_recharger.rsi/light-empty.png and b/Resources/Textures/Structures/Power/cell_recharger.rsi/light-empty.png differ diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/meta.json b/Resources/Textures/Structures/Power/cell_recharger.rsi/meta.json index 8f449561ca..42ad3ab990 100644 --- a/Resources/Textures/Structures/Power/cell_recharger.rsi/meta.json +++ b/Resources/Textures/Structures/Power/cell_recharger.rsi/meta.json @@ -5,7 +5,7 @@ "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" diff --git a/Resources/Textures/Structures/Power/cell_recharger.rsi/open.png b/Resources/Textures/Structures/Power/cell_recharger.rsi/open.png index 059bf3abc2..139296e180 100644 Binary files a/Resources/Textures/Structures/Power/cell_recharger.rsi/open.png and b/Resources/Textures/Structures/Power/cell_recharger.rsi/open.png differ