2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Act;
|
|
|
|
|
using Content.Server.Chat.Managers;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-10-07 13:01:27 +02:00
|
|
|
using Content.Shared.Tools;
|
2021-01-20 10:02:34 +03:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-10-07 13:01:27 +02:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2021-01-20 10:02:34 +03:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Toilet
|
2021-01-20 10:02:34 +03:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2021-12-21 13:07:17 +03:00
|
|
|
public sealed class ToiletComponent : Component, ISuicideAct
|
2021-01-20 10:02:34 +03:00
|
|
|
{
|
2021-12-21 13:07:17 +03:00
|
|
|
[DataField("pryLidTime")]
|
|
|
|
|
public float PryLidTime = 1f;
|
2021-01-20 10:02:34 +03:00
|
|
|
|
2021-10-07 13:01:27 +02:00
|
|
|
[DataField("pryingQuality", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
|
2021-12-21 13:07:17 +03:00
|
|
|
public string PryingQuality = "Prying";
|
2021-01-20 10:02:34 +03:00
|
|
|
|
2021-12-21 13:07:17 +03:00
|
|
|
[DataField("toggleSound")]
|
|
|
|
|
public SoundSpecifier ToggleSound = new SoundPathSpecifier("/Audio/Effects/toilet_seat_down.ogg");
|
2021-01-20 10:02:34 +03:00
|
|
|
|
2021-12-21 13:07:17 +03:00
|
|
|
public bool LidOpen = false;
|
|
|
|
|
public bool IsSeatUp = false;
|
|
|
|
|
public bool IsPrying = false;
|
2021-01-20 10:02:34 +03:00
|
|
|
|
2021-12-21 13:07:17 +03:00
|
|
|
// todo: move me to ECS
|
2021-12-05 18:09:01 +01:00
|
|
|
SuicideKind ISuicideAct.Suicide(EntityUid victim, IChatManager chat)
|
2021-01-20 10:02:34 +03:00
|
|
|
{
|
2021-12-21 13:07:17 +03:00
|
|
|
return EntitySystem.Get<ToiletSystem>().Suicide(Owner, victim, this);
|
2021-01-20 10:02:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|