diff --git a/Content.Server/Body/Systems/BodySystem.cs b/Content.Server/Body/Systems/BodySystem.cs index 98c629218f..ea6e9d82d3 100644 --- a/Content.Server/Body/Systems/BodySystem.cs +++ b/Content.Server/Body/Systems/BodySystem.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.Body.Components; using Content.Server.GameTicking; +using Content.Server.Kitchen.Components; using Content.Server.Mind.Components; using Content.Shared.Body.Components; using Content.Shared.MobState.Components; @@ -19,6 +20,7 @@ namespace Content.Server.Body.Systems base.Initialize(); SubscribeLocalEvent(OnRelayMoveInput); SubscribeLocalEvent(OnApplyMetabolicMultiplier); + SubscribeLocalEvent(OnBeingMicrowaved); } private void OnRelayMoveInput(EntityUid uid, BodyComponent component, RelayMoveInputEvent args) @@ -46,6 +48,18 @@ namespace Content.Server.Body.Systems } } + private void OnBeingMicrowaved(EntityUid uid, BodyComponent component, BeingMicrowavedEvent args) + { + if (args.Handled) + return; + + // Don't microwave animals, kids + Transform(uid).AttachToGridOrMap(); + component.Gib(); + + args.Handled = true; + } + /// /// Returns a list of ValueTuples of and MechanismComponent on each mechanism /// in the given body. diff --git a/Content.Server/Kitchen/Components/MicrowaveComponent.cs b/Content.Server/Kitchen/Components/MicrowaveComponent.cs index ed84f8269c..2a1c15323d 100644 --- a/Content.Server/Kitchen/Components/MicrowaveComponent.cs +++ b/Content.Server/Kitchen/Components/MicrowaveComponent.cs @@ -211,7 +211,10 @@ namespace Content.Server.Kitchen.Components _entities.EventBus.RaiseLocalEvent(item, ev, false); if (ev.Handled) + { + UIDirty = true; return; + } var tagSys = EntitySystem.Get();