Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AvailableActionsConditionData.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
6 {
7  protected ChimeraCharacter m_Character;
8  protected CharacterControllerComponent m_CharacterController;
9  protected SCR_InventoryStorageManagerComponent m_StorageManager;
10 
12  protected bool m_bIsValid;
13 
15  protected ECharacterStance m_eCharacterStance;
16  // Type of current compartment
17  protected ECompartmentType m_eCompartmentType;
19  protected bool m_bIsCharacterADS;
21  protected bool m_bIsCharacterInVehicle;
23  protected bool m_bIsCharacterGettingIn;
25  protected bool m_bIsCharacterGettingOut;
27  protected bool m_bIsCharacterSprinting;
29  protected bool m_bIsCharacterSwimming;
31  protected bool m_bIsCharacterFalling;
33  protected bool m_bIsCharacterReloading;
35  protected bool m_bCanCharacterGetOutVehicle;
37  protected bool m_bIsCharacterWeaponRaised;
39  protected bool m_bCanCharacterFireWeapon;
41  protected bool m_bIsCharacterUsingItem;
43  protected bool m_bIsCharacterBleeding;
45  protected bool m_bIsInventoryOpen;
47  protected bool m_bIsQuickSlotAvailable;
49  protected bool m_bIsQuickSlotShown;
51  protected bool m_bIsGadgetSelection;
53  protected bool m_bIsWeaponManipulation;
55  protected float m_fFocusMode;
57  protected float m_fBleedingTime;
59  protected float m_fSprintingTime;
61  protected int m_iAdditionalMagazines;
63  protected int m_iMedicalItemCount;
65  protected int m_iMedicalItemCountInQuickSlots;
67  protected IEntity m_CurrentItemEntity;
69  protected IEntity m_CurrentWeaponEntity;
71  protected BaseWeaponComponent m_CurrentWeapon;
73  protected BaseMuzzleComponent m_CurrentMuzzle;
75  protected BaseMagazineComponent m_CurrentMagazine;
76 
78  protected IEntity m_CurrentVehicle;
80  protected float m_fTurboTime;
82  protected BaseControllerComponent m_CurrentVehicleController;
84  protected SignalsManagerComponent m_CurrentVehicleSignals;
86  protected BaseWeaponComponent m_CurrentVehicleWeapon;
87 
88  // Character health state
89  protected SCR_CharacterDamageManagerComponent m_CharacterDamageComponent;
90  protected bool m_bIsCharacterConscious;
91  protected bool m_bHasBleedingLimbs;
92  protected bool m_bHasTourniquetLimb;
93 
94  // Von variables ----------------------
95  protected SCR_VoNComponent m_VON;
96  protected SCR_VONController m_VONController;
97 
99  protected bool m_bCharacterIsUsingRadio;
101  protected bool m_bCharacterRadiosCount;
102  bool m_bIsRadioLongRange;
103  bool m_bOwnsLongRangeRadio;
104 
106  protected bool m_bCanFetchInventory = true;
107 
109  protected SCR_MapEntity m_MapEntity;
110  bool m_bCanRotateMapElement;
111  bool m_bCanActivateMapElement;
112  bool m_bCanDragMapElement;
113 
114  //------------------------------------------------------------------------------------------------
115  private void OnItemAddedListener(IEntity item, BaseInventoryStorageComponent storage)
116  {
117  m_bCanFetchInventory = true;
118  }
119 
120  private void OnItemRemovedListener(IEntity item, BaseInventoryStorageComponent storage)
121  {
122  m_bCanFetchInventory = true;
123  }
124 
125  private void OnInventoryOpen(bool open)
126  {
127  if (open)
128  {
129  SCR_InventoryAvailableCondition.IncrementCounter();
130  }
131  m_bIsInventoryOpen = open;
132  }
133 
134  private void OnQuickSlotOpen(bool open)
135  {
136  if (open)
137  {
138  SCR_WeaponQuickSlotAvailableCondition.IncrementCounter();
139  }
140  m_bIsQuickSlotAvailable = open;
141  m_bIsQuickSlotShown = open;
142  }
143 
144  //------------------------------------------------------------------------------------------------
147  private void Clear()
148  {
149  m_eCharacterStance = ECharacterStance.STAND;
150  m_eCompartmentType = ECompartmentType.Pilot;
151  m_bIsCharacterADS = false;
152  m_bIsCharacterInVehicle = false;
153  m_bIsCharacterGettingIn = false;
154  m_bIsCharacterGettingOut = false;
155  m_bIsCharacterSwimming = false;
156  m_bIsCharacterSprinting = false;
157  m_bIsCharacterFalling = false;
158  m_bIsCharacterReloading = false;
159  m_bIsCharacterWeaponRaised = false;
160  m_bCanCharacterFireWeapon = false;
161  m_bIsCharacterUsingItem = false;
162  m_bIsGadgetSelection = false;
163  m_bIsWeaponManipulation = false;
164  m_fFocusMode = 0.0;
165  //m_iAdditionalMagazines = 0;
166  m_CurrentItemEntity = null;
167  m_CurrentWeaponEntity = null;
168  m_CurrentWeapon = null;
169  m_CurrentMuzzle = null;
170  m_CurrentMagazine = null;
171  m_CurrentVehicleWeapon = null;
172 
173  // Health
174  m_CharacterDamageComponent = null;
175  m_bIsCharacterConscious = false;
176  m_bHasBleedingLimbs = false;
177  m_bHasTourniquetLimb = false;
178 
179  m_bIsValid = false;
180  }
181 
182  /* Gadgets magic */
183  protected SCR_GadgetManagerComponent m_GadgetManager;
184 
185  //------------------------------------------------------------------------------------------------
186  // Getters
187  //------------------------------------------------------------------------------------------------
188 
189  //------------------------------------------------------------------------------------------------
190  ChimeraCharacter GetCharacter()
191  {
192  return m_Character;
193  }
194 
195  //------------------------------------------------------------------------------------------------
197  IEntity GetHeldGadget()
198  {
199  if (m_GadgetManager)
200  return m_GadgetManager.GetHeldGadget();
201  return null;
202  }
203 
204  //------------------------------------------------------------------------------------------------
206  SCR_GadgetComponent GetHeldGadgetComponent()
207  {
208  if (m_GadgetManager)
209  return m_GadgetManager.GetHeldGadgetComponent();
210  return null;
211  }
212 
213  //------------------------------------------------------------------------------------------------
215  bool GetGadgetRaised()
216  {
217  if (m_GadgetManager)
218  return m_GadgetManager.GetIsGadgetADS();
219  return null;
220  }
221 
222  //------------------------------------------------------------------------------------------------
224  IEntity GetGadget(EGadgetType type)
225  {
226  if (m_GadgetManager)
227  return m_GadgetManager.GetGadgetByType(type);
228  return null;
229  }
230 
231  //------------------------------------------------------------------------------------------------
233  BaseMagazineComponent GetCurrentMagazine()
234  {
235  return m_CurrentMagazine;
236  }
237 
238  //------------------------------------------------------------------------------------------------
240  BaseMuzzleComponent GetCurrentMuzzle()
241  {
242  return m_CurrentMuzzle;
243  }
244 
245  //------------------------------------------------------------------------------------------------
247  BaseWeaponComponent GetCurrentWeapon()
248  {
249  return m_CurrentWeapon;
250  }
251 
252  //------------------------------------------------------------------------------------------------
254  ECharacterStance GetCharacterStance()
255  {
256  return m_eCharacterStance;
257  }
258 
259  //------------------------------------------------------------------------------------------------
261  ECompartmentType GetCompartmentType()
262  {
263  return m_eCompartmentType;
264  }
265 
266  //------------------------------------------------------------------------------------------------
268  float GetFocusModeAmount()
269  {
270  return m_fFocusMode;
271  }
272 
273  //------------------------------------------------------------------------------------------------
275  float GetCharacterBleedingTime()
276  {
277  return m_fBleedingTime;
278  }
279 
280  //------------------------------------------------------------------------------------------------
282  float GetCharacterSprintingTime()
283  {
284  return m_fSprintingTime;
285  }
286 
287  //------------------------------------------------------------------------------------------------
290  int GetAdditionalMagazinesCount()
291  {
292  return m_iAdditionalMagazines;
293  }
294 
295  //------------------------------------------------------------------------------------------------
297  int GetMedicalItemCount()
298  {
299  return m_iMedicalItemCount;
300  }
301 
302  //------------------------------------------------------------------------------------------------
303  int GetMedicalItemCountInQuickSlots()
304  {
305  return m_iMedicalItemCountInQuickSlots;
306  }
307 
308  //------------------------------------------------------------------------------------------------
310  bool GetIsCharacterInVehicle()
311  {
312  return m_bIsCharacterInVehicle;
313  }
314 
315  //------------------------------------------------------------------------------------------------
317  bool GetIsCharacterGettingIn()
318  {
319  return m_bIsCharacterGettingIn;
320  }
321 
322  //------------------------------------------------------------------------------------------------
324  bool GetIsCharacterGettingOut()
325  {
326  return m_bIsCharacterGettingOut;
327  }
328 
329  //------------------------------------------------------------------------------------------------
331  bool GetIsCharacterSprinting()
332  {
333  return m_bIsCharacterSprinting;
334  }
335 
336  //------------------------------------------------------------------------------------------------
338  bool GetIsCharacterSwimming()
339  {
340  return m_bIsCharacterSwimming;
341  }
342 
343  //------------------------------------------------------------------------------------------------
345  bool GetIsCharacterFalling()
346  {
347  return m_bIsCharacterFalling;
348  }
349 
350  //------------------------------------------------------------------------------------------------
352  bool GetIsCharacterReloading()
353  {
354  return m_bIsCharacterReloading;
355  }
356 
357  //------------------------------------------------------------------------------------------------
359  bool GetIsCharacterADS()
360  {
361  return m_bIsCharacterADS;
362  }
363 
364  //------------------------------------------------------------------------------------------------
366  bool GetIsCharacterWeaponRaised()
367  {
368  return m_bIsCharacterWeaponRaised;
369  }
370 
371  //------------------------------------------------------------------------------------------------
373  bool GetCanCharacterFireWeapon() { return m_bCanCharacterFireWeapon; }
374 
375  //------------------------------------------------------------------------------------------------
377  bool GetIsCharacterUsingItem()
378  {
379  return m_bIsCharacterUsingItem;
380  }
381 
382  //------------------------------------------------------------------------------------------------
384  bool GetCanCharacterGetOutVehicle()
385  {
386  return m_bCanCharacterGetOutVehicle;
387  }
388 
389  //------------------------------------------------------------------------------------------------
391  bool GetIsCharacterBleeding()
392  {
393  return m_bIsCharacterBleeding;
394  }
395 
396  //------------------------------------------------------------------------------------------------
397  bool GetIsCharacterUsingRadio()
398  {
399  return m_bCharacterIsUsingRadio;
400  }
401 
402  //------------------------------------------------------------------------------------------------
403  int GetCharacterRadiosCount()
404  {
405  return m_bCharacterRadiosCount;
406  }
407 
408  //------------------------------------------------------------------------------------------------
409  bool IsInventoryOpen()
410  {
411  return m_bIsInventoryOpen;
412  }
413 
414  //------------------------------------------------------------------------------------------------
415  bool IsQuickSlotAvailable()
416  {
417  return m_bIsQuickSlotAvailable;
418  }
419 
420  //------------------------------------------------------------------------------------------------
421  bool IsQuickSlotShown()
422  {
423  return m_bIsQuickSlotShown;
424  }
425 
426  //------------------------------------------------------------------------------------------------
427  bool IsGadgetSelection()
428  {
429  return m_bIsGadgetSelection;
430  }
431 
432  //------------------------------------------------------------------------------------------------
433  bool IsWeaponManipulation()
434  {
435  return m_bIsWeaponManipulation;
436  }
437 
438  //------------------------------------------------------------------------------------------------
440  IEntity GetCurrentItemEntity()
441  {
442  return m_CurrentItemEntity;
443  }
444 
445  //------------------------------------------------------------------------------------------------
447  IEntity GetCurrentWeaponEntity()
448  {
449  return m_CurrentWeaponEntity;
450  }
451 
452  //------------------------------------------------------------------------------------------------
454  IEntity GetCurrentVehicle()
455  {
456  return m_CurrentVehicle;
457  }
458 
459  //------------------------------------------------------------------------------------------------
461  BaseControllerComponent GetCurrentVehicleController()
462  {
463  return m_CurrentVehicleController;
464  }
465 
466  //------------------------------------------------------------------------------------------------
468  SignalsManagerComponent GetCurrentVehicleSignals()
469  {
470  return m_CurrentVehicleSignals;
471  }
472 
473  //------------------------------------------------------------------------------------------------
475  BaseWeaponComponent GetCurrentVehicleWeapon()
476  {
477  return m_CurrentVehicleWeapon;
478  }
479 
480  //------------------------------------------------------------------------------------------------
482  float GetCurrentVehicleTurboTime()
483  {
484  return m_fTurboTime;
485  }
486 
487  //------------------------------------------------------------------------------------------------
489  CharacterAnimationComponent GetAnimationComponent()
490  {
491  if (m_Character)
492  return m_Character.GetAnimationComponent();
493 
494  return null;
495  }
496 
497  //------------------------------------------------------------------------------------------------
498  SCR_CharacterDamageManagerComponent GetCharacterDamageComponent()
499  {
500  return m_CharacterDamageComponent;
501  }
502 
503  //------------------------------------------------------------------------------------------------
504  bool GetIsCharacterConscious()
505  {
506  return m_bIsCharacterConscious;
507  }
508 
509  //------------------------------------------------------------------------------------------------
510  bool GetHasBleedingLimbs()
511  {
512  return m_bHasBleedingLimbs;
513  }
514 
515  //------------------------------------------------------------------------------------------------
516  bool GetHasTourniquetLimb()
517  {
518  return m_bHasTourniquetLimb;
519  }
520 
521  //------------------------------------------------------------------------------------------------
522  bool IsValid()
523  {
524  return m_bIsValid;
525  }
526 
527  //------------------------------------------------------------------------------------------------
528  // Fetch data
529  //------------------------------------------------------------------------------------------------
530 
531  //------------------------------------------------------------------------------------------------
534  void FetchData(IEntity controlledEntity, float timeSlice)
535  {
536  // Detect when character changes
537  ChimeraCharacter character = ChimeraCharacter.Cast(controlledEntity);
538  if (character != m_Character)
539  {
540  m_Character = character;
541 
542  if (character)
543  {
544  m_CharacterController = character.GetCharacterController();
545  m_GadgetManager = SCR_GadgetManagerComponent.GetGadgetManager(character);
546  m_VON = SCR_VoNComponent.Cast(character.FindComponent(SCR_VoNComponent));
547  }
548  }
549 
550  if (!m_Character)
551  {
552  m_CharacterController = null;
553  m_GadgetManager = null;
554  m_VON = null;
555 
556  m_bIsValid = false;
557  return;
558  }
559 
561  {
562  m_bIsValid = false;
563  return;
564  }
565 
566  // Add inventory listeners for efficient magazine/grenade count updates
567  SCR_InventoryStorageManagerComponent storageManager = SCR_InventoryStorageManagerComponent.Cast(m_CharacterController.GetInventoryStorageManager());
568  if (storageManager != m_StorageManager)
569  {
570  if (m_StorageManager)
571  {
572  m_StorageManager.m_OnItemAddedInvoker.Remove(OnItemAddedListener);
573  m_StorageManager.m_OnItemRemovedInvoker.Remove(OnItemRemovedListener);
574  m_StorageManager.m_OnInventoryOpenInvoker.Remove(OnInventoryOpen);
575  m_StorageManager.m_OnQuickBarOpenInvoker.Remove(OnQuickSlotOpen);
576  }
577 
578  m_StorageManager = storageManager;
579 
580  if (m_StorageManager)
581  {
582  m_StorageManager.m_OnItemAddedInvoker.Insert(OnItemAddedListener);
583  m_StorageManager.m_OnItemRemovedInvoker.Insert(OnItemRemovedListener);
584  m_StorageManager.m_OnInventoryOpenInvoker.Insert(OnInventoryOpen);
585  m_StorageManager.m_OnQuickBarOpenInvoker.Insert(OnQuickSlotOpen);
586  }
587  }
588 
589  // Invalidates and clears any data prior to following collection
590  Clear();
591 
592  // Current character stance
593  m_eCharacterStance = m_CharacterController.GetStance();
594  // Is character ADS?
595  m_bIsCharacterADS = m_CharacterController.IsWeaponADS();
596  // Is character sprinting?
597  m_bIsCharacterSprinting = m_CharacterController.IsSprinting();
598  // Is character swimming?
599  m_bIsCharacterSwimming = m_CharacterController.IsSwimming();
600  // Is character falling? (is airborne?)
601  m_bIsCharacterFalling = m_CharacterController.IsFalling();
602  // Is character in vehicle?
603  m_bIsCharacterInVehicle = m_Character.IsInVehicle();
604  // Can character get out?
605  m_bCanCharacterGetOutVehicle = m_CharacterController.CanGetOutVehicleScript();
606  // Is character weapon raised?
607  m_bIsCharacterWeaponRaised = m_CharacterController.IsWeaponRaised();
608  // Can character fire weapon
609  m_bCanCharacterFireWeapon = m_CharacterController.CanFire();
610  // Is character currently using an item?
611  m_bIsCharacterUsingItem = m_CharacterController.IsUsingItem();
612  // Item that character is holding in his right hand
613  m_CurrentItemEntity = m_CharacterController.GetAttachedGadgetAtLeftHandSlot();
614 
615  // Temporary sprinting time tracking
616  if (m_bIsCharacterSprinting && !m_CharacterController.GetIsSprintingToggle())
617  m_fSprintingTime += timeSlice;
618  else
619  m_fSprintingTime = 0;
620 
621  // Vehicle compartment and controls
622  CompartmentAccessComponent compartmentAccess = m_Character.GetCompartmentAccessComponent();
623 
624  if (compartmentAccess)
625  {
626  m_bCanCharacterGetOutVehicle = m_bCanCharacterGetOutVehicle && compartmentAccess.CanGetOutVehicle();
627  m_bIsCharacterGettingIn = compartmentAccess.IsGettingIn();
628  m_bIsCharacterGettingOut = compartmentAccess.IsGettingOut();
629 
630  // Vehicle compartment
631  BaseCompartmentSlot slot = compartmentAccess.GetCompartment();
632  if (slot)
633  {
634  // Vehicle
635  IEntity vehicle = slot.GetOwner();
636 
637  // In case the slot is actually in the injected compartment, like the backseats of Jeep
638  vehicle = GetVehicle(vehicle);
639 
640  if (vehicle != m_CurrentVehicle)
641  {
642  m_CurrentVehicle = vehicle;
643 
644  if (vehicle)
645  {
646  m_CurrentVehicleSignals = SignalsManagerComponent.Cast(vehicle.FindComponent(SignalsManagerComponent));
647  }
648  }
649 
650  // Temporary turbo time tracking
651  // TODO: Condition activation time
652  m_eCompartmentType = slot.GetType();
653  if (m_eCompartmentType == ECompartmentType.Pilot && GetGame().GetInputManager().GetActionTriggered("CarTurbo"))
654  m_fTurboTime += timeSlice;
655  else
656  m_fTurboTime = 0;
657 
658  // Turret controls
659  m_CurrentVehicleController = slot.GetController();
660  TurretControllerComponent turretController = TurretControllerComponent.Cast(m_CurrentVehicleController);
661  if (turretController)
662  {
663  BaseWeaponManagerComponent weaponManager = turretController.GetWeaponManager();
664  if (weaponManager)
665  m_CurrentVehicleWeapon = weaponManager.GetCurrentWeapon();
666  }
667  }
668  else
669  {
670  m_CurrentVehicle = null;
671  }
672  }
673 
674  // Clear vehicle variables
675  if (!m_CurrentVehicle)
676  {
677  m_CurrentVehicleSignals = null;
678  m_CurrentVehicleController = null;
679  }
680 
681  // Current character weapon manager
682  // Current character weapon
683  BaseWeaponManagerComponent weaponManager = m_CharacterController.GetWeaponManagerComponent();
684  if (weaponManager)
685  {
686  // Weapon slot -> weapon entity
687  WeaponSlotComponent currentSlot = weaponManager.GetCurrentSlot();
688  if (currentSlot)
689  m_CurrentWeaponEntity = currentSlot.GetWeaponEntity();
690 
691  // BaseWeaponComponent
692  BaseWeaponComponent currentWeapon = weaponManager.GetCurrent();
693  if (currentWeapon != m_CurrentWeapon)
694  {
695  m_CurrentWeapon = currentWeapon;
696  m_bCanFetchInventory = true;
697  }
698 
699  // Muzzle and magazine
700  if (m_CurrentWeapon)
701  {
702  m_CurrentMuzzle = m_CurrentWeapon.GetCurrentMuzzle();
703  m_CurrentMagazine = m_CurrentWeapon.GetCurrentMagazine();
704  }
705 
706  // Is character reloading
707  m_bIsCharacterReloading = m_CharacterController.IsReloading();
708  }
709 
710  // Does character have additional mags for current weapon?
711  if (m_bCanFetchInventory && m_StorageManager)
712  {
713  if (m_CurrentWeapon)
714  m_iAdditionalMagazines = m_StorageManager.GetMagazineCountByWeapon(m_CurrentWeapon);
715 
716  m_iMedicalItemCount = m_StorageManager.GetHealthComponentCount();
717 
718  // Check medical items in quick slots
719  SCR_CharacterInventoryStorageComponent characterStorage = m_StorageManager.GetCharacterStorage();
720  if (characterStorage)
721  {
722  m_iMedicalItemCountInQuickSlots = 0;
723 
724  array<IEntity> items = characterStorage.GetQuickSlotItems();
725  foreach (IEntity item : items)
726  {
727  if (item && item.FindComponent(SCR_ConsumableItemComponent))
728  m_iMedicalItemCountInQuickSlots++;
729  }
730  }
731 
732  m_bCanFetchInventory = false;
733  }
734 
735  // Camera handler to check focus mode
736  CameraHandlerComponent cameraHandler = m_CharacterController.GetCameraHandlerComponent();
737  if (cameraHandler)
738  m_fFocusMode = cameraHandler.GetFocusMode();
739 
740  // Fetch available gadgets
741  m_bIsGadgetSelection = GetGame().GetInputManager().GetActionTriggered("GadgetSelection");
742  m_bIsWeaponManipulation = GetGame().GetInputManager().GetActionTriggered("WeaponManipulation");
743 
744  // VON status
745  if (m_VONController)
746  m_bCharacterRadiosCount = m_VONController.GetVONEntryCount();
747 
748  // VON usage
749  if (m_VON)
750  {
751  m_bCharacterIsUsingRadio = m_VON.IsTransmitingRadio();
752  if (m_bCharacterIsUsingRadio)
753  m_bIsRadioLongRange = m_VONController.IsUsingLRR();
754 
755  m_bOwnsLongRangeRadio = m_VONController.IsLRRAvailable();
756  }
757 
758  // Addition data
759  FetchHealthData(timeSlice);
760 
761  // Map data
762  if (m_MapEntity && m_MapEntity.IsOpen())
763  FetchMapData(timeSlice);
764  }
765 
766  //------------------------------------------------------------------------------------------------
768  protected IEntity GetVehicle(IEntity vehicle)
769  {
770  IEntity parent;
771 
772  if (vehicle.Type() != Vehicle)
773  parent = vehicle.GetParent();
774 
775  if (parent)
776  vehicle = GetVehicle(parent);
777 
778  return vehicle;
779  }
780 
781  //------------------------------------------------------------------------------------------------
783  protected void FetchHealthData(float timeSlice)
784  {
785  m_CharacterDamageComponent = SCR_CharacterDamageManagerComponent.Cast(m_Character.GetDamageManager());
786  if (!m_CharacterDamageComponent)
787  {
788  Print("[SCR_AvailableActionsConditionData] - can't fetch health data!", LogLevel.WARNING);
789  return;
790  }
791 
792  // Check bleeding
793  if (m_CharacterDamageComponent)
794  m_bIsCharacterBleeding = m_CharacterDamageComponent.IsDamagedOverTime(EDamageType.BLEEDING);
795 
796  // Bleeding time tracking
797  if (m_bIsCharacterBleeding)
798  m_fBleedingTime += timeSlice;
799  else
800  m_fBleedingTime = 0;
801 
803  m_bIsCharacterConscious = !m_CharacterController.IsUnconscious();
804 
805  // Has tourniquet on any limb
806  array<ECharacterHitZoneGroup> limbs = {};
807  m_CharacterDamageComponent.GetAllExtremities(limbs);
808 
809  for (int i = 0, count = limbs.Count(); i < count; i++)
810  {
811  m_bHasTourniquetLimb = m_CharacterDamageComponent.GetGroupTourniquetted(limbs[i]);
812  if (m_bHasTourniquetLimb)
813  break;
814  }
815  }
816 
817  //------------------------------------------------------------------------------------------------
819  protected void FetchMapData(float timeSlice)
820  {
821  m_bCanRotateMapElement = false;
822  m_bCanDragMapElement = false;
823  m_bCanActivateMapElement = false;
824 
825  array<Widget> mapWidgetsUnderCursor = SCR_MapCursorModule.GetMapWidgetsUnderCursor();
826 
828  foreach (Widget widget : mapWidgetsUnderCursor)
829  {
830  if (!widget)
831  continue;
832 
833  moveComp = SCR_MapElementMoveComponent.Cast(widget.FindHandler(SCR_MapElementMoveComponent));
834  if (!moveComp)
835  continue;
836 
837  if (moveComp.m_bCanRotate)
838  m_bCanRotateMapElement = true;
839 
840  if (moveComp.m_bCanDrag)
841  m_bCanDragMapElement = true;
842 
843  if (moveComp.m_bCanActivate)
844  m_bCanActivateMapElement = true;
845  }
846  }
847 
848  //------------------------------------------------------------------------------------------------
849  // Contructor
850  //------------------------------------------------------------------------------------------------
851 
852  //------------------------------------------------------------------------------------------------
855  {
856  m_VONController = SCR_VONController.Cast(GetGame().GetPlayerController().FindComponent(SCR_VONController));
857  m_MapEntity = SCR_MapEntity.GetMapInstance();
858  }
859 };
m_MapEntity
protected SCR_MapEntity m_MapEntity
Definition: SCR_MapGadgetComponent.c:14
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
ECharacterStance
ECharacterStance
Definition: ECharacterStance.c:12
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_GadgetManagerComponent
Definition: SCR_GadgetManagerComponent.c:138
ECompartmentType
ECompartmentType
Definition: ECompartmentType.c:7
WeaponSlotComponent
Definition: WeaponSlotComponent.c:12
m_CharacterController
SCR_CharacterPerceivableComponentClass m_CharacterController
m_VONController
protected SCR_VONController m_VONController
Definition: SCR_VonDisplay.c:101
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
SCR_MapCursorModule
Map cursor behavior and mode setup.
Definition: SCR_MapCursorModule.c:39
SCR_CharacterDamageManagerComponent
Definition: SCR_CharacterDamageManagerComponent.c:18
BaseWeaponComponent
Definition: BaseWeaponComponent.c:12
m_GadgetManager
SCR_GadgetManagerComponent m_GadgetManager
Definition: SCR_GadgetManagerComponent.c:2
SCR_MapElementMoveComponent
Attach this component to a widget in a map layout to configure interactions.
Definition: SCR_MapToolInteractionUI.c:5
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
SCR_WeaponQuickSlotAvailableCondition
Definition: SCR_WeaponQuickSlotAvailableCondition.c:2
GetInputManager
protected InputManager GetInputManager()
Definition: SCR_BaseManualCameraComponent.c:65
SCR_InventoryAvailableCondition
Definition: SCR_InventoryAvailableCondition.c:2
TurretControllerComponent
Definition: TurretControllerComponent.c:12
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
EDamageType
EDamageType
Definition: EDamageType.c:12
BaseMuzzleComponent
Definition: BaseMuzzleComponent.c:12