make PacifiedComponent session specific (#38137)
This commit is contained in:
@@ -17,33 +17,46 @@ namespace Content.Shared.CombatMode.Pacification;
|
|||||||
[Access(typeof(PacificationSystem))]
|
[Access(typeof(PacificationSystem))]
|
||||||
public sealed partial class PacifiedComponent : Component
|
public sealed partial class PacifiedComponent : Component
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// If true, this will prevent you from disarming opponents in combat.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool DisallowDisarm = false;
|
public bool DisallowDisarm = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool DisallowAllCombat = false;
|
public bool DisallowAllCombat = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When attempting attack against the same entity multiple times,
|
/// When attempting attack against the same entity multiple times,
|
||||||
/// don't spam popups every frame and instead have a cooldown.
|
/// don't spam popups every frame and instead have a cooldown.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public TimeSpan PopupCooldown = TimeSpan.FromSeconds(3.0);
|
public TimeSpan PopupCooldown = TimeSpan.FromSeconds(3.0);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Time at which the next popup can be shown.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
[AutoPausedField]
|
[AutoPausedField]
|
||||||
public TimeSpan? NextPopupTime = null;
|
public TimeSpan? NextPopupTime = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The last entity attacked, used for popup purposes (avoid spam)
|
/// The last entity attacked, used for popup purposes (avoid spam)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public EntityUid? LastAttackedEntity = null;
|
public EntityUid? LastAttackedEntity = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The alert to show to owners of this component.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public ProtoId<AlertPrototype> PacifiedAlert = "Pacified";
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user