Make FireExtinguisher shared (#11666)

This commit is contained in:
Morb
2022-10-04 04:06:19 +03:00
committed by GitHub
parent 3babdff1de
commit 4a736f2c8f
3 changed files with 32 additions and 17 deletions

View File

@@ -0,0 +1,9 @@
using Content.Shared.Extinguisher;
using Robust.Shared.GameStates;
namespace Content.Client.Extinguisher;
[NetworkedComponent, RegisterComponent]
public sealed class FireExtinguisherComponent : SharedFireExtinguisherComponent
{
}

View File

@@ -1,17 +1,10 @@
using Robust.Shared.Audio; using Content.Shared.Extinguisher;
using Robust.Shared.GameStates;
namespace Content.Server.Extinguisher; namespace Content.Server.Extinguisher;
[RegisterComponent] [NetworkedComponent, RegisterComponent]
[Access(typeof(FireExtinguisherSystem))] [Access(typeof(FireExtinguisherSystem))]
public sealed class FireExtinguisherComponent : Component public sealed class FireExtinguisherComponent : SharedFireExtinguisherComponent
{ {
[DataField("refillSound")] public SoundSpecifier RefillSound = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
[DataField("hasSafety")] public bool HasSafety = true;
[DataField("safety")] public bool Safety = true;
[DataField("safetySound")]
public SoundSpecifier SafetySound { get; } = new SoundPathSpecifier("/Audio/Machines/button.ogg");
} }

View File

@@ -1,10 +1,23 @@
using Robust.Shared.Audio;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Shared.Extinguisher namespace Content.Shared.Extinguisher;
public abstract class SharedFireExtinguisherComponent : Component
{ {
[Serializable, NetSerializable] [DataField("refillSound")] public SoundSpecifier RefillSound = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
public enum FireExtinguisherVisuals : byte
{ [DataField("hasSafety")] public bool HasSafety = true;
Safety
} [DataField("safety")] public bool Safety = true;
[DataField("safetySound")]
public SoundSpecifier SafetySound { get; } = new SoundPathSpecifier("/Audio/Machines/button.ogg");
}
[Serializable, NetSerializable]
public enum FireExtinguisherVisuals : byte
{
Safety
} }