From 9cb1a669d6d24a8352e878215a2083a9ad705418 Mon Sep 17 00:00:00 2001
From: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Date: Sat, 7 Jun 2025 23:37:13 +0200
Subject: [PATCH] make PacifiedComponent session specific (#38137)
---
.../Pacification/PacifiedComponent.cs | 21 +++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/Content.Shared/CombatMode/Pacification/PacifiedComponent.cs b/Content.Shared/CombatMode/Pacification/PacifiedComponent.cs
index 96081e5dc6..1ec48dc213 100644
--- a/Content.Shared/CombatMode/Pacification/PacifiedComponent.cs
+++ b/Content.Shared/CombatMode/Pacification/PacifiedComponent.cs
@@ -17,33 +17,46 @@ namespace Content.Shared.CombatMode.Pacification;
[Access(typeof(PacificationSystem))]
public sealed partial class PacifiedComponent : Component
{
+ ///
+ /// If true, this will prevent you from disarming opponents in combat.
+ ///
[DataField]
public bool DisallowDisarm = false;
///
- /// If true, this will disable combat entirely instead of only disallowing attacking living creatures and harmful things.
+ /// If true, this will disable combat entirely instead of only disallowing attacking living creatures and harmful things.
///
[DataField]
public bool DisallowAllCombat = false;
///
- /// When attempting attack against the same entity multiple times,
- /// don't spam popups every frame and instead have a cooldown.
+ /// When attempting attack against the same entity multiple times,
+ /// don't spam popups every frame and instead have a cooldown.
///
[DataField]
public TimeSpan PopupCooldown = TimeSpan.FromSeconds(3.0);
+ ///
+ /// Time at which the next popup can be shown.
+ ///
[DataField]
[AutoPausedField]
public TimeSpan? NextPopupTime = null;
///
- /// The last entity attacked, used for popup purposes (avoid spam)
+ /// The last entity attacked, used for popup purposes (avoid spam)
///
[DataField]
public EntityUid? LastAttackedEntity = null;
+ ///
+ /// The alert to show to owners of this component.
+ ///
[DataField]
public ProtoId 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;
}