Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionManagerClient
+ Граф наследования:ActionManagerClient:

Защищенные члены

void ActionManagerClient (PlayerBase player)
 
override void Update (int pCurrentCommandID)
 
void RegisterInputs (PlayerBase player)
 
void SetActioninputOrder ()
 
void SetDefaultInputsOrder ()
 
override void RequestEndAction ()
 
override void EndActionInput ()
 
void InputsUpdate ()
 
void ProcessActionRequestEnd ()
 
void ProcessActionInputEnd ()
 
ActionBase GetPossibleAction (typename inputType)
 
array< ActionBaseGetPossibleActions (typename inputType)
 
int GetPossibleActionIndex (typename inputType)
 
int GetPossibleActionCount (typename inputType)
 
void InjectAction (ActionBase action, ActionTarget target, ItemBase item)
 
void InjectAction (typename actionType, ActionTarget target, ItemBase item)
 
void EjectAction (ActionBase action)
 
void EjectAction (typename actionType)
 
void ForceTarget (Object targetObject)
 
void ClearForceTarget ()
 
override ActionTarget FindActionTarget ()
 
ItemBase FindActionItem ()
 
bool HasHandInventoryReservation ()
 
void FindContextualUserActions (int pCurrentCommandID)
 
bool LockInventory (ActionData action_data)
 
void UnlockInventory (ActionData action_data)
 
