Microwave rework (#6470)
This commit is contained in:
@@ -13,6 +13,7 @@ using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Server.Kitchen.Components;
|
||||
|
||||
namespace Content.Server.PowerCell;
|
||||
|
||||
@@ -31,6 +32,26 @@ public class PowerCellSystem : SharedPowerCellSystem
|
||||
SubscribeLocalEvent<PowerCellComponent, SolutionChangedEvent>(OnSolutionChange);
|
||||
|
||||
SubscribeLocalEvent<PowerCellComponent, ExaminedEvent>(OnCellExamined);
|
||||
|
||||
// funny
|
||||
SubscribeLocalEvent<PowerCellSlotComponent, BeingMicrowavedEvent>(OnSlotMicrowaved);
|
||||
SubscribeLocalEvent<BatteryComponent, BeingMicrowavedEvent>(OnMicrowaved);
|
||||
}
|
||||
|
||||
private void OnSlotMicrowaved(EntityUid uid, PowerCellSlotComponent component, BeingMicrowavedEvent args)
|
||||
{
|
||||
if (component.CellSlot.Item == null)
|
||||
return;
|
||||
|
||||
RaiseLocalEvent(component.CellSlot.Item.Value, args, false);
|
||||
}
|
||||
|
||||
private void OnMicrowaved(EntityUid uid, BatteryComponent component, BeingMicrowavedEvent args)
|
||||
{
|
||||
args.Handled = true;
|
||||
|
||||
// What the fuck are you doing???
|
||||
Explode(uid, component);
|
||||
}
|
||||
|
||||
private void OnChargeChanged(EntityUid uid, PowerCellComponent component, ChargeChangedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user