Add disposals damage (#21489)
* system naming conventions * remove obsolete warnings * use EntityQueries * tube comp clean up * damage on turns * remove OnRelayMovement because it didn't work * reduce volume * reduce damage to 1.0
This commit is contained in:
@@ -1,30 +1,38 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Disposal.Unit.Components;
|
||||
using Content.Server.Disposal.Unit.EntitySystems;
|
||||
using Content.Shared.Construction.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Damage;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Containers;
|
||||
|
||||
namespace Content.Server.Disposal.Tube.Components
|
||||
namespace Content.Server.Disposal.Tube.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
[Access(typeof(DisposalTubeSystem), typeof(DisposableSystem))]
|
||||
public sealed partial class DisposalTubeComponent : Component
|
||||
{
|
||||
[RegisterComponent]
|
||||
[Access(typeof(DisposalTubeSystem), typeof(DisposableSystem))]
|
||||
public sealed partial class DisposalTubeComponent : Component
|
||||
[DataField]
|
||||
public string ContainerId = "DisposalTube";
|
||||
|
||||
[ViewVariables]
|
||||
public bool Connected;
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier ClangSound = new SoundPathSpecifier("/Audio/Effects/clang.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Container of entities that are currently inside this tube
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public Container Contents = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Damage dealt to containing entities on every turn
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public DamageSpecifier DamageOnTurn = new()
|
||||
{
|
||||
[DataField("containerId")] public string ContainerId { get; set; } = "DisposalTube";
|
||||
|
||||
public static readonly TimeSpan ClangDelay = TimeSpan.FromSeconds(0.5);
|
||||
public TimeSpan LastClang;
|
||||
|
||||
public bool Connected;
|
||||
[DataField("clangSound")] public SoundSpecifier ClangSound = new SoundPathSpecifier("/Audio/Effects/clang.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Container of entities that are currently inside this tube
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[Access(typeof(DisposalTubeSystem), typeof(DisposableSystem))]
|
||||
public Container Contents { get; set; } = default!;
|
||||
}
|
||||
DamageDict = new()
|
||||
{
|
||||
{ "Blunt", 1.0 },
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user