3 const float DEFAULT_STRUGGLE_TIME = 2;
5 override void CreateActionComponent()
7 float time = DEFAULT_STRUGGLE_TIME;
9 if ( m_ActionData.m_MainItem.ConfigIsExisting(
"StruggleLength") )
11 time = m_ActionData.m_MainItem.ConfigGetFloat(
"StruggleLength");
15 if ( m_ActionData.m_Player.IsQuickRestrain() )
24 override void EndActionComponent()
31 else if (m_ActionData.m_State ==
UA_CANCEL )
58 override void CreateConditionComponents()
66 return player.IsRestrained();
69 override bool HasProneException()
74 override bool HasTarget()
79 override void OnEndAnimationLoopServer(
ActionData action_data )
85 override void OnFinishProgressServer(
ActionData action_data )
88 EntityAI item_in_hands = action_data.m_MainItem;
92 if (item_in_hands.IsInherited(BarbedWireLocked))
94 int randNum =
Math.RandomInt(0, 3);
95 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
PlayerBase.m_BleedingSourcesUp[randNum]);
97 player.SetRestrained(
false);
98 item_in_hands.AddHealth(-
GameConstants.CLEAN_UNRESTRAIN_DAMAGE);
99 MiscGameplayFunctions.TransformRestrainItem(item_in_hands,
null,
null, player);
105 override bool CanBeUsedInRestrain()