9 override void ApplyEffect(notnull IEntity target, notnull IEntity user, IEntity item,
ItemUseParameters animParams)
11 super.ApplyEffect(target, user, item, animParams);
13 ChimeraCharacter
char = ChimeraCharacter.Cast(target);
21 m_eTargetHZGroup = damageMgr.FindAssociatedHitZoneGroup(animParams.GetIntParam());
26 Print(
"SCR_TourniquetStorageComponent missing", LogLevel.ERROR);
30 tqStorageComp.AddTourniquetToSlot(target, m_eTargetHZGroup, item);
34 override bool CanApplyEffect(notnull IEntity target, notnull IEntity user, out SCR_EConsumableFailReason failReason = SCR_EConsumableFailReason.NONE)
36 ChimeraCharacter
char = ChimeraCharacter.Cast(target);
41 if (!damageMgr || !damageMgr.IsDamagedOverTime(
EDamageType.BLEEDING))
44 return damageMgr.GetCharMostDOTHitzoneGroup(
EDamageType.BLEEDING,
true,
true);
48 override bool CanApplyEffectToHZ(notnull IEntity target, notnull IEntity user,
ECharacterHitZoneGroup group, out SCR_EConsumableFailReason failReason = SCR_EConsumableFailReason.NONE)
50 ChimeraCharacter
char = ChimeraCharacter.Cast(target);
58 array<ECharacterHitZoneGroup> limbs = {};
59 damageMgr.GetAllExtremities(limbs);
61 if (!limbs.Contains(group))
64 if (damageMgr.GetGroupTourniquetted(group))
66 failReason = SCR_EConsumableFailReason.ALREADY_APPLIED;
70 if (damageMgr.GetGroupDamageOverTime(group,
EDamageType.BLEEDING) > 0)
73 failReason = SCR_EConsumableFailReason.NOT_BLEEDING;
80 ChimeraCharacter
char = ChimeraCharacter.Cast(target);
92 if (!damageMgr.GetGroupIsBeingHealed(group))
93 bodyPartToBandage = damageMgr.FindAssociatedBandagingBodyPart(group);
97 group = damageMgr.GetCharMostDOTHitzoneGroup(
EDamageType.BLEEDING,
true,
true,
true);
101 array<HitZone> groupHitZones = {};
102 damageMgr.GetHitZonesOfGroup(group, groupHitZones);
108 bodyPartToBandage = charHitZone.GetBodyPartToHeal();
116 params.SetAllowMovementDuringAction(
false);
117 params.SetKeepInHandAfterSuccess(
false);
118 params.SetCommandID(GetApplyToSelfAnimCmnd(target));
119 params.SetCommandIntArg(1);
120 params.SetCommandFloatArg(0.0);
121 params.SetMaxAnimLength(m_fApplyToSelfDuration);
122 params.SetIntParam(bodyPartToBandage);
131 return m_eTargetHZGroup;