From 77e1967bc5cd6bb6dbc0ddbb9cef8aeeeaf44696 Mon Sep 17 00:00:00 2001 From: Rinary Date: Fri, 1 Nov 2024 16:57:44 +0200 Subject: [PATCH] upd --- Content.Server/_Sunrise/Synth/SynthSystem.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/_Sunrise/Synth/SynthSystem.cs b/Content.Server/_Sunrise/Synth/SynthSystem.cs index f40522a13b7..84a92d4b3e1 100644 --- a/Content.Server/_Sunrise/Synth/SynthSystem.cs +++ b/Content.Server/_Sunrise/Synth/SynthSystem.cs @@ -229,10 +229,10 @@ private void OnDrain(EntityUid uid, EntityUid user, SynthComponent component) _doAfter.TryStartDoAfter(doAfterArgs); } - private bool TryGetBattery(EntityUid uid, [NotNullWhen(true)] out EntityUid? powercell, [NotNullWhen(true)] out PowerCellComponent? powercellComponent) + private bool TryGetBattery(EntityUid uid, [NotNullWhen(true)] out EntityUid? powercell, [NotNullWhen(true)] out BatteryComponent? batteryComponent) { powercell = null; - powercellComponent = null; + batteryComponent = null; var bodyContainers = _bodySystem.GetBodyContainers(uid); @@ -240,10 +240,10 @@ private bool TryGetBattery(EntityUid uid, [NotNullWhen(true)] out EntityUid? po { foreach (var content in container.ContainedEntities) { - if (TryComp(content, out var PowerCellComp)) + if (HasComp(content) && TryComp(content, out var BatteryComp)) { powercell = content; - powercellComponent = PowerCellComp; + batteryComponent = BatteryComp; return true; }