Added Pain Numbness Trait (#34538)
* added pain-numbness component and system * added numb as a trait that pulls the pain numbness component * removed new event as mob threshold event as already being fired * checked for MobThresholdsComponent first before running VerifyThresholds * refacted force say to using LocalizedDatasetPrototype and added numb messages * added severity check alert * added comment for BeforeForceSayEvent * removed space formatting * changed Cancelled to CancelUpdate, fixed spacing and added two more damage-force-say-numb * changed prefix damage-force-say-numb to 5 (whoops)
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Traits.Assorted;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
@@ -94,7 +95,11 @@ public sealed class DamageOverlayUiController : UIController
|
||||
{
|
||||
case MobState.Alive:
|
||||
{
|
||||
if (damageable.DamagePerGroup.TryGetValue("Brute", out var bruteDamage))
|
||||
if (EntityManager.HasComponent<PainNumbnessComponent>(entity))
|
||||
{
|
||||
_overlay.BruteLevel = 0;
|
||||
}
|
||||
else if (damageable.DamagePerGroup.TryGetValue("Brute", out var bruteDamage))
|
||||
{
|
||||
_overlay.BruteLevel = FixedPoint2.Min(1f, bruteDamage / critThreshold).Float();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user