void ActionStart (ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
 
void HandleInputsOnActionStart (ActionBase action)
 
void HandleInputsOnActionEnd ()
 
void ResetInputsState ()
 
void ResetInputsActions ()
 
override void OnJumpStart ()
 
override void OnInstantAction (typename user_action_type, Param data=NULL)
 
void PerformActionStart (ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
 
override void OnActionEnd ()
 
void SetInventoryAction (ActionBase action_name, ItemBase target_item, ItemBase main_item)
 
void SetInventoryAction (ActionBase action_name, ActionTarget target, ItemBase main_item)
 
void UnsetInventoryAction ()
 
override GetSelectedActionCategory ()
 
void UpdateActionCategoryPriority ()
 
override void SelectFirstActionCategory ()
 
override void SelectNextActionCategory ()
 
override void SelectPrevActionCategory ()
 
override void SelectNextAction ()
 
override void SelectPrevAction ()
 
bool CanPerformActionFromQuickbar (ItemBase mainItem, ItemBase targetItem)
 
void PerformActionFromQuickbar (ItemBase mainItem, ItemBase targetItem)
 
bool CanPerformActionFromInventory (ItemBase mainItem, ItemBase targetItem)
 
void PerformActionFromInventory (ItemBase mainItem, ItemBase targetItem)
 
bool CanSetActionFromInventory (ItemBase mainItem, ItemBase targetItem)
 
void SetActionFromInventory (ItemBase mainItem, ItemBase targetItem)
 
override void Interrupt ()
 
void RequestInterruptAction ()
 client requests action interrupt
 

Защищенные статические члены

static ActionVariantManager GetVariantManager (typename actionName)
 

Защищенные данные

int m_LastAcknowledgmentID
 
bool m_ActionPossible
 
ref array< ref InventoryLocationm_ReservedInventoryLocations
 
ref InventoryActionHandler m_InventoryActionHandler
 
ref InventoryLocation m_HandInventoryLocationTest
 
ref TTypeNameActionInputMap m_RegistredInputsMap
 
ref array< ActionInputm_OrederedAllActionInput
 
ref array< ActionInputm_OrderedStandartActionInputs
 
ref array< ActionInputm_DefaultOrderOfActionInputs
 
int m_SelectedActionInputToSrollIndex
 
ref ActionData m_PendingActionData
 
bool m_ActionWantEndRequest_Send
 
bool m_ActionInputWantEnd_Send
 

Закрытые данные

ref ActionTarget m_ForceTarget
 
ref ActionTargets m_Targets
 

Подробное описание

Конструктор(ы)

◆ ActionManagerClient()

void ActionManagerClient ( PlayerBase player)
inlineprotected
25 {
32
37 }
int m_SelectedActionInputToSrollIndex
Definition ActionManagerClient.c:17
void RegisterInputs(PlayerBase player)
Definition ActionManagerClient.c:136
ref InventoryLocation m_HandInventoryLocationTest
Definition ActionManagerClient.c:12
ref InventoryActionHandler m_InventoryActionHandler
Definition ActionManagerClient.c:11
ref ActionTargets m_Targets
Definition ActionManagerClient.c:1285
int m_LastAcknowledgmentID
Definition ActionManagerClient.c:8
bool m_ActionWantEndRequest_Send
Definition ActionManagerClient.c:21
ref array< ref InventoryLocation > m_ReservedInventoryLocations
Definition ActionManagerClient.c:10
bool m_ActionInputWantEnd_Send
Definition ActionManagerClient.c:22
Definition ActionTargets.c:174
Client only - manage set up crafting on client.
Definition InventoryActionHandler.c:3
InventoryLocation.
Definition InventoryLocation.c:28
Definition EntityAI.c:95

Перекрестные ссылки m_ActionInputWantEnd_Send, m_ActionWantEndRequest_Send, m_HandInventoryLocationTest, m_InventoryActionHandler, m_LastAcknowledgmentID, m_ReservedInventoryLocations, m_SelectedActionInputToSrollIndex, m_Targets и RegisterInputs().

Методы

◆ ActionStart()

void ActionStart ( ActionBase action,
ActionTarget target,
ItemBase item,
Param extra_data = NULL )
inlineprotected
595 {
596 if (!m_CurrentActionData && action && ActionPossibilityCheck(m_Player.GetCurrentCommandID()))
597 {
601 m_ActionInputWantEnd = false;
602
603 if (action.CanBePerformedFromQuickbar())
604 m_Player.SetActionEndInput(action);
605
607
609 {
610 if ( target )
611 {
612 Debug.ActionLog("Item = " + item + ", " + target.DumpToString(), action.ToString() , "n/a", "ActionStart", m_Player.ToString());
613 }
614 else
615 {
616 Debug.ActionLog("Item = " + item + ", no target", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
617 }
618 }
619 m_Interrupted = false;
620 if (GetGame().IsMultiplayer() && !action.IsLocal())
621 {
623 {
624 DPrint("ScriptInputUserData already posted - ActionManagerClient");
625
627 {
628 Debug.ActionLog("Cannot start because ScriptInputUserData is already used", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
629 }
630 return;
631 }
632 }
633
635 {
636 DPrint("Can not inicialize action" + action + " - ActionManagerClient");
638 return;
639 }
640
642 {
643 Debug.ActionLog("Action data created wait to start", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
644 }
645
646 if (GetGame().IsMultiplayer() && !action.IsLocal())
647 {
650 ctx.Write(action.GetID());
651
652 action.WriteToContext(ctx, m_CurrentActionData);
653
654 if (action.UseAcknowledgment())
655 {
658
660 }
661
662 ctx.Send();
663
664 if (!action.UseAcknowledgment())
665 {
667 if (action.IsInstant())
668 OnActionEnd();
669 }
670 }
671 else
672 {
674 if (action.IsInstant())
675 OnActionEnd();
676 }
677 }
678 }
const int INPUT_UDT_STANDARD_ACTION_START
Definition _constants.c:2
bool m_Interrupted
Definition ActionManagerBase.c:49
ref ActionData m_CurrentActionData
Definition ActionManagerBase.c:60
bool m_ActionInputWantEnd
Definition ActionManagerBase.c:53
bool ActionPossibilityCheck(int pCurrentCommandID)
Definition ActionManagerBase.c:218
int m_PendingActionAcknowledgmentID
Definition ActionManagerBase.c:58
bool m_ActionWantEndRequest
Definition ActionManagerBase.c:52
DayZPlayer m_Player
Definition Hand_Events.c:42
override void OnActionEnd()
Definition ActionManagerClient.c:766
void HandleInputsOnActionStart(ActionBase action)
Definition ActionManagerClient.c:680
Definition Debug.c:14
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:148
Definition Debug.c:735
static bool IsActionLogEnable()
Definition Debug.c:779
Definition gameplay.c:121
proto static native bool CanStoreInputUserData()
proto native CGame GetGame()
proto void DPrint(string var)
Prints content of variable to console/log. Should be used for critical messages so it will appear in ...
const int UA_AM_PENDING
Definition constants.c:446

Перекрестные ссылки Debug::ActionLog(), ActionPossibilityCheck(), ScriptInputUserData::CanStoreInputUserData(), DPrint(), GetGame(), HandleInputsOnActionStart(), INPUT_UDT_STANDARD_ACTION_START, LogManager::IsActionLogEnable(), m_ActionInputWantEnd, m_ActionInputWantEnd_Send, m_ActionWantEndRequest, m_ActionWantEndRequest_Send, m_CurrentActionData, m_Interrupted, m_LastAcknowledgmentID, m_PendingActionAcknowledgmentID, m_Player, OnActionEnd() и UA_AM_PENDING.

Используется в InputsUpdate(), OnInstantAction(), PerformActionFromInventory(), PerformActionFromQuickbar() и PerformActionStart().

◆ CanPerformActionFromInventory()

bool CanPerformActionFromInventory ( ItemBase mainItem,
ItemBase targetItem )
inlineprotected
1032 {
1033 ItemBase itemInHand = m_Player.GetItemInHands();
1034 ActionTarget target;
1035 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
1036 bool hasTarget = targetItem != NULL;
1037
1038 if (mainItem)
1039 {
1041 ActionBase picked_action;
1042 int i;
1043
1044 //First check single use actions
1045 mainItem.GetActions(DefaultActionInput, actions);
1046 if (actions)
1047 {
1048 for (i = 0; i < actions.Count(); i++)
1049 {
1050 picked_action = ActionBase.Cast(actions[i]);
1051 if (picked_action && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBePerformedFromInventory())
1052 {
1053 if (hasTarget == picked_action.HasTarget())
1054 return true;
1055 }
1056 }
1057 }
1058
1059 //Inventory specific actions
1061 if (actions)
1062 {
1063 for (i = 0; i < actions.Count(); i++)
1064 {
1065 picked_action = ActionBase.Cast(actions[i]);
1067 {
1068 if (hasTarget == picked_action.HasTarget())
1069 return true;
1070 }
1071 }
1072 }
1073 }
1074 return false;
1075 }
class ActionTargets ActionTarget
Definition ActionInput.c:631
Definition ActionInput.c:935
Definition InventoryItem.c:731
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки ActionTarget, m_Player и vector::Zero.

◆ CanPerformActionFromQuickbar()

bool CanPerformActionFromQuickbar ( ItemBase mainItem,
ItemBase targetItem )
inlineprotected
902 {
903 ItemBase itemInHand = m_Player.GetItemInHands();
904 ActionTarget target;
905 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
906 bool hasTarget = targetItem != NULL;
907
908 if (mainItem)
909 {
911 ActionBase picked_action;
912 int i;
913
915 if (actions)
916 {
917 for (i = 0; i < actions.Count(); i++)
918 {
919 picked_action = ActionBase.Cast(actions[i]);
921 {
922 if (hasTarget == picked_action.HasTarget())
923 return true;
924 }
925 }
926 }
927 //First check continuous actions
928 mainItem.GetActions(ContinuousDefaultActionInput, actions);
929 if (actions)
930 {
931 for (i = 0; i < actions.Count(); i++)
932 {
933 picked_action = ActionBase.Cast(actions[i]);
934 if (picked_action && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
935 {
936 if (hasTarget == picked_action.HasTarget())
937 return true;
938 }
939 }
940 }
941 //second single use actions
943 if (actions)
944 {
945 for (i = 0; i < actions.Count(); i++)
946 {
947 picked_action = ActionBase.Cast(actions[i]);
948 if (picked_action && picked_action.HasTarget() && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
949 {
950 if (hasTarget == picked_action.HasTarget())
951 return true;
952 }
953 }
954 }
955 }
956 return false;
957 }
Definition ActionInput.c:944

Перекрестные ссылки ActionTarget, m_Player и vector::Zero.

◆ CanSetActionFromInventory()

bool CanSetActionFromInventory ( ItemBase mainItem,
ItemBase targetItem )
inlineprotected
1130 {
1131 ItemBase itemInHand = m_Player.GetItemInHands();
1132 ActionTarget target;
1133 EntityAI parent = null;
1134 if (targetItem)
1135 {
1136 parent = targetItem.GetHierarchyParent();
1137 }
1138 target = new ActionTarget(targetItem, parent, -1, vector.Zero, -1);
1139 bool hasTarget = targetItem != NULL;
1140
1141 if (mainItem)
1142 {
1145 ActionBase picked_action;
1146 int variants_count,v;
1147
1148 //First check single use actions
1149 mainItem.GetActions(DefaultActionInput, actions);
1150 if (actions)
1151 {
1152 for (int i = 0; i < actions.Count(); i++)
1153 {
1154 picked_action = ActionBase.Cast(actions[i]);
1155 if (picked_action.HasVariants())
1156 {
1157 picked_action.UpdateVariants(itemInHand, targetItem, -1);
1158 picked_action.GetVariants(variant_actions);
1159 for (v = 0; v < variant_actions.Count(); v ++)
1160 {
1162 if (picked_action && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player,target, itemInHand))
1163 {
1164 if (hasTarget == picked_action.HasTarget())
1165 return true;
1166 }
1167 }
1168 }
1169 else
1170 {
1171 if (picked_action && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player,target, itemInHand))
1172 {
1173 if (hasTarget == picked_action.HasTarget())
1174 return true;
1175 }
1176 }
1177 }
1178 }
1179 //second continuous actions
1180 mainItem.GetActions(ContinuousDefaultActionInput, actions);
1181 if (actions)
1182 {
1183 for (int j = 0; j < actions.Count(); j++)
1184 {
1185 picked_action = ActionBase.Cast(actions[j]);
1186 if (picked_action.HasVariants())
1187 {
1188 picked_action.UpdateVariants(itemInHand, targetItem, -1);
1189 picked_action.GetVariants(variant_actions);
1190 for (v = 0; v < variant_actions.Count(); v ++)
1191 {
1193 if (picked_action && picked_action.HasTarget() && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player,target, itemInHand))
1194 {
1195 if (hasTarget == picked_action.HasTarget())
1196 return true;
1197 }
1198 }
1199 }
1200 else
1201 {
1202 if (picked_action && picked_action.HasTarget() && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player,target, itemInHand))
1203 {
1204 if (hasTarget == picked_action.HasTarget())
1205 return true;
1206 }
1207 }
1208 }
1209 }
1210 }
1211 return false;
1212 }
Definition Building.c:6

Перекрестные ссылки ActionTarget, m_Player и vector::Zero.

◆ ClearForceTarget()

void ClearForceTarget ( )
inlineprotected
468 {
470 }
ref ActionTarget m_ForceTarget
Definition ActionManagerClient.c:1284

Перекрестные ссылки m_ForceTarget.

◆ EjectAction() [1/2]

void EjectAction ( ActionBase action)
inlineprotected
447 {
448 ActionInput ai = action.GetInput();
449 ai.ClearForcedAction();
450 }
Definition ActionInput.c:20

Используется в EjectAction().

◆ EjectAction() [2/2]

void EjectAction ( typename actionType )
inlineprotected
453 {
454 ActionBase action = GetAction(actionType);
456 }
override ActionBase GetAction()
Definition ActionInput.c:482
void EjectAction(ActionBase action)
Definition ActionManagerClient.c:446

Перекрестные ссылки EjectAction() и GetAction().

◆ EndActionInput()

override void EndActionInput ( )
inlineprotected
273 {
275 {
277 }
278 }

Перекрестные ссылки m_ActionInputWantEnd и m_ActionInputWantEnd_Send.

Используется в InputsUpdate().

◆ FindActionItem()

ItemBase FindActionItem ( )
inlineprotected
509 {
511 if (m_Player && m_Player.GetItemInHands() && m_Player.GetItemInHands().IsItemBase())
512 {
513 item = m_Player.GetItemInHands();
514 }
515 return item;
516 }

Перекрестные ссылки m_Player.

Используется в FindContextualUserActions().

◆ FindActionTarget()

override ActionTarget FindActionTarget ( )
inlineprotected
475 {
476 if (m_ForceTarget)
477 return m_ForceTarget;
478
479 ActionTarget action_target;
481 int targetsCount = m_Targets.GetTargetsCount();
482 if (targetsCount)
483 {
484 for (int i = 0; i < targetsCount; ++i)
485 {
486 action_target = m_Targets.GetTarget(i);
487 Object targetObject = action_target.GetObject();
488 Object targetParent = action_target.GetParent();
489
490 if (targetParent)
491 {
492 break;
493 }
494
495 if (targetObject)
496 {
497 break;
498 }
499 }
500 }
501 else
502 {
504 }
505 return action_target;
506 }
Definition ObjectTyped.c:2

Перекрестные ссылки ActionTarget, m_ForceTarget, m_Targets и vector::Zero.

Используется в FindContextualUserActions() и ActionTargetsCursor::GetTarget().

◆ FindContextualUserActions()

void FindContextualUserActions ( int pCurrentCommandID)
inlineprotected
527 {
528 // TODO: NEEDS OPTIMIZATION (focus on UpdatePossibleActions > CraftingManager::OnUpdate)
529
530 m_ActionsAvaibale = false;
531 if (!m_ActionPossible || HasHandInventoryReservation() || GetGame().IsInventoryOpen())
532 {
534 return;
535 }
536
537 if (!GetRunningAction())
538 {
539 ActionBase action;
540 ActionTarget target;
542
543 // Gathering current inputs
544 m_ActionsAvaibale = true;
545
548
549 int actionConditionMask = ActionBase.ComputeConditionMask(m_Player,target,item);
550 for (int i = 0; i < m_OrederedAllActionInput.Count();i++)
551 {
553 ain.UpdatePossibleActions(m_Player,target,item, actionConditionMask);
554 }
556 }
557 }
void SetActionContext(ActionTarget target, ItemBase item)
Definition ActionManagerBase.c:229
bool m_ActionsAvaibale
Definition ActionManagerBase.c:55
override ActionTarget FindActionTarget()
Definition ActionManagerClient.c:474
ref array< ActionInput > m_OrederedAllActionInput
Definition ActionManagerClient.c:14
ItemBase FindActionItem()
Definition ActionManagerClient.c:508
void ResetInputsActions()
Definition ActionManagerClient.c:710
bool m_ActionPossible
Definition ActionManagerClient.c:9
bool HasHandInventoryReservation()
Definition ActionManagerClient.c:518
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
Definition ActionManagerBase.c:90

Перекрестные ссылки FindActionItem(), FindActionTarget(), GetGame(), GetRunningAction(), HasHandInventoryReservation(), m_ActionPossible, m_ActionsAvaibale, m_OrederedAllActionInput, m_Player, ResetInputsActions() и SetActionContext().

Используется в Update().

◆ ForceTarget()

void ForceTarget ( Object targetObject)
inlineprotected
459 {
460 Object parent = null;
462 if (targetEntity)
463 parent = targetEntity.GetHierarchyParent();
464 m_ForceTarget = new ActionTarget(targetObject, parent, -1, vector.Zero, -1);
465 }

Перекрестные ссылки ActionTarget, m_ForceTarget и vector::Zero.

◆ GetPossibleAction()

ActionBase GetPossibleAction ( typename inputType )
inlineprotected
392 {
394 if (action_input)
395 {
396 return action_input.GetAction();
397 }
398 return NULL;
399 }
ref TTypeNameActionInputMap m_RegistredInputsMap
Definition ActionManagerClient.c:13

Перекрестные ссылки m_RegistredInputsMap.

◆ GetPossibleActionCount()

int GetPossibleActionCount ( typename inputType )
inlineprotected
422 {
424 if (action_input)
425 {
426 return action_input.GetPossibleActionsCount();
427 }
428 return 0;
429 }

Перекрестные ссылки m_RegistredInputsMap.

◆ GetPossibleActionIndex()

int GetPossibleActionIndex ( typename inputType )
inlineprotected
412 {
414 if (action_input)
415 {
416 return action_input.GetPossibleActionIndex();
417 }
418 return -1;
419 }

Перекрестные ссылки m_RegistredInputsMap.

◆ GetPossibleActions()

array< ActionBase > GetPossibleActions ( typename inputType )
inlineprotected
402 {
404 if (action_input)
405 {
406 return action_input.GetPossibleActions();
407 }
408 return NULL;
409 }

Перекрестные ссылки m_RegistredInputsMap.

◆ GetSelectedActionCategory()

override GetSelectedActionCategory ( )
inlineprotected
795 {
797 }
ref array< ActionInput > m_OrderedStandartActionInputs
Definition ActionManagerClient.c:15

Перекрестные ссылки m_OrderedStandartActionInputs и m_SelectedActionInputToSrollIndex.

◆ GetVariantManager()

static ActionVariantManager GetVariantManager ( typename actionName )
inlinestaticprotected
254 {
255 ActionBase action = GetAction(actionName);
256 if (action)
257 {
258 return action.GetVariantManager();
259 }
260 //VME ACTION not exist typo most likely
261 return null;
262 }

Перекрестные ссылки GetAction().

Используется в ConstructionActionData::ConstructionActionData() и CraftingManager::CraftingManager().

◆ HandleInputsOnActionEnd()

void HandleInputsOnActionEnd ( )
inlineprotected
697 {
699 }
void ResetInputsState()
Definition ActionManagerClient.c:701

Перекрестные ссылки ResetInputsState().

Используется в OnActionEnd().

◆ HandleInputsOnActionStart()

void HandleInputsOnActionStart ( ActionBase action)
inlineprotected
681 {
682 for (int i = 0; i < m_OrederedAllActionInput.Count();i++)
683 {
685 if (action.GetInput() == ain)
686 {
687 ain.OnActionStart();
688 }
689 else
690 {
691 ain.Reset();
692 }
693 }
694 }

Перекрестные ссылки m_OrederedAllActionInput.

Используется в ActionStart().

◆ HasHandInventoryReservation()

bool HasHandInventoryReservation ( )
inlineprotected
519 {
520 m_HandInventoryLocationTest.SetHands(m_Player,m_Player.GetItemInHands());
521 if (m_Player.GetHumanInventory().HasInventoryReservation(m_Player.GetItemInHands(),m_HandInventoryLocationTest))
522 return true;
523 return false;
524 }

Перекрестные ссылки m_HandInventoryLocationTest и m_Player.

Используется в FindContextualUserActions().

◆ InjectAction() [1/2]

void InjectAction ( ActionBase action,
ActionTarget target,
ItemBase item )
inlineprotected
435 {
436 ActionInput ai = action.GetInput();
437 ai.ForceAction(action, target, item);
438 }

Используется в InjectAction().

◆ InjectAction() [2/2]

void InjectAction ( typename actionType ,
ActionTarget target,
ItemBase item )
inlineprotected
441 {
442 ActionBase action = GetAction(actionType);
444 }
void InjectAction(ActionBase action, ActionTarget target, ItemBase item)
Definition ActionManagerClient.c:434

Перекрестные ссылки GetAction() и InjectAction().

◆ InputsUpdate()

void InputsUpdate ( )
inlineprotected
281 {
284 {
286 {
287 ActionInput ai = m_CurrentActionData.m_Action.GetInput();
288 ai.Update();
289 if (m_Player.IsQBControl())
290 {
291 if (ai.JustActivate())
292 m_Player.SetActionEndInput(m_CurrentActionData.m_Action);
293 }
294 else
295 {
296 if (ai.WasEnded() && (ai.GetInputType() == ActionInputType.AIT_CONTINUOUS || ai.GetInputType() == ActionInputType.AIT_CLICKCONTINUOUS))
297 {
299 }
300 }
301 }
302 }
303 else
304 {
306 {
307 for (int i = 0; i < m_OrederedAllActionInput.Count();i++)
308 {
309
311 ain.Update();
312
313 if (ain.JustActivate())
314 {
315 ActionBase action = ain.GetAction();
316 if (action)
317 {
318 ActionStart(action, ain.GetUsedActionTarget(), ain.GetUsedMainItem());
319 break;
320 }
321 }
322 }
323 }
324 }
325 }
ActionInputType
Definition ActionInput.c:2
void ActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
Definition ActionManagerClient.c:594
override void EndActionInput()
Definition ActionManagerClient.c:272

Перекрестные ссылки ActionStart(), EndActionInput(), m_ActionInputWantEnd, m_ActionsAvaibale, m_CurrentActionData, m_OrederedAllActionInput и m_Player.

Используется в Update().

◆ Interrupt()

override void Interrupt ( )
inlineprotected
1265 {
1266 super.Interrupt();
1267
1269 m_Interrupted = true;
1270 }

Перекрестные ссылки m_CurrentActionData и m_Interrupted.

◆ LockInventory()

bool LockInventory ( ActionData action_data)
inlineprotected
561 {
562 bool success = false;
563 if (action_data.m_Action.IsInstant())
564 {
566 {
567 Debug.ActionLog("(-) Inventory lock - Not Used", action_data.m_Action.ToString() , "n/a", "LockInventory", action_data.m_Player.ToString());
568 }
569 success = true;
570 }
571 else
572 {
574 {
575 Debug.ActionLog("(X) Inventory lock", action_data.m_Action.ToString() , "n/a", "LockInventory", action_data.m_Player.ToString());
576 }
577 if (action_data.m_Action)
578 {
579 success = action_data.m_Action.InventoryReservation(action_data);
580 }
581 }
582 return success;
583 }

Перекрестные ссылки Debug::ActionLog() и LogManager::IsActionLogEnable().

◆ OnActionEnd()

override void OnActionEnd ( )
inlineprotected
767 {
769 {
771 if (m_CurrentActionData.m_Action.RemoveForceTargetAfterUse())
772 m_InventoryActionHandler.DeactiveAction();
773
774 super.OnActionEnd();
776 }
777 }
void HandleInputsOnActionEnd()
Definition ActionManagerClient.c:696
void UnlockInventory(ActionData action_data)
Definition ActionManagerClient.c:584

Перекрестные ссылки HandleInputsOnActionEnd(), m_CurrentActionData, m_InventoryActionHandler и UnlockInventory().

Используется в ActionStart(), OnJumpStart() и Update().

◆ OnInstantAction()

override void OnInstantAction ( typename user_action_type ,
Param data = NULL )
inlineprotected
737 {
738 ActionBase action = GetAction(user_action_type);
739 if (action)
740 {
742 }
743 }

Перекрестные ссылки ActionStart() и GetAction().

◆ OnJumpStart()

override void OnJumpStart ( )
inlineprotected
720 {
722 {
724 {
725 OnActionEnd();
727 }
728 else
729 {
730 m_CurrentActionData.m_Action.Interrupt(m_CurrentActionData);
731 }
732 }
733 }
const int UA_AM_ACCEPTED
Definition constants.c:447
const int UA_AM_REJECTED
Definition constants.c:448

Перекрестные ссылки m_CurrentActionData, m_PendingActionAcknowledgmentID, OnActionEnd(), UA_AM_ACCEPTED, UA_AM_PENDING и UA_AM_REJECTED.

◆ PerformActionFromInventory()

void PerformActionFromInventory ( ItemBase mainItem,
ItemBase targetItem )
inlineprotected
1079 {
1080 ItemBase itemInHand = m_Player.GetItemInHands();
1081 ActionTarget target;
1082 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
1083 bool hasTarget = targetItem != NULL;
1084
1085 if (mainItem)
1086 {
1087 ActionBase picked_action;
1089 int i;
1090
1091 //First check single use actions
1092 mainItem.GetActions(DefaultActionInput, actions);
1093 if (actions)
1094 {
1095 for (i = 0; i < actions.Count(); i++)
1096 {
1097 picked_action = ActionBase.Cast(actions[i]);
1098 if (picked_action && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBePerformedFromInventory())
1099 {
1100 if (hasTarget == picked_action.HasTarget())
1101 {
1103 return;
1104 }
1105 }
1106 }
1107 }
1108
1109 //Inventory specific actions
1111 if (actions)
1112 {
1113 for (i = 0; i < actions.Count(); i++)
1114 {
1115 picked_action = ActionBase.Cast(actions[i]);
1117 {
1118 if (hasTarget == picked_action.HasTarget())
1119 {
1121 return;
1122 }
1123 }
1124 }
1125 }
1126 }
1127 }

Перекрестные ссылки ActionStart(), ActionTarget, m_Player и vector::Zero.

◆ PerformActionFromQuickbar()

void PerformActionFromQuickbar ( ItemBase mainItem,
ItemBase targetItem )
inlineprotected
960 {
961 ItemBase itemInHand = m_Player.GetItemInHands();
962 ActionTarget target;
963 ItemBase parent = null;
964 if (targetItem)
965 parent = ItemBase.Cast(targetItem.GetHierarchyParent());
966 target = new ActionTarget(targetItem, parent, -1, vector.Zero, -1);
967 bool hasTarget = targetItem != NULL;
968
969 if (mainItem)
970 {
971 ActionBase picked_action;
973 int i;
974
976 if (actions)
977 {
978 for (i = 0; i < actions.Count(); i++)
979 {
980 picked_action = ActionBase.Cast(actions[i]);
982 {
983 if (hasTarget == picked_action.HasTarget())
984 {
986 return;
987 }
988 }
989 }
990 }
991
992 //First continuous actions
993 mainItem.GetActions(ContinuousDefaultActionInput, actions);
994 if (actions)
995 {
996 for (i = 0; i < actions.Count(); i++)
997 {
998 picked_action = ActionBase.Cast(actions[i]);
999 if (picked_action && picked_action.HasTarget() && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
1000 {
1001 if (hasTarget == picked_action.HasTarget())
1002 {
1004 return;
1005 }
1006 }
1007 }
1008 }
1009 //Second check single use actions
1010 mainItem.GetActions(DefaultActionInput, actions);
1011 if (actions)
1012 {
1013 for (i = 0; i < actions.Count(); i++)
1014 {
1015 picked_action = ActionBase.Cast(actions[i]);
1016 if (picked_action && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
1017 {
1018 if (hasTarget == picked_action.HasTarget())
1019 {
1021 return;
1022 }
1023 }
1024 }
1025 }
1026
1027 }
1028 }

Перекрестные ссылки ActionStart(), ActionTarget, m_Player и vector::Zero.

◆ PerformActionStart()

void PerformActionStart ( ActionBase action,
ActionTarget target,
ItemBase item,
Param extra_data = NULL )
inlineprotected
754 {
755 if (!GetGame().IsMultiplayer())
756 {
758
761 }
762 else
764 }
Definition ActionBase.c:21
ref ActionData m_PendingActionData
Definition ActionManagerClient.c:19

Перекрестные ссылки ActionStart(), GetGame(), m_PendingActionData и m_Player.

◆ ProcessActionInputEnd()

void ProcessActionInputEnd ( )
inlineprotected
358 {
360 {
361 if (GetGame().IsMultiplayer() && !m_CurrentActionData.m_Action.IsLocal())
362 {
364 {
366 {
367 Debug.ActionLog("Time stamp: " + m_Player.GetSimulationTimeStamp(), m_CurrentActionData.m_Action.ToString() , "n/a", "EndInput", m_CurrentActionData.m_Player.ToString());
368 }
371 ctxi.Send();
372
374
375 m_ActionInputWantEnd = false;
376 m_CurrentActionData.m_Action.EndInput(m_CurrentActionData);
377 }
378 }
379 else
380 {
382 {
384 m_ActionInputWantEnd = false;
385 m_CurrentActionData.m_Action.EndInput(m_CurrentActionData);
386 }
387 }
388 }
389 }
const int INPUT_UDT_STANDARD_ACTION_INPUT_END
Definition _constants.c:4

Перекрестные ссылки Debug::ActionLog(), ScriptInputUserData::CanStoreInputUserData(), GetGame(), INPUT_UDT_STANDARD_ACTION_INPUT_END, LogManager::IsActionLogEnable(), m_ActionInputWantEnd, m_ActionInputWantEnd_Send, m_CurrentActionData и m_Player.

Используется в Update().

◆ ProcessActionRequestEnd()

void ProcessActionRequestEnd ( )
inlineprotected
328 {
330 {
331 if (GetGame().IsMultiplayer() && !m_CurrentActionData.m_Action.IsLocal())
332 {
334 {
336 {
337 Debug.ActionLog("Time stamp: " + m_Player.GetSimulationTimeStamp(), m_CurrentActionData.m_Action.ToString() , "n/a", "EndRequest", m_CurrentActionData.m_Player.ToString());
338 }
341 ctx.Send();
342
344
346 m_CurrentActionData.m_Action.EndRequest(m_CurrentActionData);
347 }
348 }
349 else
350 {
352 m_CurrentActionData.m_Action.EndRequest(m_CurrentActionData);
353 }
354 }
355 }
const int INPUT_UDT_STANDARD_ACTION_END_REQUEST
Definition _constants.c:3

Перекрестные ссылки Debug::ActionLog(), ScriptInputUserData::CanStoreInputUserData(), GetGame(), INPUT_UDT_STANDARD_ACTION_END_REQUEST, LogManager::IsActionLogEnable(), m_ActionWantEndRequest, m_ActionWantEndRequest_Send, m_CurrentActionData и m_Player.

Используется в Update().

◆ RegisterInputs()

void RegisterInputs ( PlayerBase player)
inlineprotected
137 {
139 {
141
142 for (int i = 0; i < m_ActionsArray.Count(); i++)
143 {
144 ActionBase action = m_ActionsArray.Get(i);
145 typename input_type_name = action.GetInputType();
147
149 if (!ai)
150 {
151 ai = ActionInput.Cast(input_type_name.Spawn());
153 }
154 action.SetInput(ai);
155 }
156
157 for (int j = 0; j < m_RegistredInputsMap.Count(); j++)
158 {
159 m_RegistredInputsMap.GetElement(j).Init(player, this);
160 }
162 }
163
164 }
static ref array< ref ActionBase > m_ActionsArray
Definition ActionManagerBase.c:50
map< typename, ref ActionInput > TTypeNameActionInputMap
Definition ActionManagerClient.c:2
void SetActioninputOrder()
Definition ActionManagerClient.c:167

Перекрестные ссылки m_ActionsArray, m_RegistredInputsMap и SetActioninputOrder().

Используется в ActionManagerClient().

◆ RequestEndAction()

override void RequestEndAction ( )
inlineprotected
265 {
267 {
269 }
270 }

Перекрестные ссылки m_ActionWantEndRequest и m_ActionWantEndRequest_Send.

Используется в ActionReadPaper::OnUpdate() и ActionWritePaper::OnUpdate().

◆ RequestInterruptAction()

void RequestInterruptAction ( )
inlineprotected

client requests action interrupt

1274 {
1276 {
1279 ctx.Write(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
1280 ctx.Send();
1281 }
1282 }
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData() и INPUT_UDT_STANDARD_ACTION_END_REQUEST.

◆ ResetInputsActions()

void ResetInputsActions ( )
inlineprotected
711 {
712 for (int i = 0; i < m_OrederedAllActionInput.Count();i++)
713 {
715 ain.ActionsSelectReset();
716 }
717 }

Перекрестные ссылки m_OrederedAllActionInput.

Используется в FindContextualUserActions() и Update().

◆ ResetInputsState()

void ResetInputsState ( )
inlineprotected
702 {
703 for (int i = 0; i < m_OrederedAllActionInput.Count();i++)
704 {
706 ain.Reset();
707 }
708 }

Перекрестные ссылки m_OrederedAllActionInput.

Используется в HandleInputsOnActionEnd().

◆ SelectFirstActionCategory()

override void SelectFirstActionCategory ( )
inlineprotected
823 {
826
827 for (int index = 0; index < m_OrderedStandartActionInputs.Count(); index++)
828 {
830 {
832 break;
833 }
834 }
835 }
override int GetPossibleActionsCount()
Definition ActionInput.c:467
void UpdateActionCategoryPriority()
Definition ActionManagerClient.c:799

Перекрестные ссылки GetPossibleActionsCount(), m_OrderedStandartActionInputs, m_SelectedActionInputToSrollIndex и UpdateActionCategoryPriority().

◆ SelectNextAction()

override void SelectNextAction ( )
inlineprotected
876 {
879 {
881 if (ai && ai.GetPossibleActionsCount() > 1)
882 {
883 ai.SelectNextAction();
884 }
885 }
886 }

Перекрестные ссылки m_OrderedStandartActionInputs и m_SelectedActionInputToSrollIndex.

◆ SelectNextActionCategory()

override void SelectNextActionCategory ( )
inlineprotected
838 {
839 int index;
840
842 {
843 if (++index >= m_OrderedStandartActionInputs.Count())
844 {
845 index = 0;
846 }
848 {
850 break;
851 }
852 }
853 }

Перекрестные ссылки GetPossibleActionsCount(), m_OrderedStandartActionInputs и m_SelectedActionInputToSrollIndex.

◆ SelectPrevAction()

override void SelectPrevAction ( )
inlineprotected
889 {
892 {
894 if (ai && ai.GetPossibleActionsCount() > 1)
895 {
896 ai.SelectPrevAction();
897 }
898 }
899 }

Перекрестные ссылки m_OrderedStandartActionInputs и m_SelectedActionInputToSrollIndex.

◆ SelectPrevActionCategory()

override void SelectPrevActionCategory ( )
inlineprotected
856 {
857 int index;
858
860 {
861 if (--index < 0)
862 {
864 }
865
867 {
869 break;
870 }
871 }
872 }

Перекрестные ссылки GetPossibleActionsCount(), m_OrderedStandartActionInputs и m_SelectedActionInputToSrollIndex.

◆ SetActionFromInventory()

void SetActionFromInventory ( ItemBase mainItem,
ItemBase targetItem )
inlineprotected
1216 {
1217 ItemBase itemInHand = m_Player.GetItemInHands();
1218 ActionTarget target;
1219 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
1220 bool hasTarget = targetItem != NULL;
1221
1222 if (mainItem)
1223 {
1225 ActionBase picked_action;
1226
1227 //First check single use actions
1228 mainItem.GetActions(DefaultActionInput, actions);
1229 if (actions)
1230 {
1231 for (int i = 0; i < actions.Count(); i++)
1232 {
1233 picked_action = ActionBase.Cast(actions[i]);
1234 if (picked_action && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBeSetFromInventory())
1235 {
1236 if (hasTarget == picked_action.HasTarget())
1237 {
1239 return;
1240 }
1241 }
1242 }
1243 }
1244 //second continuous actions
1245 mainItem.GetActions(ContinuousDefaultActionInput, actions);
1246 if (actions)
1247 {
1248 for (int j = 0; j < actions.Count(); j++)
1249 {
1250 picked_action = ActionBase.Cast(actions[j]);
1251 if (picked_action && picked_action.HasTarget() && picked_action.Can(m_Player,target, itemInHand) && picked_action.CanBeSetFromInventory())
1252 {
1253 if (hasTarget == picked_action.HasTarget())
1254 {
1256 return;
1257 }
1258 }
1259 }
1260 }
1261 }
1262 }
void SetInventoryAction(ActionBase action_name, ItemBase target_item, ItemBase main_item)
Definition ActionManagerClient.c:779

Перекрестные ссылки ActionTarget, m_Player, SetInventoryAction() и vector::Zero.

◆ SetActioninputOrder()

void SetActioninputOrder ( )
inlineprotected

Перекрестные ссылки m_OrederedAllActionInput, m_RegistredInputsMap и SetDefaultInputsOrder().

Используется в RegisterInputs().

◆ SetDefaultInputsOrder()

void SetDefaultInputsOrder ( )
inlineprotected
212 {
213 int i, j;
216 ActionInput input = m_RegistredInputsMap.Get(ContinuousDefaultActionInput);
217 if (input)
218 {
220 }
221
223 if (input)
224 {
226 }
227
229 if (input)
230 {
232 }
233
235 if (input)
236 {
238 }
239
240 for (i = 0; i < m_OrederedAllActionInput.Count(); i++)
241 {
242 for (j = 0; j < m_OrderedStandartActionInputs.Count(); j++)
243 {
245 {
247 break;
248 }
249 }
250 }
251 }
ref array< ActionInput > m_DefaultOrderOfActionInputs
Definition ActionManagerClient.c:16
Definition ActionInput.c:522
Definition ActionInput.c:535

Перекрестные ссылки m_DefaultOrderOfActionInputs, m_OrderedStandartActionInputs, m_OrederedAllActionInput и m_RegistredInputsMap.

Используется в SetActioninputOrder().

◆ SetInventoryAction() [1/2]

void SetInventoryAction ( ActionBase action_name,
ActionTarget target,
ItemBase main_item )
inlineprotected
785 {
787 }

Перекрестные ссылки m_InventoryActionHandler.

◆ SetInventoryAction() [2/2]

void SetInventoryAction ( ActionBase action_name,
ItemBase target_item,
ItemBase main_item )
inlineprotected

Перекрестные ссылки m_InventoryActionHandler.

Используется в SetActionFromInventory().

◆ UnlockInventory()

void UnlockInventory ( ActionData action_data)
inlineprotected
585 {
587 {
588 Debug.ActionLog("(O) Inventory unlock", action_data.m_Action.ToString() , "n/a", "UnlockInventory", action_data.m_Player.ToString());
589 }
590 if (action_data.m_Action)
591 action_data.m_Action.ClearInventoryReservationEx(action_data);
592 }

Перекрестные ссылки Debug::ActionLog() и LogManager::IsActionLogEnable().

Используется в OnActionEnd().

◆ UnsetInventoryAction()

void UnsetInventoryAction ( )
inlineprotected
790 {
791 m_InventoryActionHandler.DeactiveAction();
792 }

Перекрестные ссылки m_InventoryActionHandler.

◆ Update()

override void Update ( int pCurrentCommandID)
inlineprotected
41 {
42 m_InventoryActionHandler.OnUpdate();
44 int currentCommandID = m_Player.GetCurrentCommandID();
46
47 if (m_PendingActionData) //SP only
48 {
50
52
53 if (m_CurrentActionData.m_Action.IsInstant())
55
57 }
58
60 {
62 m_CurrentActionData.m_Action.OnUpdateClient(m_CurrentActionData);
63
64 switch (m_CurrentActionData.m_State)
65 {
66 case UA_AM_PENDING:
67 break;
68
69 case UA_AM_ACCEPTED:
70 int condition_mask = ActionBase.ComputeConditionMask(m_Player, m_CurrentActionData.m_Target, m_CurrentActionData.m_MainItem);
71
72 m_CurrentActionData.m_Action.ClearInventoryReservationEx(m_CurrentActionData);
73 bool can_be_action_done = ((condition_mask & m_CurrentActionData.m_Action.m_ConditionMask) == condition_mask);
74 // check currentCommandID before start or reject
76 {
77 m_CurrentActionData.m_Action.InventoryReservation(m_CurrentActionData);
80
81 if (m_CurrentActionData.m_Action.IsInstant())
83 }
84 else
85 {
87 }
89 break;
90
91 case UA_AM_REJECTED:
94 break;
95
96 default:
99 break;
100 }
101 }
102
103#ifdef DEVELOPER
105 {
106 m_ActionPossible = false;
108 }
109 else
110 {
111#endif
113 {
114 bool isMenuOpen = false;
115#ifndef NO_GUI
116 isMenuOpen = GetGame().GetUIManager().IsMenuOpen(MENU_INVENTORY);
117#endif
119 {
120 m_Targets.Clear();
121 }
122 else
123 {
124 m_Targets.Update();
125 }
127 }
128
129 InputsUpdate();
130#ifdef DEVELOPER
131 }
132#endif
133
134 }
void ProcessActionInputEnd()
Definition ActionManagerClient.c:357
void FindContextualUserActions(int pCurrentCommandID)
Definition ActionManagerClient.c:526
void ProcessActionRequestEnd()
Definition ActionManagerClient.c:327
void InputsUpdate()
Definition ActionManagerClient.c:280
bool IsRaised()
Definition DayZPlayerImplement.c:3705
Definition DeveloperFreeCamera.c:2
static bool IsFreeCameraEnabled()
Definition DeveloperFreeCamera.c:23
const int MENU_INVENTORY
Definition constants.c:170
const int UA_START
Definition constants.c:439

Перекрестные ссылки ActionPossibilityCheck(), FindContextualUserActions(), GetGame(), InputsUpdate(), DeveloperFreeCamera::IsFreeCameraEnabled(), DayZPlayer::IsRaised(), m_ActionPossible, m_CurrentActionData, m_InventoryActionHandler, m_PendingActionAcknowledgmentID, m_PendingActionData, m_Player, m_Targets, MENU_INVENTORY, OnActionEnd(), ProcessActionInputEnd(), ProcessActionRequestEnd(), ResetInputsActions(), UA_AM_ACCEPTED, UA_AM_PENDING, UA_AM_REJECTED и UA_START.

◆ UpdateActionCategoryPriority()

void UpdateActionCategoryPriority ( )
inlineprotected
800 {
801 int i;
802 int last_target_index = 0;
803 for (i = 0; i < m_DefaultOrderOfActionInputs.Count(); i++)
804 {
806 {
809 }
810 }
811
812 for (i = 0; i < m_DefaultOrderOfActionInputs.Count(); i++)
813 {
815 {
818 }
819 }
820 }
bool HasTarget()
Definition ActionBase.c:232

Перекрестные ссылки HasTarget(), m_DefaultOrderOfActionInputs и m_OrderedStandartActionInputs.

Используется в SelectFirstActionCategory().

Поля

◆ m_ActionInputWantEnd_Send

bool m_ActionInputWantEnd_Send
protected

◆ m_ActionPossible

bool m_ActionPossible
protected

Используется в FindContextualUserActions() и Update().

◆ m_ActionWantEndRequest_Send

bool m_ActionWantEndRequest_Send
protected

◆ m_DefaultOrderOfActionInputs

ref array<ActionInput> m_DefaultOrderOfActionInputs
protected

◆ m_ForceTarget

ref ActionTarget m_ForceTarget
private

Используется в ClearForceTarget(), FindActionTarget() и ForceTarget().

◆ m_HandInventoryLocationTest

ref InventoryLocation m_HandInventoryLocationTest
protected

Используется в ActionManagerClient() и HasHandInventoryReservation().

◆ m_InventoryActionHandler

◆ m_LastAcknowledgmentID

int m_LastAcknowledgmentID
protected

Используется в ActionManagerClient() и ActionStart().

◆ m_OrderedStandartActionInputs

◆ m_OrederedAllActionInput

◆ m_PendingActionData

ref ActionData m_PendingActionData
protected

Используется в PerformActionStart() и Update().

◆ m_RegistredInputsMap

◆ m_ReservedInventoryLocations

ref array<ref InventoryLocation> m_ReservedInventoryLocations
protected

Используется в ActionManagerClient().

◆ m_SelectedActionInputToSrollIndex

◆ m_Targets

ref ActionTargets m_Targets
private

Используется в ActionManagerClient(), FindActionTarget() и Update().


Объявления и описания членов класса находятся в файле: