make PacifiedComponent session specific (#38137)

This commit is contained in:
slarticodefast
2025-06-07 23:37:13 +02:00
committed by GitHub
parent 5f4e55e583
commit 9cb1a669d6

View File

@@ -17,6 +17,9 @@ namespace Content.Shared.CombatMode.Pacification;
[Access(typeof(PacificationSystem))]
public sealed partial class PacifiedComponent : Component
{
/// <summary>
/// If true, this will prevent you from disarming opponents in combat.
/// </summary>
[DataField]
public bool DisallowDisarm = false;
@@ -34,6 +37,9 @@ public sealed partial class PacifiedComponent : Component
[DataField]
public TimeSpan PopupCooldown = TimeSpan.FromSeconds(3.0);
/// <summary>
/// Time at which the next popup can be shown.
/// </summary>
[DataField]
[AutoPausedField]
public TimeSpan? NextPopupTime = null;
@@ -44,6 +50,13 @@ public sealed partial class PacifiedComponent : Component
[DataField]
public EntityUid? LastAttackedEntity = null;
/// <summary>
/// The alert to show to owners of this component.
/// </summary>
[DataField]
public ProtoId<AlertPrototype> PacifiedAlert = "Pacified";
// Prevent cheat clients from using this to identify thieves and players that cannot fight back.
// This should not matter for prediction reasons since it only blocks user input.
public override bool SendOnlyToOwner => true;
}