Cleanup DangerousAction (#44825)

cleanup
This commit is contained in:
beck-thompson 2026-07-21 00:37:37 -07:00 • committed by GitHub
parent 689072e629
commit cb8cee5ea3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 7 deletions

View file

@ -10,5 +10,5 @@ namespace Content.Shared.Actions.Components;
public sealed partial class DangerousActionComponent : Component
{
[DataField]
public string PacificationMessage { get; set; } = "dangerous-action-popup";
public LocId PacificationMessage = "dangerous-action-popup";
}

View file

@ -4,10 +4,7 @@ using Content.Shared.CombatMode.Pacification;
using Content.Shared.Popups;
namespace Content.Shared.Actions;
/// <summary>
/// Just the system to realize Dangerous Action Component.
/// <seealso cref="DangerousActionComponent"/>
/// </summary>
public sealed partial class DangerousActionSystem : EntitySystem
{
[Dependency] private SharedPopupSystem _popup = default!;
@ -23,10 +20,10 @@ public sealed partial class DangerousActionSystem : EntitySystem
{
if (args.Cancelled)
return;
//query for pacification
if (!_pacifiedQuery.HasComp(args.User))
return;
//if found popup message and cancel
_popup.PopupEntity(Loc.GetString(ent.Comp.PacificationMessage), args.User, args.User);
args.Cancelled = true;
}