Add power debug verbs (#14212)

This commit is contained in:
Leon Friedrich
2023-02-26 06:14:35 +13:00
committed by GitHub
parent 7430a3dba2
commit 2351bbb607
7 changed files with 85 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ using Robust.Shared.Containers;
using System.Diagnostics.CodeAnalysis;
using Content.Server.Kitchen.Components;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Rejuvenate;
namespace Content.Server.PowerCell;
@@ -29,6 +30,7 @@ public sealed class PowerCellSystem : SharedPowerCellSystem
SubscribeLocalEvent<PowerCellComponent, ChargeChangedEvent>(OnChargeChanged);
SubscribeLocalEvent<PowerCellComponent, SolutionChangedEvent>(OnSolutionChange);
SubscribeLocalEvent<PowerCellComponent, RejuvenateEvent>(OnRejuvenate);
SubscribeLocalEvent<PowerCellComponent, ExaminedEvent>(OnCellExamined);
@@ -37,6 +39,11 @@ public sealed class PowerCellSystem : SharedPowerCellSystem
SubscribeLocalEvent<BatteryComponent, BeingMicrowavedEvent>(OnMicrowaved);
}
private void OnRejuvenate(EntityUid uid, PowerCellComponent component, RejuvenateEvent args)
{
component.IsRigged = false;
}
private void OnSlotMicrowaved(EntityUid uid, PowerCellSlotComponent component, BeingMicrowavedEvent args)
{
if (_itemSlotsSystem.TryGetSlot(uid, component.CellSlotId, out ItemSlot? slot))