DayZ 1.24
Loading...
Searching...
No Matches
ActionBase.c
Go to the documentation of this file.
14class ActionReciveData
15{
17 ref ActionTarget m_Target;
18}
19
42
43class ActionBase : ActionBase_Basic
44{
45 //STATIC DATA
46 protected int m_RefreshReservationTimerValue = 140;
47 // Configurable action parameters
48 protected string m_Sound; //sound played at the beggining of action
49 protected string m_Text;
50
51 protected bool m_LockTargetOnUse; //this parameter sets wheter player can perform actions on target while other player is already performing action on it. defaulted as true
52 protected bool m_FullBody; //tells whether action is full body or additive
53 protected int m_StanceMask;
54 protected ref TStringArray m_Sounds; //User action sound is picked from this array randomly
55 ref CCIBase m_ConditionItem; //Condition Component
56 ref CCTBase m_ConditionTarget; //Condition Component
58 protected int m_ActionID;
59 protected int m_VariantID;
62
63 //RUNTIME DATA
64 protected ref Param1<string> m_MessageParam; //used for passing messages from server to client
65 //protected ref Param2<int,int> m_MessagesParam;
66
67 //SOFT SKILLS
68 protected float m_SpecialtyWeight;
69
70 //-----------------------------------------------------
71 // Action events and methods
72 //-----------------------------------------------------
74 {
75 // definable
76 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE;
77 m_FullBody = false;
78 m_Sound = "";
79 m_Text = "default action text";
81 // dont override
83 //m_MessagesParam = new Param2<int,int>(0,0);
85 m_Input = null;
86 m_ActionID = 0;
88 }
89
91 {
92 return m_LockTargetOnUse;
93 }
94
96 {
97 m_ConditionMask = ActionConditionMask.ACM_NO_EXEPTION;
99 m_ConditionMask |= ActionConditionMask.ACM_IN_VEHICLE;
100
101 if (CanBeUsedOnLadder())
102 m_ConditionMask |= ActionConditionMask.ACM_ON_LADDER;
103
104 if (CanBeUsedSwimming())
105 m_ConditionMask |= ActionConditionMask.ACM_SWIMMING;
106
108 m_ConditionMask |= ActionConditionMask.ACM_RESTRAIN;
109
110 if (CanBeUsedRaised())
112
113 if (CanBeUsedOnBack())
115
116 if (CanBeUsedThrowing())
117 m_ConditionMask |= ActionConditionMask.ACM_THROWING;
118
119 if (CanBeUsedLeaning())
121
123 m_ConditionMask |= ActionConditionMask.ACM_BROKEN_LEGS;
124 }
125
127 {
129 action_data.m_Action = this;
130 action_data.m_Player = player;
131 action_data.m_Target = target;
132 action_data.m_MainItem = item;
133 action_data.m_PossibleStanceMask = GetStanceMask(player);
134 action_data.m_ReservedInventoryLocations = new array<ref InventoryLocation>;
135 action_data.m_RefreshReservationTimer = m_RefreshReservationTimerValue;
136 action_data.m_WasExecuted = false;
137 action_data.m_WasActionStarted = false;
138 action_data.m_ReciveEndInput = false;
139
140 ActionReciveData action_recive_data = player.GetActionManager().GetReciveData();
142 {
144
146 {
147 if (player.GetItemInHands() != action_data.m_MainItem)
148 return false;
149 }
150 }
151
153 return false;
154
155 if ((!GetGame().IsDedicatedServer()) && !IsInstant())
156 {
158 {
160 return false;
161 }
162
164 {
165 for (int i = 0; i < action_data.m_ReservedInventoryLocations.Count(); i++)
166 Debug.ActionLog(InventoryLocation.DumpToStringNullSafe(action_data.m_ReservedInventoryLocations[i]), action_data.m_Action.ToString(), "n/a", "LockInventoryList", action_data.m_Player.ToString());
167 }
168 }
169
170 return true;
171 }
172
174 {
175 return true;
176 }
177
180
181 typename GetInputType()
182 {
183 return DefaultActionInput;
184 }
185
187 {
188 m_Input = ai;
189 }
190
192 {
193 return new ActionData;
194 }
195
196 void CreateConditionComponents() //Instantiates components, called once from ActionManager on actions construction
197 {
200 }
201
203 {
204 return null;
205 }
206
211 {
212 return true;
213 }
214
217 {
218 return true;
219 }
220
221 //Action isn't synchronize to server
222 bool IsLocal()
223 {
224 return false;
225 }
226
227 //Action not using animation/callback action are executed instantly (OnStart)
229 {
230 return false;
231 }
232
235 {
236 return false;
237 }
238
240 {
241 return true;
242 }
243
245 {
246 return AC_UNCATEGORIZED;
247 }
248
249 bool IsEat()
250 {
251 return false;
252 }
253
254 bool IsDrink()
255 {
256 return false;
257 }
258
260 {
261 return false;
262 }
263
264 string GetText() //text game displays in HUD hint
265 {
266 return m_Text;
267 }
268
270 {
271 return false;
272 }
273
275 {
276 return false;
277 }
278
280 {
282 }
283
285 {
286 return false;
287 }
288
290 {
291 return false;
292 }
293
295 {
296 return false;
297 }
298
300 {
301 return false;
302 }
303
305 {
306 return false;
307 }
308
310 {
311 return false;
312 }
313
315 {
316 return false;
317 }
318
320 {
321 return true;
322 }
323
325 {
326 return true;
327 }
328
331 {
332 return false;
333 }
334
336 {
337 return true;
338 }
339
341 {
342 return true;
343 }
344
345 protected bool ActionConditionContinue(ActionData action_data) //condition for action
346 {
347 return ActionCondition(action_data.m_Player, action_data.m_Target, action_data.m_MainItem);
348 }
349
350 protected bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item) //condition for action
351 {
352 return true;
353 }
354
356
361
363 {
364 int componentIndex = -1;
365 int proxyBoneIdx = -1;
367
369
372
373 if (UseMainItem())
374 ctx.Write(action_data.m_MainItem);
375
376 if (HasTarget() && !IsUsingProxies())
377 {
378 // callback data
379 targetObject = action_data.m_Target.GetObject();
380 ctx.Write(targetObject);
381 targetParent = action_data.m_Target.GetParent();
382 ctx.Write(targetParent);
383 componentIndex = action_data.m_Target.GetComponentIndex();
384 ctx.Write(componentIndex);
385 cursorHitPos = action_data.m_Target.GetCursorHitPos();
386 ctx.Write(cursorHitPos);
387 }
388 else if (HasTarget() && IsUsingProxies())
389 {
392 Entity entParent = Entity.Cast(action_data.m_Target.GetParent());
393 if (entParent)
394 {
395 action_data.m_Target.GetObject().GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selectionNames);
396 for (int s = 0; s < selectionNames.Count(); s++)
397 {
398 proxyBoneIdx = entParent.GetBoneIndex(selectionNames[s]);
399 if (proxyBoneIdx > -1)
400 break;
401 }
402 }
403
404 ctx.Write(proxyBoneIdx);
405 targetParent = action_data.m_Target.GetParent();
406 ctx.Write(targetParent);
407 componentIndex = action_data.m_Target.GetComponentIndex();
408 ctx.Write(componentIndex);
409 cursorHitPos = action_data.m_Target.GetCursorHitPos();
410 ctx.Write(cursorHitPos);
411 }
412 }
413
415 {
417 action_recive_data = new ActionReciveData;
420 int componentIndex = -1;
421 int proxyBoneIdx = -1;
424
425 ref ActionTarget target;
426
427 if (UseMainItem())
428 {
429 if (!ctx.Read(mainItem))
430 return false;
431 }
432
433 if (HasTarget() && !IsUsingProxies())
434 {
435 if (!ctx.Read(actionTargetObject))
436 return false;
437
438 if (!ctx.Read(actionTargetParent))
439 return false;
440
441 if (!ctx.Read(componentIndex))
442 return false;
443
444 if (!ctx.Read(cursorHitPos))
445 return false;
446
448
449 action_recive_data.m_Target = target;
450 }
451 else if (HasTarget() && IsUsingProxies())
452 {
453 if (!ctx.Read(proxyBoneIdx))
454 return false;
455
456 if (!ctx.Read(actionTargetParent))
457 return false;
458
459 if (!ctx.Read(componentIndex))
460 return false;
461
462 if (!ctx.Read(cursorHitPos))
463 return false;
464
466 if (proxyBoneIdx > -1)
467 {
469
470 if (entParent)
472 }
473 else
474 return false;
475
477
478 action_recive_data.m_Target = target;
479 }
480
481 action_recive_data.m_MainItem = mainItem;
482 return true;
483 }
484
486 {
487 action_data.m_MainItem = action_recive_data.m_MainItem;
488
489 if (HasTarget())
490 {
491 if (action_recive_data.m_Target)
492 action_data.m_Target = action_recive_data.m_Target;
493 else
494 {
495 Error("Action target not created.");
496 action_data.m_Target = new ActionTarget(NULL, NULL, -1, vector.Zero, 0);
497 }
498 }
499 }
500
501 //----------------------------------------------------------------------------------------------
502 // Core methods don't override unless you know what you are doing
503 //----------------------------------------------------------------------------------------------
504 // COMMANDS -----------------------------------------------------------------------
506 {
507 if (HasProneException())
508 {
509 if (player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_RAISEDERECT | DayZPlayerConstants.STANCEMASK_RAISEDCROUCH | DayZPlayerConstants.STANCEMASK_RAISEDPRONE))
510 return -1;
511 else if (player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT))
512 return DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
513 else
514 return DayZPlayerConstants.STANCEMASK_PRONE;
515 }
516 return m_StanceMask;
517 }
518
520 {
521 if (HasProneException())
522 return !(player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT));
523 return m_FullBody;
524 }
525
526 // if it is set to true if action have special fullbody animation for prone and additive for crouch and erect
527 protected bool HasProneException()
528 {
529 return false;
530 }
531
532 // ACTION LOGIC -------------------------------------------------------------------
533 // called from actionmanager.c
534 void Start(ActionData action_data) //Setup on start of action
535 {
536 action_data.m_State = UA_START;
537
539 Debug.ActionLog("Time stamp: " + action_data.m_Player.GetSimulationTimeStamp(), this.ToString(), "n/a", "OnStart", action_data.m_Player.ToString());
540
542
543 if (GetGame().IsServer())
544 {
546
548 if (soundCat)
549 action_data.m_Player.SetSoundCategoryHash(soundCat.Hash());
550 }
551 else
553
554 InformPlayers(action_data.m_Player, action_data.m_Target, UA_START);
555 }
556
558 {
559 if (action_data.m_Player)
560 {
562
563 if (GetGame().IsServer())
565 else
567
568 action_data.m_Player.GetActionManager().OnActionEnd();
569 }
570 }
571
576
579
581 {
582 action_data.m_ReciveEndInput = true;
584 }
585
588
593
594 bool CanReceiveAction(ActionTarget target)
595 {
596 bool result = true;
597 PlayerBase target_player = PlayerBase.Cast(target.GetObject());
598
599 if (target_player)
600 {
601 result = !target_player.IsJumpInProgress();
602 result = result && !(target_player.GetCommand_Ladder() || target_player.GetCommand_Vehicle() || target_player.GetCommand_Swim());
603 }
604
605 return result;
606 }
607
609 {
610 int mask = 0;
611 if (player.GetCommand_Vehicle())
612 mask |= ActionConditionMask.ACM_IN_VEHICLE;
613
614 if (player.GetCommand_Ladder())
615 mask |= ActionConditionMask.ACM_ON_LADDER;
616
617 if (player.IsRestrained())
618 mask |= ActionConditionMask.ACM_RESTRAIN;
619
620 if (player.GetCommand_Swim())
621 mask |= ActionConditionMask.ACM_SWIMMING;
622
623 if (player.IsRaised())
624 mask |= ActionConditionMask.ACM_RAISED;
625
626 if (player.GetCommand_Move() && player.GetCommand_Move().IsOnBack())
627 mask |= ActionConditionMask.ACM_ON_BACK;
628
629 if (player.GetThrowing().IsThrowingModeEnabled())
630 mask |= ActionConditionMask.ACM_THROWING;
631
632 if (player.IsLeaning())
633 mask |= ActionConditionMask.ACM_LEANING;
634
635 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
636 mask |= ActionConditionMask.ACM_BROKEN_LEGS;
637
638 return mask;
639 }
640
642 {
643 if (((condition_mask & m_ConditionMask) != condition_mask) || (!IsFullBody(player) && !player.IsPlayerInStance(GetStanceMask(player))) || player.IsRolling())
644 return false;
645
646 if (HasTarget())
647 {
648 if (!FirearmActionBase.Cast(this))
649 {
650 EntityAI entity = EntityAI.Cast(target.GetObject());
651 if (entity && !target.GetObject().IsMan())
652 {
653 Man man = entity.GetHierarchyRootPlayer();
654 if (man && man != player)
655 return false;
656 }
657 }
658
660 return false;
661 }
662
664 return false;
665
667 return false;
668
669 if (IsFullBody(player))
670 {
671 int stanceIdx = DayZPlayerUtils.ConvertStanceMaskToStanceIdx(GetStanceMask(player));
672 if (stanceIdx != -1 && !DayZPlayerUtils.PlayerCanChangeStance(player, stanceIdx))
673 return false;
674 }
675
676 return true;
677 }
678
680 {
682
684 }
685
687 {
688 if (!action_data.m_Player.IsPlayerInStance(action_data.m_PossibleStanceMask) || !m_ConditionItem || !m_ConditionItem.CanContinue(action_data.m_Player, action_data.m_MainItem) || !m_ConditionTarget || !m_ConditionTarget.CanContinue(action_data.m_Player, action_data.m_Target))
689 return false;
690
692 }
693
695 {
696 return m_VariantManager != null;
697 }
698
700 {
702 return m_VariantManager.GetActionsCount();
703
704 return 0;
705 }
706
708 {
710 return m_VariantManager.GetActions(variants);
711
712 return 0;
713 }
714
715 void SetVariantID(int ID)
716 {
717 m_VariantID = ID;
718 }
719
721 {
722 return m_VariantID;
723 }
724
730
737
738 // call only on client side for lock inventory before action
739 // return if has successfuly reserved inventory
741 {
742 if ((IsLocal() || !UseAcknowledgment()) && IsInstant())
743 return true;
744
745 //action_data.m_ReservedInventoryLocations = new array<ref InventoryLocation>;
746 bool success = true;
749
750 // lock target if it has target
751 if (HasTarget())
752 {
754 if (ItemBase.CastTo(targetItem, action_data.m_Target.GetObject()))
755 {
757 targetItem.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
758 if (action_data.m_Player.GetInventory().HasInventoryReservation(targetItem, targetInventoryLocation))
759 success = false;
760 else
761 action_data.m_Player.GetInventory().AddInventoryReservationEx(targetItem, targetInventoryLocation, GameInventory.c_InventoryReservationTimeoutMS);
762 }
763 }
764
766 handInventoryLocation.SetHands(action_data.m_Player, action_data.m_Player.GetItemInHands());
767
768 if (action_data.m_Player.GetInventory().HasInventoryReservation(action_data.m_Player.GetItemInHands(), handInventoryLocation))
769 {
770 if (HasTarget())
771 action_data.m_Player.GetInventory().ClearInventoryReservation(targetItem, targetInventoryLocation);
772
773 success = false;
774 }
775 else
776 action_data.m_Player.GetInventory().AddInventoryReservationEx(action_data.m_Player.GetItemInHands(), handInventoryLocation, GameInventory.c_InventoryReservationTimeoutMS);
777
778 if (success)
779 {
781 action_data.m_ReservedInventoryLocations.Insert(targetInventoryLocation);
782
784 action_data.m_ReservedInventoryLocations.Insert(handInventoryLocation);
785 }
786
787 return success;
788 }
789
791 {
792 if (action_data.m_ReservedInventoryLocations)
793 {
795 for (int i = 0; i < action_data.m_ReservedInventoryLocations.Count(); i++)
796 {
797 il = action_data.m_ReservedInventoryLocations.Get(i);
798 EntityAI entity = il.GetItem();
799 action_data.m_Player.GetInventory().ClearInventoryReservationEx(il.GetItem(), il);
800 }
801
802 action_data.m_ReservedInventoryLocations.Clear();
803 }
804 }
805
807 {
808 if (action_data.m_ReservedInventoryLocations)
809 {
811 for (int i = 0; i < action_data.m_ReservedInventoryLocations.Count(); i++)
812 {
813 il = action_data.m_ReservedInventoryLocations.Get(i);
814 EntityAI entity = il.GetItem();
815 action_data.m_Player.GetInventory().ExtendInventoryReservationEx(il.GetItem(), il, 10000);
816 }
817 }
818 }
819
820 // action need first have permission from server before can start
822 {
823 return true;
824 }
825
827 protected void InformPlayers(PlayerBase player, ActionTarget target, int state);
828
829 void SendMessageToClient(Object reciever, string message) //sends given string to client, don't use if not nescessary
830 {
832 if (GetGame().IsServer() && Class.CastTo(man, reciever) && m_MessageParam && reciever.IsAlive() && message != "")
833 {
834 m_MessageParam.param1 = message;
835 GetGame().RPCSingleParam(man, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, man.GetIdentity());
836 }
837 }
838
839 // ActionCondition Rules
840 // ------------------------------------------------------
841 protected bool IsDamageDestroyed(ActionTarget target)
842 {
843 return target.GetObject() && target.GetObject().IsDamageDestroyed();
844 }
845
846 protected bool IsBuilding(ActionTarget target)
847 {
848 return target.GetObject() && target.GetObject().IsBuilding();
849 }
850
851 protected bool IsTransport(ActionTarget target)
852 {
853 return target.GetObject() && target.GetObject().IsTransport();
854 }
855
856 protected bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance = 1.0)
857 {
858 Object obj = target.GetObject();
859 if (!obj)
860 return false;
861
864
865 // we're using sq distance in comparison
867
868 // get position of Head bone
870
872 obj.GetActionComponentNameList(target.GetComponentIndex(), componentNames);
873 foreach (string componentName : componentNames)
874 {
875 if (componentName.Contains("doorstwin"))
876 continue;
877
878 modelPos = obj.GetSelectionPositionMS(componentName);
879 worldPos = obj.ModelToWorld(modelPos);
880
881 break;
882 }
883
884 distanceRoot = vector.DistanceSq(worldPos, player.GetPosition());
886
888 }
889 // ------------------------------------------------------
890
891
892 // SOUNDS ------------------------------------------------------
894 {
895 if (GetGame().IsServer() && player)
896 {
897 if (m_Sound != "")
898 return GetGame().CreateSoundOnObject(player, m_Sound, 6, false);
899 else if (m_Sounds && m_Sounds.Count() > 0)
900 {
901 int rand_num = Math.RandomInt(0, m_Sounds.Count());
902 return GetGame().CreateSoundOnObject(player, m_Sounds.Get(rand_num), 6, false);
903 }
904 }
905
906 return NULL;
907 }
908
910 {
911 }
912
913 //sound category matches with a soundtable category in config, selects correct soundset
915 {
916 return "";
917 }
918
919 // EVENTS ------------------------------------------------
922
924 {
925 if (!GetGame().IsDedicatedServer())
926 {
927 if (action_data.m_RefreshReservationTimer > 0)
928 action_data.m_RefreshReservationTimer--;
929 else
930 {
931 action_data.m_RefreshReservationTimer = m_RefreshReservationTimerValue;
933 }
934 }
935 }
936
939
941 {
942 if (action_data.m_Player != NULL && action_data.m_Player.IsPlacingLocal() && !IsDeploymentAction())
943 action_data.m_Player.PlacingCancelLocal();
944 }
945
948
950 {
951
952 }
953
955 {
956
957 }
958
961
965
966 // SOFT SKILLS ------------------------------------------------
968 {
969 if (m_SpecialtyWeight == 0)
970 {
971#ifdef DEVELOPER
972 //Print("UserAction does not use SoftSkills");
973#endif
974 }
975
976 return m_SpecialtyWeight;
977 }
978
980 {
981 return action_data.m_State;
982 }
983
985 {
986 return -1;
987 }
988
990 {
991 return m_Input;
992 }
993
994 void SetID(int actionId)
995 {
997 }
998
999 int GetID()
1000 {
1001 return m_ActionID;
1002 }
1003
1005 {
1006 return "";
1007 }
1008};
void OnUpdateServer(float deltatime, float blood_scale, bool no_blood_loss)
const int AC_UNCATEGORIZED
Definition _constants.c:1
ActionData CreateActionData()
Definition ActionBase.c:191
int m_ActionID
Definition ActionBase.c:58
void OnUpdateClient(ActionData action_data)
Definition ActionBase.c:923
bool InventoryReservation(ActionData action_data)
Definition ActionBase.c:740
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
bool CanBeSetFromInventory()
Definition ActionBase.c:279
class ActionData m_RefreshReservationTimerValue
ActionVariantManager GetVariantManager()
Definition ActionBase.c:731
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition ActionBase.c:856
void CreateConditionComponents()
Definition ActionBase.c:196
float GetSpecialtyWeight()
Definition ActionBase.c:967
void OnEndServer(ActionData action_data)
Definition ActionBase.c:962
ActionConditionMask
Definition ActionBase.c:2
@ ACM_THROWING
Definition ActionBase.c:10
@ ACM_NO_EXEPTION
Definition ActionBase.c:3
@ ACM_ON_LADDER
Definition ActionBase.c:5
@ ACM_SWIMMING
Definition ActionBase.c:6
@ ACM_RAISED
Definition ActionBase.c:8
@ ACM_LEANING
Definition ActionBase.c:11
@ ACM_IN_VEHICLE
Definition ActionBase.c:4
@ ACM_RESTRAIN
Definition ActionBase.c:7
@ ACM_ON_BACK
Definition ActionBase.c:9
@ ACM_BROKEN_LEGS
Definition ActionBase.c:12
void SendMessageToClient(Object reciever, string message)
Definition ActionBase.c:829
void ApplyModifiers(ActionData action_data)
int m_ConditionMask
Definition ActionBase.c:60
bool HasTarget()
Definition ActionBase.c:210
void OnEndInput(ActionData action_data)
Definition ActionBase.c:577
int m_VariantID
Definition ActionBase.c:59
void InformPlayers(PlayerBase player, ActionTarget target, int state)
DEPRECATED delivers message ids to clients based on given context.
bool UseAcknowledgment()
Definition ActionBase.c:821
static int ComputeConditionMask(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:608
bool IsDamageDestroyed(ActionTarget target)
Definition ActionBase.c:841
int GetVariantID()
Definition ActionBase.c:720
bool IsUsingProxies()
not using plane object - it's using multiple proxies
Definition ActionBase.c:234
string GetSoundCategory(ActionData action_data)
Definition ActionBase.c:914
enum ActionConditionMask m_MainItem
bool IsLockTargetOnUse()
Definition ActionBase.c:90
int GetActionCategory()
Definition ActionBase.c:244
bool MainItemAlwaysInHands()
Definition ActionBase.c:340
void OnStartClient(ActionData action_data)
Definition ActionBase.c:946
bool CanBeUsedWithBrokenLegs()
Definition ActionBase.c:324
void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:909
void RefreshReservations(ActionData action_data)
Definition ActionBase.c:806
bool IsBuilding(ActionTarget target)
Definition ActionBase.c:846
int GetVariantsCount()
Definition ActionBase.c:699
bool m_LockTargetOnUse
Definition ActionBase.c:51
GetInputType()
Definition ActionBase.c:181
bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
Definition ActionBase.c:641
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
void OnStartServer(ActionData action_data)
Definition ActionBase.c:949
float m_SpecialtyWeight
Definition ActionBase.c:68
bool CanContinue(ActionData action_data)
Definition ActionBase.c:686
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
SoundOnVehicle PlayActionSound(PlayerBase player)
Definition ActionBase.c:893
ActionInput m_Input
Definition ActionBase.c:57
void SetVariantID(int ID)
Definition ActionBase.c:715
void UpdateVariants(Object item, Object target, int componet_index)
Definition ActionBase.c:725
bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Definition ActionBase.c:126
void ClearInventoryReservationEx(ActionData action_data)
Definition ActionBase.c:790
bool HasVariants()
Definition ActionBase.c:694
void SetInput(ActionInput ai)
Definition ActionBase.c:186
bool IsDrink()
Definition ActionBase.c:254
bool CanBeUsedRaised()
Definition ActionBase.c:309
ActionInput GetInput()
Definition ActionBase.c:989
void OnEndRequest(ActionData action_data)
Definition ActionBase.c:586
void EndInput(ActionData action_data)
Definition ActionBase.c:580
bool CanBeUsedThrowing()
Definition ActionBase.c:314
bool CanBePerformedFromQuickbar()
Definition ActionBase.c:269
void ActionBase()
Definition ActionBase.c:73
bool RemoveForceTargetAfterUse()
Definition ActionBase.c:239
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
bool IsTransport(ActionTarget target)
Definition ActionBase.c:851
bool CanBeUsedSwimming()
Definition ActionBase.c:299
bool IsLocal()
Definition ActionBase.c:222
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:350
bool UseMainItem()
Definition ActionBase.c:335
int GetRefreshReservationTimerValue()
Definition ActionBase.c:357
bool ActionConditionContinue(ActionData action_data)
Definition ActionBase.c:345
void InitConditionMask()
Definition ActionBase.c:95
string GetAdminLogMessage(ActionData action_data)
bool HasProneException()
Definition ActionBase.c:527
float GetProgress(ActionData action_data)
Definition ActionBase.c:984
bool CanBeUsedOnBack()
Definition ActionBase.c:294
int m_StanceMask
Definition ActionBase.c:53
bool HasProgress()
For UI: hiding of progress bar.
Definition ActionBase.c:216
void ActionCleanup(ActionData action_data)
Definition ActionBase.c:178
void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
Definition ActionBase.c:485
bool IsShaveSelf()
Definition ActionBase.c:259
bool IsInstant()
Definition ActionBase.c:228
bool CanBeUsedInRestrain()
Definition ActionBase.c:284
bool CanBeUsedLeaning()
Definition ActionBase.c:319
bool CanBePerformedFromInventory()
Definition ActionBase.c:274
string GetText()
Definition ActionBase.c:264
bool IsDeploymentAction()
Is an action directly related to deployment/advanced placing.
Definition ActionBase.c:330
bool CanBeUsedInVehicle()
Definition ActionBase.c:289
ref Param1< string > m_MessageParam
Definition ActionBase.c:64
Object GetDisplayInteractObject(PlayerBase player, ActionTarget target)
Definition ActionBase.c:202
bool IsEat()
Definition ActionBase.c:249
ref ActionVariantManager m_VariantManager
Definition ActionBase.c:61
void OnEndClient(ActionData action_data)
Definition ActionBase.c:959
ref ActionTarget m_Target
Definition ActionBase.c:17
ref TStringArray m_Sounds
Definition ActionBase.c:54
int GetVariants(out array< ref ActionBase > variants)
Definition ActionBase.c:707
bool CanBeUsedOnLadder()
Definition ActionBase.c:304
void EndRequest(ActionData action_data)
Definition ActionBase.c:589
bool Post_SetupAction(ActionData action_data)
Definition ActionBase.c:173
void Interrupt()
class ActionTargets ActionTarget
void DayZPlayerUtils()
cannot be instantiated
eBrokenLegs
Definition EBrokenLegs.c:2
ERPCs
Definition ERPCs.c:2
void Start()
Plays all elements this effects consists of.
Definition Effect.c:149
int GetID()
Get the ID registered in SEffectManager.
Definition Effect.c:517
void SetID(int id)
Set the ID registered in SEffectManager.
Definition Effect.c:508
void End()
called on surrender end request end
void ReadFromContext(ParamsReadContext ctx)
Definition Hand_Events.c:70
void WriteToContext(ParamsWriteContext ctx)
Definition Hand_Events.c:72
EffectSound m_Sound
string Type
override void OnEnd()
Definition JumpEvents.c:53
void OnStart(Param par=null)
bool IsFullBody()
int GetStanceMask()
PlayerBase m_Player
Definition ActionBase.c:33
int m_PossibleStanceMask
Definition ActionBase.c:34
ActionBaseCB m_Callback
Definition ActionBase.c:29
ref ActionTarget m_Target
Definition ActionBase.c:32
bool m_WasActionStarted
Definition ActionBase.c:39
int m_RefreshReservationTimer
Definition ActionBase.c:36
ref CABase m_ActionComponent
Definition ActionBase.c:30
int m_RefreshJunctureTimer
Definition ActionBase.c:37
ref array< ref InventoryLocation > m_ReservedInventoryLocations
Definition ActionBase.c:35
bool m_ReciveEndInput
Definition ActionBase.c:40
ItemBase m_MainItem
Definition ActionBase.c:28
ref ActionBase m_Action
Definition ActionBase.c:27
void ActionData()
Definition ActionBase.c:22
bool m_WasExecuted
Definition ActionBase.c:38
Definition CABase.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
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:143
Definition Camera.c:2
script counterpart to engine's class Inventory
Definition Inventory.c:79
const int c_InventoryReservationTimeoutMS
reservations
Definition Inventory.c:687
InventoryLocation.
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsActionLogEnable()
Definition Debug.c:719
Definition EnMath.c:7
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static const vector Zero
Definition EnConvert.c:110
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
Definition EnScript.c:666
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
proto native void OnUpdate()
Definition tools.c:333
const int UA_START
Definition constants.c:439
const int UA_NONE
Definition constants.c:432
proto native int GetState()
returns one of STATE_...