bloody microwaves (#19647)
This commit is contained in:
@@ -10,6 +10,7 @@ using Content.Shared.Body.Organ;
|
|||||||
using Content.Shared.Body.Part;
|
using Content.Shared.Body.Part;
|
||||||
using Content.Shared.Body.Systems;
|
using Content.Shared.Body.Systems;
|
||||||
using Content.Shared.Humanoid;
|
using Content.Shared.Humanoid;
|
||||||
|
using Content.Shared.Kitchen.Components;
|
||||||
using Content.Shared.Mind;
|
using Content.Shared.Mind;
|
||||||
using Content.Shared.Mobs.Systems;
|
using Content.Shared.Mobs.Systems;
|
||||||
using Content.Shared.Movement.Events;
|
using Content.Shared.Movement.Events;
|
||||||
@@ -29,7 +30,9 @@ public sealed class BodySystem : SharedBodySystem
|
|||||||
[Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
|
[Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
|
||||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||||
[Dependency] private readonly SharedAudioSystem _audio = 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()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -127,7 +130,8 @@ public sealed class BodySystem : SharedBodySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Don't microwave animals, kids
|
// Don't microwave animals, kids
|
||||||
Transform(uid).AttachToGridOrMap();
|
_transform.AttachToGridOrMap(uid);
|
||||||
|
_appearance.SetData(args.Microwave, MicrowaveVisualState.Bloody, true);
|
||||||
GibBody(uid, false, component);
|
GibBody(uid, false, component);
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
|
|||||||
@@ -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;
|
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)
|
public static bool HasContents(MicrowaveComponent component)
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ namespace Content.Shared.Kitchen.Components
|
|||||||
{
|
{
|
||||||
Idle,
|
Idle,
|
||||||
Cooking,
|
Cooking,
|
||||||
Broken
|
Broken,
|
||||||
|
Bloody
|
||||||
}
|
}
|
||||||
|
|
||||||
[NetSerializable, Serializable]
|
[NetSerializable, Serializable]
|
||||||
|
|||||||
@@ -8,6 +8,13 @@
|
|||||||
- type: Appearance
|
- type: Appearance
|
||||||
- type: GenericVisualizer
|
- type: GenericVisualizer
|
||||||
visuals:
|
visuals:
|
||||||
|
enum.MicrowaveVisualState.Bloody:
|
||||||
|
bloody:
|
||||||
|
True: { visible: true }
|
||||||
|
False: { visible: false }
|
||||||
|
bloodyunshaded:
|
||||||
|
True: { visible: true }
|
||||||
|
False: { visible: false }
|
||||||
enum.PowerDeviceVisuals.VisualState:
|
enum.PowerDeviceVisuals.VisualState:
|
||||||
enum.MicrowaveVisualizerLayers.Base:
|
enum.MicrowaveVisualizerLayers.Base:
|
||||||
Idle: { state: "mw" }
|
Idle: { state: "mw" }
|
||||||
@@ -17,6 +24,9 @@
|
|||||||
Idle: { state: "mw_unlit" }
|
Idle: { state: "mw_unlit" }
|
||||||
Broken: { state: "mw_unlit" }
|
Broken: { state: "mw_unlit" }
|
||||||
Cooking: { state: "mw_running_unlit" }
|
Cooking: { state: "mw_running_unlit" }
|
||||||
|
bloodyunshaded:
|
||||||
|
Idle: { visible: false }
|
||||||
|
Broken: { visible: false }
|
||||||
enum.PowerDeviceVisuals.Powered:
|
enum.PowerDeviceVisuals.Powered:
|
||||||
enum.MicrowaveVisualizerLayers.BaseUnlit:
|
enum.MicrowaveVisualizerLayers.BaseUnlit:
|
||||||
True: { visible: true }
|
True: { visible: true }
|
||||||
@@ -49,6 +59,13 @@
|
|||||||
- state: mw_unlit
|
- state: mw_unlit
|
||||||
shader: unshaded
|
shader: unshaded
|
||||||
map: ["enum.MicrowaveVisualizerLayers.BaseUnlit"]
|
map: ["enum.MicrowaveVisualizerLayers.BaseUnlit"]
|
||||||
|
- state: mwbloody0
|
||||||
|
map: ["bloody"]
|
||||||
|
visible: false
|
||||||
|
- state: mwbloody1
|
||||||
|
shader: unshaded
|
||||||
|
map: ["bloodyunshaded"]
|
||||||
|
visible: false
|
||||||
- type: Destructible
|
- type: Destructible
|
||||||
thresholds:
|
thresholds:
|
||||||
- trigger:
|
- trigger:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 268 B |
Binary file not shown.
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 230 B |
Reference in New Issue
Block a user