diff --git a/Content.Server/Body/Systems/BodySystem.cs b/Content.Server/Body/Systems/BodySystem.cs index 31d43f00ff..aa9fd4dd91 100644 --- a/Content.Server/Body/Systems/BodySystem.cs +++ b/Content.Server/Body/Systems/BodySystem.cs @@ -10,6 +10,7 @@ using Content.Shared.Body.Organ; using Content.Shared.Body.Part; using Content.Shared.Body.Systems; using Content.Shared.Humanoid; +using Content.Shared.Kitchen.Components; using Content.Shared.Mind; using Content.Shared.Mobs.Systems; using Content.Shared.Movement.Events; @@ -29,7 +30,9 @@ public sealed class BodySystem : SharedBodySystem [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly MindSystem _mindSystem = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + [Dependency] private readonly SharedMindSystem _mindSystem = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; public override void Initialize() { @@ -127,7 +130,8 @@ public sealed class BodySystem : SharedBodySystem return; // Don't microwave animals, kids - Transform(uid).AttachToGridOrMap(); + _transform.AttachToGridOrMap(uid); + _appearance.SetData(args.Microwave, MicrowaveVisualState.Bloody, true); GibBody(uid, false, component); args.Handled = true; diff --git a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs index fe8064381b..41a32775d9 100644 --- a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -297,10 +297,12 @@ namespace Content.Server.Kitchen.EntitySystems )); } - public void SetAppearance(EntityUid uid, MicrowaveVisualState state, MicrowaveComponent component) + public void SetAppearance(EntityUid uid, MicrowaveVisualState state, MicrowaveComponent? component = null, AppearanceComponent? appearanceComponent = null) { + if (!Resolve(uid, ref component, ref appearanceComponent, false)) + return; var display = component.Broken ? MicrowaveVisualState.Broken : state; - _appearance.SetData(uid, PowerDeviceVisuals.VisualState, display); + _appearance.SetData(uid, PowerDeviceVisuals.VisualState, display, appearanceComponent); } public static bool HasContents(MicrowaveComponent component) diff --git a/Content.Shared/Kitchen/Components/SharedMicrowave.cs b/Content.Shared/Kitchen/Components/SharedMicrowave.cs index 6a5c10efa5..c625987ae7 100644 --- a/Content.Shared/Kitchen/Components/SharedMicrowave.cs +++ b/Content.Shared/Kitchen/Components/SharedMicrowave.cs @@ -70,7 +70,8 @@ namespace Content.Shared.Kitchen.Components { Idle, Cooking, - Broken + Broken, + Bloody } [NetSerializable, Serializable] diff --git a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml index 38e123870d..48ac7c3393 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml @@ -8,6 +8,13 @@ - type: Appearance - type: GenericVisualizer visuals: + enum.MicrowaveVisualState.Bloody: + bloody: + True: { visible: true } + False: { visible: false } + bloodyunshaded: + True: { visible: true } + False: { visible: false } enum.PowerDeviceVisuals.VisualState: enum.MicrowaveVisualizerLayers.Base: Idle: { state: "mw" } @@ -17,6 +24,9 @@ Idle: { state: "mw_unlit" } Broken: { state: "mw_unlit" } Cooking: { state: "mw_running_unlit" } + bloodyunshaded: + Idle: { visible: false } + Broken: { visible: false } enum.PowerDeviceVisuals.Powered: enum.MicrowaveVisualizerLayers.BaseUnlit: True: { visible: true } @@ -49,6 +59,13 @@ - state: mw_unlit shader: unshaded map: ["enum.MicrowaveVisualizerLayers.BaseUnlit"] + - state: mwbloody0 + map: ["bloody"] + visible: false + - state: mwbloody1 + shader: unshaded + map: ["bloodyunshaded"] + visible: false - type: Destructible thresholds: - trigger: diff --git a/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody0.png b/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody0.png index 3bd4401547..a51302a253 100644 Binary files a/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody0.png and b/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody0.png differ diff --git a/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody1.png b/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody1.png index 8136ad7a96..8cfdf34281 100644 Binary files a/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody1.png and b/Resources/Textures/Structures/Machines/microwave.rsi/mwbloody1.png differ