mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
parent
689072e629
commit
cb8cee5ea3
2 changed files with 4 additions and 7 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue