Files
wwdpublic/Content.Shared/Buckle/Components/StrapComponent.cs
Spatison bafdcfa459 Xenomorphs: Part 3 (#815)
* this is definitely one of the commits

* 1

* new facehuggers

* suffix

* Burst egg

* some fix

* Update Content.Server/_White/Xenomorphs/Queen/XenomorphQueenSystem.cs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update Content.Server/_White/Xenomorphs/Queen/XenomorphQueenSystem.cs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update Resources/Locale/en-US/_white/objectives/conditions/steal-target-groups.ftl

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update Content.Server/_White/Xenomorphs/FaceHugger/FaceHuggerSystem.cs

* Update Content.Server/_White/Xenomorphs/FaceHugger/FaceHuggerSystem.cs

* Update Resources/Locale/ru-RU/_white/prototypes/entities/mobs/player/pets.ftl

* Update Resources/Locale/ru-RU/WWDP_TRANSLATION/_white/prototypes/entities/structures/storage/glass_box.ftl

* Update Resources/Locale/ru-RU/_white/objectives/conditions/steal-target-groups.ftl

* Update Content.Server/_White/Xenomorphs/FaceHugger/FaceHuggerSystem.cs

* some fix

* SelfUnBuckleDelay

* Neurotoxin now stun

* PlasmaAmmoProvider

* some fix

* fix

* some number

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-30 22:40:47 +03:00

122 lines
3.2 KiB
C#

using System.Numerics;
using Content.Shared.Alert;
using Content.Shared.DoAfter;
using Content.Shared.Whitelist;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Buckle.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedBuckleSystem))]
public sealed partial class StrapComponent : Component
{
/// <summary>
/// The entities that are currently buckled to this strap.
/// </summary>
[ViewVariables, AutoNetworkedField]
public HashSet<EntityUid> BuckledEntities = new();
/// <summary>
/// Entities that this strap accepts and can buckle
/// If null it accepts any entity
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;
/// <summary>
/// Entities that this strap does not accept and cannot buckle.
/// </summary>
[DataField]
public EntityWhitelist? Blacklist;
/// <summary>
/// The change in position to the strapped mob
/// </summary>
[DataField, AutoNetworkedField]
public StrapPosition Position = StrapPosition.None;
/// <summary>
/// The buckled entity will be offset by this amount from the center of the strap object.
/// </summary>
[DataField, AutoNetworkedField]
public Vector2 BuckleOffset = Vector2.Zero;
/// <summary>
/// The angle to rotate the player by when they get strapped
/// </summary>
[DataField]
public Angle Rotation;
/// <summary>
/// The size of the strap which is compared against when buckling entities
/// </summary>
[DataField]
public int Size = 100;
/// <summary>
/// If disabled, nothing can be buckled on this object, and it will unbuckle anything that's already buckled
/// </summary>
[DataField, AutoNetworkedField]
public bool Enabled = true;
/// <summary>
/// The sound to be played when a mob is buckled
/// </summary>
[DataField]
public SoundSpecifier BuckleSound = new SoundPathSpecifier("/Audio/Effects/buckle.ogg");
/// <summary>
/// The sound to be played when a mob is unbuckled
/// </summary>
[DataField]
public SoundSpecifier UnbuckleSound = new SoundPathSpecifier("/Audio/Effects/unbuckle.ogg");
/// <summary>
/// ID of the alert to show when buckled
/// </summary>
[DataField]
public ProtoId<AlertPrototype> BuckledAlertType = "Buckled";
/// <summary>
/// Whether InteractHand will buckle the user to the strap.
/// </summary>
[DataField]
public bool BuckleOnInteractHand = true;
// WD EDIT START
/// <summary>
/// Delay, that must occur, before user can unbuckle
/// </summary>
[DataField]
public TimeSpan SelfUnBuckleDelay = TimeSpan.Zero;
// WD EDIT END
}
public enum StrapPosition
{
/// <summary>
/// (Default) Makes no change to the buckled mob
/// </summary>
None = 0,
/// <summary>
/// Makes the mob stand up
/// </summary>
Stand,
/// <summary>
/// Makes the mob lie down
/// </summary>
Down
}
[Serializable, NetSerializable]
public enum StrapVisuals : byte
{
RotationAngle,
State
}