DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionTargetsCursor.c
См. документацию.
2{
5 protected vector m_ScreenPos;
6 protected int m_CompIdx;
7
9 {
10 m_CachedObject = null;
12 m_CompIdx = -1;
13 }
14
16 void Store(Object obj, vector pos, int compIdx)
17 {
18 if (!m_CachedObject)
19 {
20 m_CachedObject = obj;
21 m_CursorWPos = pos;
22 m_CompIdx = compIdx;
23 }
24 }
25
28 {
30 {
31 m_CachedObject = null;
33 m_CompIdx = -1;
34 }
35 }
36
38 {
39 return m_CachedObject;
40 }
41
43 {
44 return m_CursorWPos;
45 }
46
48 {
49 return m_CompIdx;
50 }
51};
52
54{
56 PPERequester_BurlapSackEffects,
57 PPERequester_FlashbangEffects
58 };
59
64
70 protected IngameHud m_Hud;
71
73
74 protected int m_InteractActionsNum;
76 protected int m_ItemActionsNum;
78 protected typename m_SelectedActionCategory;
79 protected bool m_HealthEnabled;
80 protected bool m_QuantityEnabled;
81 protected bool m_FixedOnPosition;
82 protected bool m_Hidden;
83 protected bool m_TargetItemFrozen;
84
85 protected Widget m_Root;
87 protected Widget m_ItemLeft;
88
90 protected float m_MaxWidthChild;
91 protected float m_RootWidth;
92 protected float m_RootHeight;
93
95 {
96 m_Interact = null;
98 m_Single = null;
99 m_Continuous = null;
100 m_AM = null;
101
102 m_HealthEnabled = true;
103 m_QuantityEnabled = true;
104
106 m_Hidden = false;
107 m_TargetItemFrozen = false;
109
110 m_Hud = GetHud();
111
113
114 g_Game.GetMission().GetOnInputPresetChanged().Insert(OnInputPresetChanged);
115 g_Game.GetMission().GetOnInputDeviceChanged().Insert(OnInputDeviceChanged);
116 }
117
119
120 // Controls appearance of the builded cursor
121 void SetHealthVisibility(bool state)
122 {
123 m_HealthEnabled = state;
124 }
125
126 void SetQuantityVisibility(bool state)
127 {
128 m_QuantityEnabled = state;
129 }
130
132 void SetInteractXboxIcon(string imageset_name, string image_name);
133 void SetContinuousInteractXboxIcon(string imageset_name, string image_name);
134 void SetSingleXboxIcon(string imageset_name, string image_name);
135 void SetContinuousXboxIcon(string imageset_name, string image_name);
136 protected void SetXboxIcon(string name, string imageset_name, string image_name);
138
139 protected void SetControllerIcon(string pWidgetName, string pInputName)
140 {
141 RichTextWidget w = RichTextWidget.Cast(m_Root.FindAnyWidget(pWidgetName + "_btn_icon_xbox"));
142 w.SetText(InputUtils.GetRichtextButtonIconFromInputAction(pInputName, "", EUAINPUT_DEVICE_CONTROLLER));
143 }
144
145 protected void OnWidgetScriptInit(Widget w)
146 {
147 m_Root = w;
148 m_Root.Show(false);
149 m_Root.SetHandler(this);
150
154
155 m_Container = w.FindAnyWidget("container");
156 m_ItemLeft = w.FindAnyWidget("item_left");
157
158 m_Root.Update();
159 }
160
161 protected void OnInputPresetChanged()
162 {
163 #ifdef PLATFORM_CONSOLE
165 #endif
166 }
167
168 protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
169 {
171 }
172
175 {
176 SetControllerIcon("interact", "UAAction");
177 SetControllerIcon("continuous_interact", "UAAction");
178 SetControllerIcon("single", "UADefaultAction");
179 SetControllerIcon("continuous", "UADefaultAction");
180 }
181
184 {
185 bool showConsoleIcons = false;
186 #ifdef PLATFORM_CONSOLE
187 showConsoleIcons = g_Game.GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER || !g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
188 #endif
189
190 ShowXboxHidePCIcons("interact", showConsoleIcons);
191 ShowXboxHidePCIcons("continuous_interact", showConsoleIcons);
192 ShowXboxHidePCIcons("continuous", showConsoleIcons);
193 ShowXboxHidePCIcons("single", showConsoleIcons);
194 }
195
196 protected void PrepareCursorContent()
197 {
198 m_TargetItemFrozen = false;
199 int health = -1;
200 int cargoCount = 0;
201 int q_type = 0;
202 int q_min, q_max = -1;
203 float q_cur = -1.0;
204
207 health = GetItemHealth();
208 SetItemHealth(health, "item", "item_health_mark", m_HealthEnabled);
210 GetItemQuantity(q_type, q_cur, q_min, q_max);
212 GetItemCargoCount(cargoCount);
214 SetItemQuantity(q_type, q_cur, q_min, q_max, "item", "item_quantity_pb", "item_quantity_text", m_QuantityEnabled);
215 SetInteractActionIcon("interact", "interact_icon_frame", "interact_btn_inner_icon", "interact_btn_text");
216 SetItemDesc(GetItemDesc(m_Interact), cargoCount, "item", "item_desc");
217 SetActionWidget(m_Interact, GetActionDesc(m_Interact), "interact", "interact_action_name");
218
219 SetInteractActionIcon("continuous_interact", "continuous_interact_icon_frame", "continuous_interact_btn_inner_icon", "continuous_interact_btn_text");
220 SetActionWidget(m_ContinuousInteract, GetActionDesc(m_ContinuousInteract), "continuous_interact", "continuous_interact_action_name");
221
222 SetActionWidget(m_Single, GetActionDesc(m_Single), "single", "single_action_name");
223 SetActionWidget(m_Continuous, GetActionDesc(m_Continuous), "continuous", "continuous_action_name");
224 SetMultipleItemAction("single_mlt_wrapper", "single_mlt_wrapper_not_select");
225 SetMultipleContinuousItemAction("continuous_mlt_wrapper", "continuous_mlt_wrapper_not_select");
226 SetMultipleInteractAction("interact_mlt_wrapper", "interact_mlt_wrapper_not_select");
227 SetMultipleContinuousInteractAction("continuous_interact_mlt_wrapper", "continuous_interact_mlt_wrapper_not_select");
228 }
229
230 protected void BuildFixedCursor()
231 {
232 int w, h, x, y;
233
235 GetScreenSize(w, h);
236 x = w/2 + 32;
237 y = h/2 + 32;
238
239 m_Root.SetPos(x, y);
240 }
241
242 protected void BuildFloatingCursor(bool forceRebuild)
243 {
244 float pos_x, pos_y = 0.0;
245
247
249 if (forceRebuild || m_Target.GetComponentIndex() != m_CachedObject.GetCursorCompIdx())
250 {
251 GetOnScreenPosition(pos_x, pos_y);
252 }
254 else
255 {
256 vector screen_pos = TransformToScreenPos(m_CachedObject.GetCursorWorldPos());
257
258 pos_x = screen_pos[0];
259 pos_y = screen_pos[1];
260 }
261
262 pos_x = Math.Ceil(pos_x);
263 pos_y = Math.Ceil(pos_y);
264
265 Widget parentWdg = m_Root.GetParent();
266
267 float screen_w = 0;
268 float screen_h = 0;
269
270 float wdg_w = 0;
271 float wdg_h = 0;
272
273 parentWdg.GetScreenSize(screen_w, screen_h);
274 m_Root.GetSize(wdg_w, wdg_h);
275
276 if (pos_x + wdg_w > screen_w)
277 pos_x = screen_w - wdg_w;
278
279 if (pos_y + wdg_h > screen_h)
280 pos_y = screen_h - wdg_h;
281
282 m_Root.SetPos(pos_x, pos_y);
283 }
284
285 override bool OnUpdate(Widget w)
286 {
287 if (m_Root == w)
288 {
289 Update();
290 return true;
291 }
292
293 return false;
294 }
295
296 protected void HideWidget()
297 {
298 if (m_Root.IsVisible())
299 {
300 m_Root.Show(false);
301 m_CachedObject.Invalidate();
302 }
303 }
304
305 void Update()
306 {
307 if (m_Player && !m_Player.IsAlive()) // handle respawn
308 {
309 m_Player = null;
310 m_AM = null;
311 }
312
313 if (!m_Player)
314 GetPlayer();
315
316 if (!m_AM)
318
319 if (!m_Player || !m_AM)
320 return;
321
322 if (m_Player.IsInVehicle() || m_AM.GetRunningAction())
323 m_Hidden = true;
324
325
326 /*
327 #ifdef DIAG_DEVELOPER
328 if (DeveloperFreeCamera.IsFreeCameraEnabled())
329 HideWidget();
330 return;
331 #endif
332 */
333
334 bool isVisionObstructionActive = PPEManagerStatic.GetPPEManager().IsAnyRequesterRunning(VISION_OBSTRUCTION_PPEFFECTS_TYPES);
335
337 if (isVisionObstructionActive || m_Hud.GetHudVisibility().IsContextFlagActive(IngameHudVisibility.HUD_HIDE_FLAGS))
338 {
339 HideWidget();
340 return;
341 }
342
343 GetTarget();
344 GetActions();
345
347 bool showTarget = (m_Target && !m_Hidden) || m_Interact || m_ContinuousInteract;
348 if (!showTarget)
349 {
350 if (m_Single)
351 showTarget = m_Single.HasTarget();
352
353 if (m_Continuous)
354 showTarget = showTarget || m_Continuous.HasTarget();
355 }
356
357 if (showTarget)
358 {
360 if (m_Target.GetObject() == null && (m_Interact || m_ContinuousInteract || m_Single || m_Continuous))
361 {
362 //Print(">> fixed widget");
363 m_CachedObject.Invalidate();
365 m_Root.Show(true);
366 m_FixedOnPosition = false;
367 m_Hidden = false;
368 return;
369 }
370 else if (m_Target.GetObject() != null && !m_Target.GetObject().IsHologram() && (!m_Target.GetParent() || m_Target.GetParent() && !m_Target.GetParent().IsHologram()))
371 {
374 if (m_Target.GetObject() != m_CachedObject.Get())
375 {
377 {
378 //Print(">> non-cached widget");
379 m_CachedObject.Invalidate();
381 m_Root.Show(true);
382 m_Hidden = false;
383 return;
384 }
385 else
386 {
387 //Print(">> non-cached widget (fixed)");
388 m_CachedObject.Invalidate();
390 m_Root.Show(true);
391 m_FixedOnPosition = false;
392 m_Hidden = false;
393 return;
394 }
395 }
397 else if (m_Target.GetObject() == m_CachedObject.Get())
398 {
400 {
401 //Print(">> cached widget");
403 m_Root.Show(true);
404 m_Hidden = false;
405 return;
406 }
407 else
408 {
409 //Print(">> cached widget (fixed)");
410 m_CachedObject.Invalidate();
412 m_Root.Show(true);
413 m_FixedOnPosition = false;
414 m_Hidden = false;
415 return;
416 }
417 }
418 }
419 else
420 {
421 if (m_Root.IsVisible())
422 {
423 m_CachedObject.Invalidate();
424 m_Root.Show(false);
425 m_Hidden = false;
426
427 // remove previous backlit
428 GetDayZGame().GetBacklit().HintClear();
429 }
430 }
431 }
432 else
433 {
434 if (m_Root.IsVisible())
435 {
436 m_CachedObject.Invalidate();
437 m_Root.Show(false);
438 m_FixedOnPosition = false;
439
440 // remove previous backlit
441 GetDayZGame().GetBacklit().HintClear();
442 }
443
444 m_Hidden = false;
445 }
446
447 m_MaxWidthChild = 350;
448 }
450 protected void ShowXboxHidePCIcons(string widget, bool show_xbox_icon)
451 {
452 m_Root.FindAnyWidget(widget + "_btn_icon_xbox").Show(show_xbox_icon);
453 m_Root.FindAnyWidget(widget + "_btn_icon").Show(!show_xbox_icon);
454 }
455
456
457 //! transform world pos to screen pos (related to parent widget size)
458 protected vector TransformToScreenPos(vector pWorldPos)
459 {
460 float parent_width, parent_height;
461 vector transformed_pos, screen_pos;
462
464 screen_pos = g_Game.GetScreenPosRelative(pWorldPos);
466 m_Root.GetParent().GetScreenSize(parent_width, parent_height);
467
469 transformed_pos[0] = screen_pos[0] * parent_width;
470 transformed_pos[1] = screen_pos[1] * parent_height;
471
472 return transformed_pos;
473 }
475 protected void GetOnScreenPosition(out float x, out float y)
476 {
477 const float DEFAULT_HANDLE_OFFSET = 0.2;
478 const string CE_CENTER_COMP_NAME = "ce_center";
479 const string MEM_LOD_NAME = LOD.NAME_MEMORY;
480
481 int compIdx;
482 float pivotOffset = 0.0;
483 float memOffset = 0.0;
484 string compName;
485
486 bool isTargetForced = false;
487
488 vector worldPos;
489 vector modelPos;
490
491 LOD lod;
492
493 array<Selection> memSelections = new array<Selection>();
494 array<string> components = new array<string>; // for components with multiple selection
495
496 Object object;
497
498 if (m_Target)
499 {
500 object = m_Target.GetObject();
501 compIdx = m_Target.GetComponentIndex();
502
503 if (m_Target.GetCursorHitPos() == vector.Zero)
504 isTargetForced = true;
505 }
506 else
507 {
508 return;
509 }
510
511 if (object)
512 {
513 if (!isTargetForced)
514 {
515 compName = object.GetActionComponentName(compIdx);
516 int namedComponentType = object.GetActionComponentNameList(compIdx, components);
517
518 if (!object.IsInventoryItem() && (object.HasFixedActionTargetCursorPosition() || namedComponentType == 0))
519 {
520 m_FixedOnPosition = true;
521 return;
522 }
523
524 pivotOffset = object.ConfigGetFloat("actionTargetPivotOffsetY");
525 memOffset = object.ConfigGetFloat("actionTargetMemOffsetY");
526
528 lod = object.GetLODByName(MEM_LOD_NAME);
529 if (lod != null)
530 {
532 lod.GetSelections(memSelections);
533
534 // items with CE_Center mem point
535 if (MiscGameplayFunctions.IsComponentInSelection(memSelections, CE_CENTER_COMP_NAME))
536 {
537 for (int i2 = 0; i2 < memSelections.Count(); ++i2)
538 {
539 if (memSelections[i2].GetName() == CE_CENTER_COMP_NAME && memSelections[i2].GetVertexCount() == 1)
540 {
541 m_FixedOnPosition = false;
542 modelPos = object.GetSelectionPositionMS(CE_CENTER_COMP_NAME);
543 worldPos = object.ModelToWorld(modelPos);
544 if (memOffset != 0.0)
545 {
546 worldPos[1] = worldPos[1] + memOffset;
547 }
548 else
549 {
550 worldPos[1] = worldPos[1] + DEFAULT_HANDLE_OFFSET;
551 }
552 }
553 }
554
556 m_CachedObject.Store(object, worldPos, compIdx);
557 }
559 else if (!compName.Contains("ladder") && IsComponentInSelection(memSelections, compName))
560 {
561 for (int i1 = 0; i1 < memSelections.Count(); ++i1)
562 {
564 if (memSelections[i1].GetName() == compName && memSelections[i1].GetVertexCount() == 1)
565 {
566 modelPos = object.GetSelectionPositionMS(compName);
567 worldPos = object.ModelToWorld(modelPos);
568
569 m_FixedOnPosition = false;
570 if (object.GetType() == "Fence" || object.GetType() == "Watchttower" || object.GetType() == "GardenPlot")
571 m_FixedOnPosition = true;
572
573 if (memOffset != 0.0)
574 {
575 worldPos[1] = worldPos[1] + memOffset;
576 }
577 else
578 {
579 worldPos[1] = worldPos[1] + DEFAULT_HANDLE_OFFSET;
580 }
581 }
582
584 if (memSelections[i1].GetName() == compName && memSelections[i1].GetVertexCount() > 1)
585 {
586 for (int j = 0; j < components.Count(); ++j)
587 {
588 if (IsComponentInSelection(memSelections, components[j]))
589 {
590 modelPos = object.GetSelectionPositionMS(components[j]);
591 worldPos = object.ModelToWorld(modelPos);
592
593 m_FixedOnPosition = false;
594 if (memOffset != 0.0)
595 {
596 worldPos[1] = worldPos[1] + memOffset;
597 }
598 else
599 {
600 worldPos[1] = worldPos[1] + DEFAULT_HANDLE_OFFSET;
601 }
602 }
603 }
604 }
605 }
606
608 m_CachedObject.Store(object, worldPos, -1);
609 }
611 else if (compName.Contains("ladder") && IsComponentInSelection(memSelections, compName))
612 {
613 vector ladderHandlePointLS, ladderHandlePointWS;
614 vector closestHandlePos;
615 float lastDistance = 0;
616
617 for (int i3 = 0; i3 < memSelections.Count(); ++i3)
618 {
619 if (memSelections[i3].GetName() == compName && memSelections[i3].GetVertexCount() > 1)
620 {
621 ladderHandlePointLS = memSelections[i3].GetVertexPosition(lod, 0);
622 ladderHandlePointWS = object.ModelToWorld(ladderHandlePointLS);
623 closestHandlePos = ladderHandlePointWS;
624 lastDistance = Math.AbsFloat(vector.DistanceSq(ladderHandlePointWS, m_Player.GetPosition()));
625
626 for (int k = 1; k < memSelections[i3].GetVertexCount(); ++k)
627 {
628 ladderHandlePointLS = memSelections[i3].GetVertexPosition(lod, k);
629 ladderHandlePointWS = object.ModelToWorld(ladderHandlePointLS);
630
631 if (lastDistance > Math.AbsFloat(vector.DistanceSq(ladderHandlePointWS, m_Player.GetPosition())))
632 {
633 lastDistance = Math.AbsFloat(vector.DistanceSq(ladderHandlePointWS, m_Player.GetPosition()));
634 closestHandlePos = ladderHandlePointWS;
635 }
636 }
637
638 m_FixedOnPosition = false;
639 worldPos = closestHandlePos;
640 if (memOffset != 0.0)
641 {
642 worldPos[1] = worldPos[1] + memOffset;
643 }
644 else
645 {
646 worldPos[1] = worldPos[1] + DEFAULT_HANDLE_OFFSET;
647 }
648 }
649 }
650
652 m_CachedObject.Store(object, worldPos, -1);
653 }
654 else
655 {
656 m_FixedOnPosition = true;
657 }
658 }
659 else
660 {
661 m_FixedOnPosition = true;
662 }
663 }
664 else
665 {
666 m_FixedOnPosition = true;
667 }
668
669 vector pos = TransformToScreenPos(worldPos);
670
671 x = pos[0];
672 y = pos[1];
673 }
674
675 worldPos = vector.Zero;
676 isTargetForced = false;
677 }
678
679 // kept for backward compatibility
680 protected bool IsComponentInSelection(array<Selection> selection, string compName)
681 {
682 return MiscGameplayFunctions.IsComponentInSelection(selection, compName);
683 }
684
685 // getters
687 protected void GetPlayer()
688 {
689 Class.CastTo(m_Player, g_Game.GetPlayer());
690 }
692 protected void GetActionManager()
693 {
694 if (m_Player && m_Player.IsPlayerSelected())
695 {
696 Class.CastTo(m_AM, m_Player.GetActionManager());
697 }
698 else
699 {
700 m_AM = null;
701 }
702 }
703
704 //! get actions from Action Manager
705 protected void GetActions()
706 {
707 m_Interact = null;
709 m_Single = null;
710 m_Continuous = null;
711
712 if (!m_AM) return;
713 if (!m_Target) return;
714 if (m_Player.IsSprinting()) return;
715 if (m_Player.IsInVehicle()) return; // TODO: TMP: Car AM rework needed
716
717 m_Interact = m_AM.GetPossibleAction(InteractActionInput);
719 m_Single = m_AM.GetPossibleAction(DefaultActionInput);
721
722 m_InteractActionsNum = m_AM.GetPossibleActionCount(InteractActionInput);
724 m_ItemActionsNum = m_AM.GetPossibleActionCount(DefaultActionInput);
726
727 m_SelectedActionCategory = m_AM.GetSelectedActionCategory();
728
729 if (m_Interact)
730 {
731 m_DisplayInteractTarget = m_Interact.GetDisplayInteractObject(m_Player, m_Target);
732 }
733 else if (m_Single)
734 {
735 m_DisplayInteractTarget = m_Single.GetDisplayInteractObject(m_Player, m_Target);
736 }
737 else if (m_ContinuousInteract)
738 {
740 }
741 else
742 {
744 }
745 }
747 protected void GetTarget()
748 {
749 if (!m_AM)
750 return;
751
752 m_Target = m_AM.FindActionTarget();
753 if (m_Target && m_Target.GetObject() && m_Target.GetObject().IsItemBase())
754 {
755 ItemBase item = ItemBase.Cast(m_Target.GetObject());
756 InventoryLocation invLocation = new InventoryLocation();
757 item.GetInventory().GetCurrentInventoryLocation(invLocation);
758
759 if ((!item.IsTakeable() && !item.IsActionTargetVisible()) || (m_Player && m_Player.IsInVehicle()) || invLocation.GetType() != InventoryLocationType.GROUND)
760 m_Hidden = true;
761 }
762 }
764 protected string GetActionDesc(ActionBase action)
765 {
766 string desc = "";
767 if (action && action.GetText())
768 {
769 desc = action.GetText();
770
771 if (desc && action.DisplayTargetInActionText())
772 string extraDescription = action.GetTargetName(m_Player, m_Target);
773 if (extraDescription)
774 desc = string.Format("%1 (%2)", desc, extraDescription);
775 }
776
777 return desc;
778 }
779
780 //Getting NAME of the entity
781 protected string GetItemDesc(ActionBase action)
782 {
783 string desc = "";
785 if (!tgObject && m_Target)
786 {
787 tgObject = m_Target.GetObject();
788 }
789
790 if (tgObject)
791 {
792 //BreakOut if item is ruined
793 Object tgParent = m_Target.GetParent();
794 if (!tgObject.IsAlive())
795 {
796 //Fetch parent item name if one is present
797 if (!tgParent || tgObject.DisplayNameRuinAttach())
798 desc = tgObject.GetDisplayName();
799 else
800 desc = tgParent.GetDisplayName();
801 return desc;
802 }
803
804 EntityAI targetEntity;
805
806 if (tgParent && (tgParent.IsItemBase() || tgParent.IsTransport()))
807 {
808 targetEntity = EntityAI.Cast(tgParent);
809 }
810
811 if (tgObject.IsItemBase() || tgObject.IsTransport())
812 {
813 targetEntity = EntityAI.Cast(tgObject);
814 }
815
816 if (targetEntity && targetEntity.ShowZonesHealth())
817 {
818 string zone = "";
819
820 array<string> selections = new array<string>();
821
822 //NOTE: relevant fire geometry and view geometry selection names MUST match in order to get a valid damage zone
823 if (targetEntity.IsInherited(TentBase) && TentBase.Cast(targetEntity).GetState() != TentBase.PACKED)
824 {
825 //This is really specific to tents, as they use proxies. Hence object must be used
826 if (DamageSystem.GetDamageZoneFromComponentName(targetEntity, tgObject.GetActionComponentName(m_Target.GetComponentIndex(), LOD.NAME_FIRE), zone))
827 {
828 desc = DamageSystem.GetDamageDisplayName(targetEntity, zone);
829 }
830 }
831 else
832 {
833 targetEntity.GetActionComponentNameList(m_Target.GetComponentIndex(), selections, LOD.NAME_VIEW);
834
835 //Important to get display name from component tied to multiple selections
836 for (int s = 0; s < selections.Count(); s++)
837 {
838 if (DamageSystem.GetDamageZoneFromComponentName(targetEntity, selections[s], zone))
839 {
840 desc = DamageSystem.GetDamageDisplayName(targetEntity, zone);
841 }
842 }
843 }
844 }
845
846 //Safety check to output something to widget
847 if (targetEntity && desc == "")
848 desc = targetEntity.GetDisplayName();
849 }
850
851 return desc;
852 }
854 protected int GetItemHealth()
855 {
856 int health = -1;
857
858 if (m_Interact && !m_Interact.HasTarget())
859 {
860 return health;
861 }
862
864 if (!tgObject && m_Target)
865 {
866 tgObject = m_Target.GetObject();
867 }
868
869 if (tgObject)
870 {
871 Object tgParent = m_Target.GetParent();
872 EntityAI targetEntity;
873
874 //Return specific part health, even if display name is from parent
875 if (!tgObject.IsAlive())
876 {
877 EntityAI ent;
878 if (m_TargetItemFrozen && Class.CastTo(ent,tgObject) && (ent.IsAnimal() || ent.IsMan() || ent.IsZombie()))
879 health = -2; //frozen interaction later
880 else
881 health = tgObject.GetHealthLevel();
882
883 return health;
884 }
885
886 if (tgParent && (tgParent.IsItemBase() || tgParent.IsTransport()))
887 {
888 targetEntity = EntityAI.Cast(tgParent);
889 }
890
891 if (tgObject.IsItemBase() || tgObject.IsTransport())
892 {
893 targetEntity = EntityAI.Cast(tgObject);
894 }
895
896 if (targetEntity)
897 {
898 if (!targetEntity.IsDamageDestroyed())
899 {
900 string zone = "";
901 array<string> selections = new array<string>();
902
903 if (targetEntity.IsInherited(TentBase) && TentBase.Cast(targetEntity).GetState() != TentBase.PACKED)
904 {
905 //This is really specific to tents, as they use proxies. Hence object must be used
906 if (DamageSystem.GetDamageZoneFromComponentName(targetEntity, tgObject.GetActionComponentName(m_Target.GetComponentIndex(), LOD.NAME_FIRE), zone))
907 {
908 health = targetEntity.GetHealthLevel(zone);
909 }
910 }
911 else
912 {
913 //NOTE: relevant view geometry and view geometry selection names MUST match in order to get a valid damage zone
914 targetEntity.GetActionComponentNameList(m_Target.GetComponentIndex(), selections, LOD.NAME_VIEW);
915
916 for (int s = 0; s < selections.Count(); s++)
917 {
918 if (DamageSystem.GetDamageZoneFromComponentName(targetEntity , selections[s], zone))
919 {
920 health = targetEntity.GetHealthLevel(zone);
921 break;
922 }
923 }
924 }
925
926 if (zone == "")
927 health = targetEntity.GetHealthLevel();
928 }
929 }
930 else
931 {
932 health = tgObject.GetHealthLevel();
933 }
934 }
935
936 return health;
937 }
939 protected bool GetItemFrozen()
940 {
942 if (!tgObject && m_Target)
943 tgObject = m_Target.GetObject();
944
945 if (tgObject)
946 {
947 Object tgParent = m_Target.GetParent();
948 EntityAI targetEntity;
949
950 if (tgParent)
951 {
952 targetEntity = EntityAI.Cast(tgParent);
953 }
954 else
955 {
956 targetEntity = EntityAI.Cast(tgObject);
957 }
958
959 return (targetEntity && targetEntity.GetIsFrozen());
960 }
961
962 return false;
963 }
965 protected void GetItemQuantity(out int q_type, out float q_cur, out int q_min, out int q_max)
966 {
967 InventoryItem item = null;
968
969 if (m_Interact && !m_Interact.HasTarget())
970 {
971 return;
972 }
973
975 if (!tgObject && m_Target)
976 {
977 tgObject = m_Target.GetObject();
978 }
979
980 if (Class.CastTo(item, tgObject))
981 {
983 if (q_type > 0)
984 QuantityConversions.GetItemQuantity(item, q_cur, q_min, q_max);
985 }
986 }
987
988 //! returns number of items in cargo for targeted entity
989 protected void GetItemCargoCount(out int cargoCount)
990 {
991 EntityAI entity = null;
992
994 if (!tgObject && m_Target)
995 {
996 tgObject = m_Target.GetObject();
997 }
998
999 if (Class.CastTo(entity, tgObject))
1000 {
1001
1002 GameInventory inventory = entity.GetInventory();
1003 if (inventory)
1004 {
1005 cargoCount = AttachmentsWithInventoryOrCargoCount(inventory);
1006 return;
1007 }
1008
1010 cargoCount = 0;
1011 }
1012 }
1013
1014 // setters
1015 protected void SetItemDesc(string descText, int cargoCount, string itemWidget, string descWidget)
1016 {
1017 Widget widget;
1018 widget = m_Root.FindAnyWidget(itemWidget);
1019
1021 PlayerBase playerT = PlayerBase.Cast(m_Target.GetObject());
1022 if (playerT)
1023 string msg = playerT.GetLastUAMessage();
1024
1025 if (descText.Length() == 0 && msg.Length() == 0)
1026 {
1027 widget.Show(false);
1028 return;
1029 }
1030
1031 descText.ToUpper();
1032 TextWidget itemName;
1033 Class.CastTo(itemName, widget.FindAnyWidget(descWidget));
1034
1036 if (cargoCount > 0)
1037 descText = string.Format("[+] %1 %2", descText, msg);
1038 else
1039 descText = string.Format("%1 %2", descText, msg);
1040
1041 itemName.SetText(descText);
1042 widget.Show(true);
1043 }
1045 protected void SetItemHealth(int health, string itemWidget, string healthWidget, bool enabled)
1046 {
1047 Widget widget = m_Root.FindAnyWidget(itemWidget);
1048
1049 if (enabled)
1050 {
1051 ImageWidget healthMark;
1052 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
1053
1054 if (health == -1)
1055 {
1056 healthMark.GetParent().Show(false);
1057 widget.Show(enabled);
1058 return;
1059 }
1060
1061 int color = 0x00FFFFFF;
1062 if (m_TargetItemFrozen && (health != GameConstants.STATE_RUINED || health == -2))
1063 color = Colors.COLOR_FROZEN;
1064 else
1065 color = ItemManager.GetItemHealthColor(health);
1066
1067 healthMark.SetColor(color);
1068 healthMark.SetAlpha(0.5);
1069 healthMark.GetParent().Show(true);
1070 }
1071
1072 widget.Show(enabled);
1073 }
1075 protected void SetItemQuantity(int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
1076 {
1077 Widget widget;
1078
1079 widget = m_Root.FindAnyWidget(itemWidget);
1080
1081 if (enabled)
1082 {
1083 ProgressBarWidget progressBar;
1084 TextWidget textWidget;
1085 Class.CastTo(progressBar, widget.FindAnyWidget(quantityPBWidget));
1086 Class.CastTo(textWidget, widget.FindAnyWidget(quantityTextWidget));
1087
1088 //check for volume vs. count and display progressbar or "bubble" with exact count/max text
1089 switch (type)
1090 {
1091 case QUANTITY_HIDDEN :
1092 progressBar.Show(false);
1093 textWidget.Show(false);
1094 textWidget.GetParent().Show(false);
1095 break;
1096 case QUANTITY_COUNT :
1097 if (max > 1 || current > 1)
1098 {
1099 string qty_text = string.Format("%1/%2", Math.Round(current).ToString(), max.ToString());
1100 progressBar.Show(false);
1101 textWidget.SetText(qty_text);
1102 textWidget.Show(true);
1103 textWidget.GetParent().Show(true);
1104 }
1105 else
1106 {
1107 progressBar.Show(false);
1108 textWidget.Show(false);
1109 textWidget.GetParent().Show(false);
1110 }
1111 break;
1112 case QUANTITY_PROGRESS :
1113 float qty_num = Math.Round((current / max) * 100);
1114
1115 textWidget.Show(false);
1116 progressBar.SetCurrent(qty_num);
1117 progressBar.Show(true);
1118 textWidget.GetParent().Show(true);
1119 break;
1120 }
1121 widget.Show(true);
1122 }
1123 else
1124 widget.Show(false);
1125 }
1127 protected void SetActionWidget(ActionBase action, string descText, string actionWidget, string descWidget)
1128 {
1129 Widget widget = m_Root.FindAnyWidget(actionWidget);
1130
1131 if (action)
1132 {
1133 if (action.HasTarget() && m_AM.GetActionState() < 1) // targeted & action not performing
1134 {
1135 TextWidget actionName;
1136 Class.CastTo(actionName, widget.FindAnyWidget(descWidget));
1137
1138 if (action.GetInput().GetInputType() == ActionInputType.AIT_CONTINUOUS)
1139 {
1140 descText = descText + " " + "#action_target_cursor_hold";
1141 actionName.SetText(descText);
1142 }
1143 else
1144 {
1145 actionName.SetText(descText);
1146 }
1147
1148 widget.Show(true);
1149
1150 int x, y;
1151 actionName.GetTextSize(x, y);
1152 if (x > m_MaxWidthChild)
1154 }
1155 else
1156 {
1157 widget.Show(false);
1158 }
1159 }
1160 else
1161 {
1162 widget.Show(false);
1163 }
1164 }
1165
1166 //! shows arrows near the interact action if there are more than one available
1167 protected void SetMultipleInteractAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
1168 {
1169 Widget widget, widget_not_select;
1170
1171 widget = m_Root.FindAnyWidget(multiActionsWidget);
1172 widget_not_select = m_Root.FindAnyWidget(multiActionsWidget_NotSelect);
1173
1174 if (m_InteractActionsNum > 1)
1175 {
1177 {
1178 widget.Show(true);
1179 widget_not_select.Show(false);
1180 }
1181 else
1182 {
1183 widget.Show(false);
1184 widget_not_select.Show(true);
1185 }
1186 }
1187 else
1188 {
1189 widget.Show(false);
1190 widget_not_select.Show(false);
1191 }
1192 }
1194 protected void SetMultipleContinuousInteractAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
1195 {
1196 Widget widget, widget_not_select;
1197
1198 widget = m_Root.FindAnyWidget(multiActionsWidget);
1199 widget_not_select = m_Root.FindAnyWidget(multiActionsWidget_NotSelect);
1200
1202 {
1204 {
1205 widget.Show(true);
1206 widget_not_select.Show(false);
1207 }
1208 else
1209 {
1210 widget.Show(false);
1211 widget_not_select.Show(true);
1212 }
1213 }
1214 else
1215 {
1216 widget.Show(false);
1217 widget_not_select.Show(false);
1218 }
1219
1220 }
1222 protected void SetMultipleItemAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
1223 {
1224 Widget widget, widget_not_select;
1225
1226 widget = m_Root.FindAnyWidget(multiActionsWidget);
1227 widget_not_select = m_Root.FindAnyWidget(multiActionsWidget_NotSelect);
1228
1229 if (m_ItemActionsNum > 1)
1230 {
1232 {
1233 widget.Show(true);
1234 widget_not_select.Show(false);
1235 }
1236 else
1237 {
1238 widget.Show(false);
1239 widget_not_select.Show(true);
1240 }
1241 }
1242 else
1243 {
1244 widget.Show(false);
1245 widget_not_select.Show(false);
1246 }
1247 }
1249 protected void SetMultipleContinuousItemAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
1250 {
1251 Widget widget, widget_not_select;
1252
1253 widget = m_Root.FindAnyWidget(multiActionsWidget);
1254 widget_not_select = m_Root.FindAnyWidget(multiActionsWidget_NotSelect);
1255
1257 {
1259 {
1260 widget.Show(true);
1261 widget_not_select.Show(false);
1262 }
1263 else
1264 {
1265 widget.Show(false);
1266 widget_not_select.Show(true);
1267 }
1268 }
1269 else
1270 {
1271 widget.Show(false);
1272 widget_not_select.Show(false);
1273 }
1274 }
1276 protected void SetInteractActionIcon(string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
1277 {
1278 Widget widget;
1279 ImageWidget iconWidget;
1280 TextWidget textWidget;
1281
1282 widget = m_Root.FindAnyWidget(actionWidget);
1283 Class.CastTo(iconWidget, widget.FindAnyWidget(actionIconWidget));
1284 Class.CastTo(textWidget, widget.FindAnyWidget(actionIconTextWidget));
1285
1286 GetDayZGame().GetBacklit().HintShow(m_UseActionWrapper.InputP());
1287
1288 // uses text in floating widget
1289 iconWidget.Show(false);
1290 textWidget.SetText(InputUtils.GetButtonNameFromInput("UAAction", EInputDeviceType.MOUSE_AND_KEYBOARD));
1291 textWidget.Show(true);
1292 }
1294 protected void CheckRefresherFlagVisibilityEx(ActionTarget target)
1295 {
1296 EntityAI entity = EntityAI.Cast(target.GetObject());
1297 if (!entity)
1298 entity = EntityAI.Cast(target.GetParent());
1299
1300 if (!entity)
1301 return;
1302
1303 Widget w = m_Root.FindAnyWidget("item_flag_icon");
1304 if (w)
1305 w.Show(entity.IsRefresherSignalingViable() && m_Player.IsTargetInActiveRefresherRange(entity));
1306 }
1308 protected int AttachmentsWithInventoryOrCargoCount(notnull GameInventory inventory)
1309 {
1310 int attachmentsWithInventory = 0;
1311
1312 CargoBase cargo = inventory.GetCargo();
1313 if (cargo && cargo.GetItemCount() > 0)
1314 {
1315 return 1;
1316 }
1317
1318 for (int i = 0; i < inventory.AttachmentCount(); i++)
1319 {
1320 EntityAI attachment = inventory.GetAttachmentFromIndex(i);
1321 int attachmentSlotId = attachment.GetInventory().GetSlotId(0);
1322
1323 if (attachment.GetInventory())
1324 {
1325 attachmentsWithInventory += 1;
1326 }
1327 }
1328
1329 return attachmentsWithInventory;
1330 }
1332 protected IngameHud GetHud()
1333 {
1334 Mission mission = g_Game.GetMission();
1335 if (mission)
1336 {
1337 IngameHud hud = IngameHud.Cast(mission.GetHud());
1338 return hud;
1339 }
1340
1341 return null;
1342 }
1343
1344 // deprecated
1345 protected void CheckRefresherFlagVisibility(Object object);
1346}
eBleedingSourceType GetType()
void ContinuousDefaultActionInput(PlayerBase player)
Определения ActionInput.c:607
ActionInputType
Определения ActionInput.c:2
class ActionTargets ActionTarget
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
override bool HasFixedActionTargetCursorPosition()
Определения DayZAnimal.c:120
DayZGame g_Game
Определения DayZGame.c:3942
DayZGame GetDayZGame()
Определения DayZGame.c:3944
Mission mission
Определения DisplayStatus.c:28
Icon x
Icon y
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native UAInputAPI GetUApi()
vector m_CursorWPos
Определения ActionTargetsCursor.c:4
void Store(Object obj, vector pos, int compIdx)
cache object and its world pos
Определения ActionTargetsCursor.c:16
vector GetCursorWorldPos()
Определения ActionTargetsCursor.c:42
Object m_CachedObject
Определения ActionTargetsCursor.c:3
int m_CompIdx
Определения ActionTargetsCursor.c:6
Object Get()
Определения ActionTargetsCursor.c:37
void ATCCachedTarget()
Определения ActionTargetsCursor.c:8
vector m_ScreenPos
Определения ActionTargetsCursor.c:5
void Invalidate()
invalidate cached objec
Определения ActionTargetsCursor.c:27
int GetCursorCompIdx()
Определения ActionTargetsCursor.c:47
bool DisplayTargetInActionText()
Определения ActionBase.c:405
bool HasTarget()
Определения ActionBase.c:250
string GetTargetName(PlayerBase player, ActionTarget target)
Определения ActionBase.c:426
ActionInput GetInput()
Определения ActionBase.c:1325
string GetText()
Определения ActionBase.c:304
Определения ActionBase.c:59
int GetInputType()
Определения ActionInput.c:89
void UpdatePCIconsVisibility()
Contains logic for icon set switching (Gamepad/M&K)
Определения ActionTargetsCursor.c:183
void SetItemHealth(int health, string itemWidget, string healthWidget, bool enabled)
Определения ActionTargetsCursor.c:1044
string GetItemDesc(ActionBase action)
Определения ActionTargetsCursor.c:780
void GetActionManager()
Определения ActionTargetsCursor.c:691
void SetItemQuantity(int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
Определения ActionTargetsCursor.c:1074
void SetItemDesc(string descText, int cargoCount, string itemWidget, string descWidget)
Определения ActionTargetsCursor.c:1014
void ActionTargetsCursor()
Определения ActionTargetsCursor.c:94
Widget m_Root
Определения ActionTargetsCursor.c:85
ActionBase m_Interact
Определения ActionTargetsCursor.c:65
void SetXboxIcon(string name, string imageset_name, string image_name)
bool IsComponentInSelection(array< Selection > selection, string compName)
Определения ActionTargetsCursor.c:679
void GetItemQuantity(out int q_type, out float q_cur, out int q_min, out int q_max)
Определения ActionTargetsCursor.c:964
const ref array< typename > VISION_OBSTRUCTION_PPEFFECTS_TYPES
Определения ActionTargetsCursor.c:55
void SetInteractXboxIcon(string imageset_name, string image_name)
DEPRECATED.
void SetContinuousXboxIcon(string imageset_name, string image_name)
void GetOnScreenPosition(out float x, out float y)
Определения ActionTargetsCursor.c:474
void SetMultipleItemAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
Определения ActionTargetsCursor.c:1221
m_SelectedActionCategory
Определения ActionTargetsCursor.c:78
void SetMultipleContinuousItemAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
Определения ActionTargetsCursor.c:1248
float m_MaxWidthChild
widget width
Определения ActionTargetsCursor.c:90
void SetQuantityVisibility(bool state)
Определения ActionTargetsCursor.c:126
void BuildFixedCursor()
Определения ActionTargetsCursor.c:230
bool m_TargetItemFrozen
Определения ActionTargetsCursor.c:83
void UpdateControllerInputIcons()
Loads icons from the latest keybinds.
Определения ActionTargetsCursor.c:174
int m_ItemActionsNum
Определения ActionTargetsCursor.c:76
void SetHealthVisibility(bool state)
Определения ActionTargetsCursor.c:121
PlayerBase m_Player
Определения ActionTargetsCursor.c:60
void SetContinuousInteractXboxIcon(string imageset_name, string image_name)
ActionTarget m_Target
Определения ActionTargetsCursor.c:61
int GetItemHealth()
Определения ActionTargetsCursor.c:853
IngameHud GetHud()
Определения ActionTargetsCursor.c:1331
void HideWidget()
Определения ActionTargetsCursor.c:296
override bool OnUpdate(Widget w)
Определения ActionTargetsCursor.c:285
bool m_FixedOnPosition
Определения ActionTargetsCursor.c:81
void OnInputPresetChanged()
Определения ActionTargetsCursor.c:161
int m_ContinuousInteractActionsNum
Определения ActionTargetsCursor.c:75
void GetItemCargoCount(out int cargoCount)
returns number of items in cargo for targeted entity
Определения ActionTargetsCursor.c:988
void Update()
Определения ActionTargetsCursor.c:305
void SetControllerIcon(string pWidgetName, string pInputName)
Определения ActionTargetsCursor.c:139
void CheckRefresherFlagVisibilityEx(ActionTarget target)
Определения ActionTargetsCursor.c:1293
Object m_DisplayInteractTarget
Определения ActionTargetsCursor.c:63
bool m_QuantityEnabled
Определения ActionTargetsCursor.c:80
void SetActionWidget(ActionBase action, string descText, string actionWidget, string descWidget)
Определения ActionTargetsCursor.c:1126
void GetActions()
get actions from Action Manager
Определения ActionTargetsCursor.c:704
bool m_HealthEnabled
Определения ActionTargetsCursor.c:79
int m_ContinuousItemActionsNum
Определения ActionTargetsCursor.c:77
ActionBase m_ContinuousInteract
Определения ActionTargetsCursor.c:66
void OnWidgetScriptInit(Widget w)
Определения ActionTargetsCursor.c:145
string GetActionDesc(ActionBase action)
Определения ActionTargetsCursor.c:763
void SetMultipleInteractAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
shows arrows near the interact action if there are more than one available
Определения ActionTargetsCursor.c:1166
void SetInteractActionIcon(string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
Определения ActionTargetsCursor.c:1275
Widget m_ItemLeft
Определения ActionTargetsCursor.c:87
vector TransformToScreenPos(vector pWorldPos)
transform world pos to screen pos (related to parent widget size)
Определения ActionTargetsCursor.c:457
bool m_Hidden
Определения ActionTargetsCursor.c:82
float m_RootHeight
Определения ActionTargetsCursor.c:92
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Определения ActionTargetsCursor.c:168
void SetSingleXboxIcon(string imageset_name, string image_name)
int AttachmentsWithInventoryOrCargoCount(notnull GameInventory inventory)
Определения ActionTargetsCursor.c:1307
void SetMultipleContinuousInteractAction(string multiActionsWidget, string multiActionsWidget_NotSelect)
Определения ActionTargetsCursor.c:1193
IngameHud m_Hud
Определения ActionTargetsCursor.c:70
ref ATCCachedObject m_CachedObject
Определения ActionTargetsCursor.c:62
void PrepareCursorContent()
Определения ActionTargetsCursor.c:196
Widget m_Container
Определения ActionTargetsCursor.c:86
ActionBase m_Continuous
Определения ActionTargetsCursor.c:68
ActionBase m_Single
Определения ActionTargetsCursor.c:67
UAIDWrapper m_UseActionWrapper
Определения ActionTargetsCursor.c:72
ActionManagerClient m_AM
Определения ActionTargetsCursor.c:69
void ShowXboxHidePCIcons(string widget, bool show_xbox_icon)
Определения ActionTargetsCursor.c:449
void ~ActionTargetsCursor()
Определения ActionTargetsCursor.c:118
void GetPlayer()
Определения ActionTargetsCursor.c:686
float m_RootWidth
Определения ActionTargetsCursor.c:91
int m_InteractActionsNum
Определения ActionTargetsCursor.c:74
bool GetItemFrozen()
Определения ActionTargetsCursor.c:938
void GetTarget()
Определения ActionTargetsCursor.c:746
void BuildFloatingCursor(bool forceRebuild)
Определения ActionTargetsCursor.c:242
proto native int GetItemCount()
represents base for cargo storage for entities
Определения Cargo.c:7
Super root of all classes in Enforce script.
Определения EnScript.c:11
const int COLOR_FROZEN
Определения Colors.c:42
Определения Colors.c:4
override bool ShowZonesHealth()
Определения Transport.c:288
override bool IsMan()
Определения 3_Game/DayZ/Entities/Man.c:48
script counterpart to engine's class Inventory
static string GetButtonNameFromInput(string pInputName, int pInputDeviceType)
Определения InputUtils.c:17
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
Определения InputUtils.c:2
Определения ItemBase.c:21
proto native int GetType()
returns type of InventoryLocation
InventoryLocation.
Определения InventoryLocation.c:30
override bool IsTakeable()
Определения BaseBuildingBase.c:1008
static int GetItemHealthColor(int pHealthLevel)
Определения ItemManager.c:417
Определения ItemManager.c:2
static const string NAME_FIRE
Определения gameplay.c:208
static const string NAME_MEMORY
Определения gameplay.c:209
static const string NAME_VIEW
Определения gameplay.c:207
proto native bool GetSelections(notnull out array< Selection > selections)
LOD class.
Определения gameplay.c:204
Определения EnMath.c:7
Mission class.
Определения gameplay.c:686
Определения ObjectTyped.c:2
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Определения PPEManager.c:27
Static component of PPE manager, used to hold the instance.
Определения PPEManager.c:3
Определения PlayerBaseClient.c:2
static float GetItemQuantity(InventoryItem item)
Определения QuantityConversions.c:72
static int HasItemQuantity(notnull EntityAI item)
Определения QuantityConversions.c:143
Определения gameplay.c:317
void CheckRefresherFlagVisibility()
Определения ItemActionsWidget.c:707
map: item x vector(index, width, height)
Определения EnWidgets.c:657
Определения CarTent.c:2
Определения EnWidgets.c:220
Определения UAInput.c:15
proto native UAIDWrapper GetPersistentWrapper()
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static const vector Zero
Определения EnConvert.c:123
Определения EnConvert.c:119
const int QUANTITY_PROGRESS
Определения 3_Game/DayZ/constants.c:521
const int QUANTITY_COUNT
Определения 3_Game/DayZ/constants.c:520
const int QUANTITY_HIDDEN
Определения 3_Game/DayZ/constants.c:519
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int STATE_RUINED
Определения 3_Game/DayZ/constants.c:851
static proto float Round(float f)
Returns mathematical round of value.
static proto float Ceil(float f)
Returns ceil of value.
static proto float AbsFloat(float f)
Returns absolute value.
proto void GetScreenSize(out int x, out int y)
proto native int Length()
Returns length of string.
proto int ToUpper()
Changes string to uppercase. Returns length.
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
proto native owned string GetName()
Test name getter. Strictly for UI porposes!
Определения SyncedValue.c:119
EInputDeviceType
Определения input.c:3