diff --git a/Content.Server/Damage/Components/DamagePopupComponent.cs b/Content.Server/Damage/Components/DamagePopupComponent.cs
index b1216069f5..37c5d57cf4 100644
--- a/Content.Server/Damage/Components/DamagePopupComponent.cs
+++ b/Content.Server/Damage/Components/DamagePopupComponent.cs
@@ -5,6 +5,11 @@ namespace Content.Server.Damage.Components;
[RegisterComponent, Access(typeof(DamagePopupSystem))]
public sealed partial class DamagePopupComponent : Component
{
+ ///
+ /// Bool that will be used to determine if the popup type can be changed with a left click.
+ ///
+ [DataField("allowTypeChange")] [ViewVariables(VVAccess.ReadWrite)]
+ public bool AllowTypeChange = false;
///
/// Enum that will be used to determine the type of damage popup displayed.
///
diff --git a/Content.Server/Damage/Systems/DamagePopupSystem.cs b/Content.Server/Damage/Systems/DamagePopupSystem.cs
index 12fd894ac6..3386c92129 100644
--- a/Content.Server/Damage/Systems/DamagePopupSystem.cs
+++ b/Content.Server/Damage/Systems/DamagePopupSystem.cs
@@ -1,7 +1,8 @@
+using System.Linq;
using Content.Server.Damage.Components;
using Content.Server.Popups;
using Content.Shared.Damage;
-using Robust.Shared.Player;
+using Content.Shared.Interaction;
namespace Content.Server.Damage.Systems;
@@ -13,6 +14,7 @@ public sealed class DamagePopupSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent(OnDamageChange);
+ SubscribeLocalEvent(OnInteractHand);
}
private void OnDamageChange(EntityUid uid, DamagePopupComponent component, DamageChangedEvent args)
@@ -33,4 +35,20 @@ public sealed class DamagePopupSystem : EntitySystem
_popupSystem.PopupEntity(msg, uid);
}
}
+
+ private void OnInteractHand(EntityUid uid, DamagePopupComponent component, InteractHandEvent args)
+ {
+ if (component.AllowTypeChange)
+ {
+ if (component.Type == Enum.GetValues(typeof(DamagePopupType)).Cast().Last())
+ {
+ component.Type = Enum.GetValues(typeof(DamagePopupType)).Cast().First();
+ }
+ else
+ {
+ component.Type = (DamagePopupType) (int) component.Type + 1;
+ }
+ _popupSystem.PopupEntity("Target set to type: " + component.Type.ToString(), uid);
+ }
+ }
}
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml b/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml
index adbb7cde40..a17c892169 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Security/target.yml
@@ -9,6 +9,7 @@
noRot: true
- type: Repairable
- type: DamagePopup
+ allowTypeChange: true
damagePopupType: Combined
- type: Fixtures
fixtures: