Morgue system refactor remove unused VVs and into Entity (#31835)
* Remove unused VVs params and usings from entityUid, MorgueComponent into Entity<MorgueComponent> ent * remove unnecesary VVs cuz datafields add em
This commit is contained in:
@@ -3,8 +3,6 @@ using Content.Shared.Body.Components;
|
|||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Content.Shared.Morgue;
|
using Content.Shared.Morgue;
|
||||||
using Content.Shared.Morgue.Components;
|
using Content.Shared.Morgue.Components;
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
using Robust.Shared.Audio;
|
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
@@ -25,12 +23,12 @@ public sealed class MorgueSystem : EntitySystem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles the examination text for looking at a morgue.
|
/// Handles the examination text for looking at a morgue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnExamine(EntityUid uid, MorgueComponent component, ExaminedEvent args)
|
private void OnExamine(Entity<MorgueComponent> ent, ref ExaminedEvent args)
|
||||||
{
|
{
|
||||||
if (!args.IsInDetailsRange)
|
if (!args.IsInDetailsRange)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_appearance.TryGetData<MorgueContents>(uid, MorgueVisuals.Contents, out var contents);
|
_appearance.TryGetData<MorgueContents>(ent.Owner, MorgueVisuals.Contents, out var contents);
|
||||||
|
|
||||||
var text = contents switch
|
var text = contents switch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,19 +9,18 @@ public sealed partial class MorgueComponent : Component
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not the morgue beeps if a living player is inside.
|
/// Whether or not the morgue beeps if a living player is inside.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[DataField]
|
||||||
[DataField("doSoulBeep")]
|
|
||||||
public bool DoSoulBeep = true;
|
public bool DoSoulBeep = true;
|
||||||
|
|
||||||
[ViewVariables]
|
[DataField]
|
||||||
public float AccumulatedFrameTime = 0f;
|
public float AccumulatedFrameTime = 0f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The amount of time between each beep.
|
/// The amount of time between each beep.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[DataField]
|
||||||
public float BeepTime = 10f;
|
public float BeepTime = 10f;
|
||||||
|
|
||||||
[DataField("occupantHasSoulAlarmSound")]
|
[DataField]
|
||||||
public SoundSpecifier OccupantHasSoulAlarmSound = new SoundPathSpecifier("/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg");
|
public SoundSpecifier OccupantHasSoulAlarmSound = new SoundPathSpecifier("/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user