DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
3_Game/DayZ/Entities/Man.c
См. документацию.
1#ifdef FEATURE_NETWORK_RECONCILIATION
2class Person extends Pawn
3{
5};
6#endif
7
9{
10};
11
12#ifdef FEATURE_NETWORK_RECONCILIATION
13class Man extends Person
14#else
15class Man extends EntityAI
16#endif
17{
24
25 proto native owned string GetCurrentWeaponMode();
26
28 proto native void SetSpeechRestricted(bool state);
30 proto native bool IsSpeechRestricted();
31
33 proto native void SetFaceTexture(string texture_name);
35 proto native void SetFaceMaterial(string material_name);
36
37 proto native bool IsSoundInsideBuilding();
38 proto native bool IsCameraInsideVehicle();
39
40 proto native owned string GetMasterAttenuation();
41 proto native void SetMasterAttenuation(string masterAttenuation);
42
43 void Man()
44 {
45 SetFlags(EntityFlags.TOUCHTRIGGERS, false);
46 }
47
48 override bool IsMan()
49 {
50 return true;
51 }
52
53 override bool IsHealthVisible()
54 {
55 return false;
56 }
57
59 {
60 return true;
61 }
62
66
68
70 {
71 if (IsAlive())
72 return EPlayerStates.ALIVE;
73
74 return EPlayerStates.DEAD;
75 }
76
78
83 proto native EntityAI GetEntityInHands();
84 //Called when an item is removed from the cargo of this item
86 //Called when an item is moved around in the cargo of this item
88
90
98
99
107
108 override void EEItemIntoHands(EntityAI item)
109 {
110 SetWeightDirty();
112 m_OnItemAddedToHands.Invoke( item, this );
113 }
114
115 override void EEItemOutOfHands(EntityAI item)
116 {
117 SetWeightDirty();
119 m_OnItemRemovedFromHands.Invoke( item, this );
120 }
121
123 bool JunctureDropEntity (notnull EntityAI item)
124 {
125 return DropEntityImpl(InventoryMode.JUNCTURE, this, item);
126 }
127
128 override bool PredictiveDropEntity (notnull EntityAI item)
129 {
131 {
132 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveDropEntity input data not sent yet, cannot allow another input action");
133 return false;
134 }
135
136 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
137 return JunctureDropEntity(item);
138 else
139 return DropEntityImpl(InventoryMode.PREDICTIVE, this, item);
140 }
141
142 override bool LocalDropEntity (notnull EntityAI item)
143 {
144 return DropEntityImpl(InventoryMode.LOCAL, this, item);
145 }
146
147 override bool ServerDropEntity (notnull EntityAI item)
148 {
149 return DropEntityImpl(InventoryMode.SERVER, this, item);
150 }
151
152 protected bool DropEntityImpl (InventoryMode mode, notnull EntityAI owner, notnull EntityAI item)
153 {
154 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::DropEntity(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
155 bool code = GetHumanInventory().DropEntity(mode, owner, item);
157 return code;
158 }
159
160
161 override bool CanDropEntity (notnull EntityAI item) { return true; }
162
167
168 void OnItemInHandsChangedEx (bool pInstant = false, bool pChangeAnimationInstance = true) { }
169
170 bool NeedInventoryJunctureFromServer (notnull EntityAI item, EntityAI currParent, EntityAI newParent) { return false; }
171
174 {
175 TakeEntityToHandsImpl(InventoryMode.JUNCTURE, item);
176 }
177
179 {
181 {
182 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToHands input data not sent yet, cannot allow another input action");
183 return;
184 }
185
186 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
188 else
189 TakeEntityToHandsImpl(InventoryMode.PREDICTIVE, item);
190 }
191
193 {
195 }
196
198 {
200 }
201
203 {
204 if (!g_Game.IsDedicatedServer() )
205 {
207 il.SetHands(this, item);
208 //GetInventory().AddInventoryReservationEx(item, il ,GameInventory.c_InventoryReservationTimeoutShortMS);
209 }
210
211 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Hands(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
212 EntityAI itemInHands = GetEntityInHands();
213
215 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
216 {
217 if (itemInHands == null)
218 {
220 hand_dst.SetHands(this, item);
221 GetHumanInventory().TakeToDst(mode, src_item, hand_dst);
222 }
223 else if (GetHumanInventory().CanSwapEntitiesEx(itemInHands, item))
224 GetInventory().SwapEntities(mode, itemInHands, item);
226 }
227 }
228
229
231 {
232 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Destroy IH=" + GetEntityInHands());
233 GetHumanInventory().LocalDestroyEntity(GetEntityInHands());
235 }
236
239 {
240 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Stash IH=" + GetEntityInHands());
242 {
243 Print("[inv] PredictiveMoveItemFromHandsToInventory input data not sent yet, cannot allow another input action");
244 return;
245 }
246
247 InventoryMode invMode = InventoryMode.PREDICTIVE;
248 EntityAI entityInHands = GetEntityInHands();
249
250 if (NeedInventoryJunctureFromServer(entityInHands, this, this))
251 invMode = InventoryMode.JUNCTURE;
252
253 HumanInventory humanInventory = GetHumanInventory();
255 if (entityInHands.m_OldLocation && entityInHands.m_OldLocation.IsValid())
256 {
258 entityInHands.GetInventory().GetCurrentInventoryLocation(invLoc);
259
261 EntityAI oldLocationParent = entityInHands.m_OldLocation.GetParent();
262 if (oldLocationParent && oldLocationParent.GetHierarchyRootPlayer())
263 {
264 humanInventory.ClearInventoryReservation(entityInHands, entityInHands.m_OldLocation);
265 if (humanInventory.LocationCanMoveEntity(invLoc, entityInHands.m_OldLocation))
266 {
267 EntityAI oldLocEntity = humanInventory.LocationGetEntity(entityInHands.m_OldLocation);
268 if (!oldLocEntity && humanInventory.TakeToDst(invMode, invLoc, entityInHands.m_OldLocation))
269 {
271 return;
272 }
273 else
274 {
275 InventoryLocation newLocation = new InventoryLocation;
276 if (humanInventory.FindFreeLocationFor(entityInHands, FindInventoryLocationType.CARGO, newLocation))
277 {
278 if (humanInventory.TakeToDst(invMode, invLoc, newLocation))
279 {
281 return;
282 }
283 }
284 }
285 }
286 }
287 }
288
291 }
292
295 {
296 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace !HND lambda=" + lambda.DumpToString());
297 bool code = GetHumanInventory().ReplaceItemWithNew(mode, lambda);
299 return code;
300 }
301
306
311
312
315 {
316 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace !HND->HND lambda=" + lambda.DumpToString());
317 bool code = GetHumanInventory().ReplaceItemElsewhereWithNewInHands(mode, lambda);
319 return code;
320 }
321
326
331
332
335 {
336 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace HND->HND lambda=" + lambda.DumpToString());
337 bool code = GetHumanInventory().ReplaceItemInHandsWithNew(mode, lambda);
339 return code;
340 }
341
346
351
352
355 {
356 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace HND->elsewhere lambda=" + lambda.DumpToString());
357 bool code = GetHumanInventory().ReplaceItemInHandsWithNewElsewhere(mode, lambda);
359 return code;
360 }
361
366
371
372
374 //[Obsolete("1.30: Use JunctureTakeEntityToTargetInventory instead")]
376 {
377 return TakeEntityToInventoryImpl(InventoryMode.JUNCTURE, flags, item);
378 }
379
380 //[Obsolete("1.30: Use PredictiveTakeEntityToTargetInventory instead")]
382 {
384 {
385 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToInventory input data not sent yet, cannot allow another input action");
386 return false;
387 }
388
389 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
390 return JunctureTakeEntityToInventory(flags, item);
391 else
392 return TakeEntityToInventoryImpl(InventoryMode.PREDICTIVE, flags, item);
393 }
394
395 //[Obsolete("1.30: Use LocalTakeEntityToTargetInventory instead")]
397 {
398 return TakeEntityToInventoryImpl(InventoryMode.LOCAL, flags, item);
399 }
400
401 //[Obsolete("1.30: Use ServerTakeEntityToTargetInventory instead")]
403 {
404 return TakeEntityToInventoryImpl(InventoryMode.SERVER, flags, item);
405 }
406
407 //[Obsolete("1.30: Use TakeEntityToTargetInventoryImpl instead")]
409 {
410 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
411 bool code = GetHumanInventory().TakeEntityToInventory(mode, flags, item);
413 return code;
414 }
415
417 bool JunctureSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
418 {
419 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
420 }
421
422 bool PredictiveSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
423 {
425 {
426 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveSwapEntities input data not sent yet, cannot allow another input action");
427 return false;
428 }
429
430 EntityAI item1Parent = item1.GetHierarchyParent();
431 EntityAI item2Parent = item2.GetHierarchyParent();
432 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1Parent, item2Parent);
433 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2Parent, item1Parent);
434 if (need_j1 || need_j2)
435 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
436 else
437 return SwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2);
438 }
439
440 bool LocalSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
441 {
442 return SwapEntitiesImpl(InventoryMode.LOCAL, item1, item2);
443 }
444
445 bool ServerSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
446 {
447 return SwapEntitiesImpl(InventoryMode.SERVER, item1, item2);
448 }
449
450 protected bool SwapEntitiesImpl (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
451 {
452 bool code;
453 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::SwapImpl(" + typename.EnumToString(InventoryMode, mode) + ") item1=" + Object.GetDebugName(item1) + " item2=" + item2.GetDebugName(this));
454 if (!GameInventory.CanSwapEntitiesEx(item1, item2))
455 Error("[inv] (Man@" + this + ") SwapEntitiesImpl - cannot swap items!");
456
457 code = GetHumanInventory().SwapEntities(mode, item1, item2);
458
460 if (!code)
461 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " SwapEntitiesImpl - cannot swap or forceswap");
462 return code;
463 }
464
465
467 bool JunctureForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
468 {
469 return ForceSwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2, item2_dst);
470 }
471
472 bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
473 {
475 {
476 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveForceSwapEntities input data not sent yet, cannot allow another input action");
477 return false;
478 }
479
480 EntityAI item1Parent = item1.GetHierarchyParent();
481 EntityAI item2Parent = item2.GetHierarchyParent();
482 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1Parent, item2Parent);
483 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2Parent, item1Parent);
484 if (need_j1 || need_j2)
485 return ForceSwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2, item2_dst);
486 else
487 return ForceSwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2, item2_dst);
488 }
489
490 bool LocalForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
491 {
492 return ForceSwapEntitiesImpl(InventoryMode.LOCAL, item1, item2, item2_dst);
493 }
494
495 bool ServerForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
496 {
497 return ForceSwapEntitiesImpl(InventoryMode.SERVER, item1, item2, item2_dst);
498 }
499
500 protected bool ForceSwapEntitiesImpl (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
501 {
502 bool code = false;
503 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ForceSwapImpl(" + typename.EnumToString(InventoryMode, mode) + ") item1=" + Object.GetDebugName(item1) + " item2=" + item2.GetDebugName(this));
504 code = GetHumanInventory().ForceSwapEntities(mode, item1, item2, item2_dst);
505
507 if (!code)
508 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ForceSwapEntitiesImpl - cannot Forceswap");
509 return code;
510 }
511
512
515 {
516 return TakeEntityToTargetInventoryImpl(InventoryMode.JUNCTURE, target, flags, item);
517 }
518
519 override bool PredictiveTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
520 {
522 {
523 Print("[inv] " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetInventory input data not sent yet, cannot allow another input action");
524 return false;
525 }
526
527 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
528 return JunctureTakeEntityToTargetInventory(target, flags, item);
529 else
530 return TakeEntityToTargetInventoryImpl(InventoryMode.PREDICTIVE, target, flags, item);
531 }
532
534 {
535 if( GetInventory().CanAddAttachment( item ) )
536 {
538 }
539 else
540 {
541 GameInventory inventory = GetInventory();
542 GameInventory itemInventory = item.GetInventory();
543 for( int i = 0; i < itemInventory.GetSlotIdCount(); ++i )
544 {
545 int slot_id = itemInventory.GetSlotId(i);
546 EntityAI slot_item = inventory.FindAttachment( slot_id );
547 if( slot_item && inventory.CanSwapEntitiesEx( item, slot_item ) )
548 {
549 return PredictiveSwapEntities(item, slot_item);
550 }
551 }
552 }
553 return false;
554 }
555
556 override bool LocalTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
557 {
558 return TakeEntityToTargetInventoryImpl(InventoryMode.LOCAL, target, flags, item);
559 }
560
561 protected bool TakeEntityToTargetInventoryImpl (InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
562 {
563 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetInv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
564 bool code = GetInventory().TakeEntityToTargetInventory(mode, target, flags, item);
566 return code;
567 }
568
569
571 bool JunctureTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
572 {
573 return TakeEntityToTargetCargoExImpl(InventoryMode.JUNCTURE, cargo, item, row, col);
574 }
575
576 override bool PredictiveTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
577 {
579 {
580 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetCargoEx input data not sent yet, cannot allow another input action");
581 return false;
582 }
583
584 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), cargo.GetCargoOwner()))
585 return JunctureTakeEntityToTargetCargoEx(cargo, item, row, col);
586 else
587 return TakeEntityToTargetCargoExImpl(InventoryMode.PREDICTIVE, cargo, item, row, col);
588 }
589
590 override bool LocalTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
591 {
592 return TakeEntityToTargetCargoExImpl(InventoryMode.LOCAL, cargo, item, row, col);
593 }
594
595 override bool ServerTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
596 {
597 return TakeEntityToTargetCargoExImpl(InventoryMode.SERVER, cargo, item, row, col);
598 }
599
600 protected bool TakeEntityToTargetCargoExImpl (InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col)
601 {
602 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetCgoEx(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
603 bool code = GetInventory().TakeEntityToTargetCargoEx(mode, cargo, item, row, col);
605 return code;
606 }
607
608
610 bool JunctureTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
611 {
612 return TakeEntityToTargetCargoImpl(InventoryMode.JUNCTURE, target, item);
613 }
614
615 override bool PredictiveTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
616 {
618 {
619 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetCargo input data not sent yet, cannot allow another input action");
620 return false;
621 }
622
623 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
624 return JunctureTakeEntityToTargetCargo(target, item);
625 else
626 return TakeEntityToTargetCargoImpl(InventoryMode.PREDICTIVE, target, item);
627 }
628
629 override bool LocalTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
630 {
631 return TakeEntityToTargetCargoImpl(InventoryMode.LOCAL, target, item);
632 }
633
634 override bool ServerTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
635 {
636 if (IsAlive())
637 return TakeEntityToTargetCargoImpl(InventoryMode.SERVER, target, item);
638 else
639 return TakeEntityToTargetCargoImpl(InventoryMode.SERVER, target, item);
640 }
641
642 protected bool TakeEntityToTargetCargoImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
643 {
644 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Take2TargetCgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
645
646 bool code = GetInventory().TakeEntityToTargetInventory(mode, target, FindInventoryLocationType.CARGO, item);
648 return code;
649 }
650
651
653 bool JunctureTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
654 {
655 return TakeEntityToTargetAttachmentExImpl(InventoryMode.JUNCTURE, target, item, slot);
656 }
657
658 override bool PredictiveTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
659 {
661 {
662 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetAttachmentEx input data not sent yet, cannot allow another input action");
663 return false;
664 }
665
666 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
667 return JunctureTakeEntityToTargetAttachmentEx(target, item, slot);
668 else
669 return TakeEntityToTargetAttachmentExImpl(InventoryMode.PREDICTIVE, target, item, slot);
670 }
671
672 override bool LocalTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
673 {
674 return TakeEntityToTargetAttachmentExImpl(InventoryMode.LOCAL, target, item, slot);
675 }
676
677 override bool ServerTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
678 {
679 return TakeEntityToTargetAttachmentExImpl(InventoryMode.SERVER, target, item, slot);
680 }
681
682 protected bool TakeEntityToTargetAttachmentExImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot)
683 {
684 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetAtt(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
685 bool code = GetInventory().TakeEntityAsTargetAttachmentEx(mode, target, item, slot);
687 return code;
688 }
689
690
692 bool JunctureTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
693 {
694 return TakeEntityToTargetAttachmentImpl(InventoryMode.JUNCTURE, target, item);
695 }
696
697 override bool PredictiveTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
698 {
700 {
701 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToTargetAttachment input data not sent yet, cannot allow another input action");
702 return false;
703 }
704
705 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
706 return JunctureTakeEntityToTargetAttachment(target, item);
707 else
708 return TakeEntityToTargetAttachmentImpl(InventoryMode.PREDICTIVE, target, item);
709 }
710
711 override bool LocalTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
712 {
713 return TakeEntityToTargetAttachmentImpl(InventoryMode.LOCAL, target, item);
714 }
715
716 override bool ServerTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
717 {
718 return TakeEntityToTargetAttachmentImpl(InventoryMode.SERVER, target, item);
719 }
720
721 protected bool TakeEntityToTargetAttachmentImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
722 {
724 if( target.GetInventory().FindFreeLocationFor( item, FindInventoryLocationType.ATTACHMENT, il) )
725 {
726 return TakeEntityToTargetAttachmentExImpl(mode, target, item, il.GetSlot());
727 }
728 return false;
729 }
730
731
734 {
735 return TakeToDstImpl(InventoryMode.JUNCTURE, src, dst);
736 }
737
738 override bool PredictiveTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
739 {
741 {
742 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeToDst input data not sent yet, cannot allow another input action");
743 return false;
744 }
745
746 if (NeedInventoryJunctureFromServer(src.GetItem(), src.GetParent(), dst.GetParent()))
747 return JunctureTakeToDst(src, dst);
748 else
749 return TakeToDstImpl(InventoryMode.PREDICTIVE, src, dst);
750 }
751
752 override bool LocalTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
753 {
754 return TakeToDstImpl(InventoryMode.LOCAL, src, dst);
755 }
756
757 override bool ServerTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
758 {
759 return TakeToDstImpl(InventoryMode.SERVER, src, dst);
760 }
761
762 protected bool TakeToDstImpl (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
763 {
764 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Dst(" + typename.EnumToString(InventoryMode, mode) + ") src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst));
765 bool code = GetHumanInventory().TakeToDst(mode, src, dst);
767 return code;
768 }
769
771
773 {
774
775 }
776
777 override bool CanBeSkinned()
778 {
779 return !GetIsFrozen();
780 }
781
782 override bool DisableVicinityIcon()
783 {
784 return true;
785 }
786
788
793
796
799 proto native bool StatRegister( string name );
801
804 proto native float StatGet( string name );
806
810 proto void StatGetCounter( string name, out string value );
812
816 proto void StatGetAsTime( string name, out string value );
818
822 proto native void StatUpdate( string name, float value );
824
828 proto native void StatUpdateByTime( string name );
830
834 proto native void StatUpdateByPosition( string name );
836
840 proto native void StatUpdateByGivenPos( string name, vector pos );
844 proto native void StatInvokeUpdate();
848 proto native void StatSyncToClient();
850
852 {
853 return false;
854 }
855
856 void SetInventorySoftLock(bool status);
857
860 {
861 return Transport.Cast(GetParent()) != null;
862 }
863
865 bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only = true);
866 void SetProcessUIWarning(bool state);
867 void OnGameplayDataHandlerSync(); //depricated, sync now happens before the player is created, calling of this event still happens for legacy reasons
869
877 {
878 return null;
879 }
880
881
882 //OBSOLETE
884 [Obsolete("1.30: Use JunctureTakeEntityToTargetCargo instead")]
886 {
887 return TakeEntityToCargoImpl(InventoryMode.JUNCTURE, item);
888 }
889
890 [Obsolete("1.30: Use TakeEntityToTargetCargoImpl instead")]
891 protected bool TakeEntityToCargoImpl (InventoryMode mode, notnull EntityAI item)
892 {
893 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Cgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
894 bool code = GetHumanInventory().TakeEntityToCargo(mode, item);
896 return code;
897 }
898
899
901 [Obsolete("1.30: Use JunctureTakeEntityToTargetAttachment instead")]
903 {
904 return TakeEntityAsAttachmentImpl(InventoryMode.JUNCTURE, item);
905 }
906
907 [Obsolete("1.30: Use TakeEntityToTargetAttachmentImpl instead")]
908 protected bool TakeEntityAsAttachmentImpl (InventoryMode mode, notnull EntityAI item)
909 {
910 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Att(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
911 bool code = GetHumanInventory().TakeEntityAsAttachment(mode, item);
913 return code;
914 }
915
916
918 [Obsolete("1.30: Use JunctureTakeEntityToTargetAttachmentEx instead")]
919 bool JunctureTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
920 {
921 return TakeEntityAsAttachmentExImpl(InventoryMode.JUNCTURE, item, slot);
922 }
923
924 [Obsolete("1.30: Use TakeEntityToTargetAttachmentExImpl instead")]
925 protected bool TakeEntityAsAttachmentExImpl (InventoryMode mode, notnull EntityAI item, int slot)
926 {
927 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2AttEx(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
928 bool code = GetHumanInventory().TakeEntityAsAttachmentEx(mode, item, slot);
930 return code;
931 }
932};
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Определения DayZGame.c:4074
EPlayerStates
Определения EPlayerStates.c:2
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:18
represents base for cargo storage for entities
Определения Cargo.c:7
bool ReplaceItemInHandsWithNewImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
hand replace
Определения 3_Game/DayZ/Entities/Man.c:334
override bool ServerTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:716
override bool IsHealthVisible()
Определения 3_Game/DayZ/Entities/Man.c:53
proto native void StatUpdateByTime(string name)
Updates stat counter by time.
override bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:738
void AddItemToDelete(EntityAI item)
override bool LocalTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:556
override bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:381
override bool LocalTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:752
bool JunctureTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
to target cgo ex juncture
Определения 3_Game/DayZ/Entities/Man.c:571
ref ScriptInvoker m_OnItemAddedToHands
Определения 3_Game/DayZ/Entities/Man.c:85
bool JunctureTakeEntityAsAttachment(notnull EntityAI item)
as att juncture
Определения 3_Game/DayZ/Entities/Man.c:902
bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:891
bool ServerReplaceItemInHandsWithNewElsewhere(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:367
void UpdateInventoryMenu()
bool JunctureTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
to target cgo juncture
Определения 3_Game/DayZ/Entities/Man.c:610
bool IsUnconsciousStateOnly()
uncon command might be still in progress but state already changed (for simple checks only - eg....
bool LocalReplaceItemElsewhereWithNewInHands(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:322
override bool PredictiveDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:128
override bool ServerTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:634
bool JunctureDropEntity(notnull EntityAI item)
drop juncture
Определения 3_Game/DayZ/Entities/Man.c:123
bool LocalReplaceItemInHandsWithNewElsewhere(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:362
ScriptInvoker GetOnItemAddedToHands()
Определения 3_Game/DayZ/Entities/Man.c:91
void Man()
Определения 3_Game/DayZ/Entities/Man.c:43
bool IsInventorySoftLocked()
Определения 3_Game/DayZ/Entities/Man.c:851
override void EEItemIntoHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:108
void SetInventorySoftLock(bool status)
override bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:519
bool LocalReplaceItemInHandsWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:342
override bool LocalTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:396
bool IsInTransport()
returns true if man is in transport, false otherwise
Определения 3_Game/DayZ/Entities/Man.c:859
proto native void StatSyncToClient()
override bool ServerTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:677
bool ServerSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:445
array< InventoryItem > OnDrawOptics2D()
Определения 3_Game/DayZ/Entities/Man.c:876
void LocalDestroyEntityInHands()
Определения 3_Game/DayZ/Entities/Man.c:230
int GetPlayerState()
Определения 3_Game/DayZ/Entities/Man.c:69
proto native EntityAI GetEntityInHands()
Returns the current entity in hands.
ref CachedEquipmentStorageBase m_CachedEquipmentStorage
Определения 3_Game/DayZ/Entities/Man.c:89
proto native void SetMasterAttenuation(string masterAttenuation)
override bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:658
void JunctureTakeEntityToHands(notnull EntityAI item)
hand juncture
Определения 3_Game/DayZ/Entities/Man.c:173
bool SwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:450
override bool ServerTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:402
bool ReplaceItemWithNewImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
!hand -> !hand replace
Определения 3_Game/DayZ/Entities/Man.c:294
bool JunctureTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
as att ex juncture
Определения 3_Game/DayZ/Entities/Man.c:919
bool ReplaceItemElsewhereWithNewInHandsImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
!hand replace -> hand
Определения 3_Game/DayZ/Entities/Man.c:314
void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:202
bool ServerReplaceItemWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:307
override bool LocalTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:672
proto native float StatGet(string name)
Gets counter value of the specified stat type.
void OnItemInHandsChanged()
Определения 3_Game/DayZ/Entities/Man.c:163
override bool LocalTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:711
override bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:615
proto native owned string GetMasterAttenuation()
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:697
bool PredictiveForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:472
bool JunctureSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
swap juncture
Определения 3_Game/DayZ/Entities/Man.c:417
bool JunctureTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
to target inv juncture
Определения 3_Game/DayZ/Entities/Man.c:514
bool IsSurrendered()
proto native void StatInvokeUpdate()
override bool CanBeSkinned()
Определения 3_Game/DayZ/Entities/Man.c:777
proto native EntityAI GetDrivingVehicle()
Returns vehicle which this Man object is driving. If this Man object isn't as driver of any vehicle i...
void ServerTakeEntityToHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:197
void LocalTakeEntityToHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:192
bool TakeEntityAsAttachmentExImpl(InventoryMode mode, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:925
override bool CanDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:161
override bool IsMan()
Определения 3_Game/DayZ/Entities/Man.c:48
CachedEquipmentStorageBase GetCachedEquipment()
Определения 3_Game/DayZ/Entities/Man.c:789
override bool ServerTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:595
bool LocalSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:440
proto native owned string GetCurrentWeaponMode()
bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only=true)
proto native void SetFaceTexture(string texture_name)
Texture that is used on the Man's face and hands.
void StopDeathDarkeningEffect()
bool PredictiveTakeOrSwapAttachment(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:533
proto void StatGetCounter(string name, out string value)
Gets counter value as string of the specified stat type.
override bool HasFixedActionTargetCursorPosition()
Определения 3_Game/DayZ/Entities/Man.c:58
override bool DisableVicinityIcon()
Определения 3_Game/DayZ/Entities/Man.c:782
bool JunctureTakeEntityToCargo(notnull EntityAI item)
to cgo juncture
Определения 3_Game/DayZ/Entities/Man.c:885
bool TakeEntityToTargetAttachmentExImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:682
bool JunctureTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
to inv juncture
Определения 3_Game/DayZ/Entities/Man.c:375
bool ServerReplaceItemElsewhereWithNewInHands(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:327
bool LocalForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:490
bool JunctureTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
to target att ex juncture
Определения 3_Game/DayZ/Entities/Man.c:653
bool JunctureTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
to dst juncture
Определения 3_Game/DayZ/Entities/Man.c:733
proto native void SetSpeechRestricted(bool state)
Set speech restriction.
proto native void SetFaceMaterial(string material_name)
Material that is used on the Man's face and hands.
proto native bool IsCameraInsideVehicle()
bool ForceSwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:500
override bool ServerTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:757
proto native bool StatRegister(string name)
override bool LocalTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:590
bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:762
bool JunctureTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
to target att juncture
Определения 3_Game/DayZ/Entities/Man.c:692
bool ServerForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:495
void OnItemInHandsChangedEx(bool pInstant=false, bool pChangeAnimationInstance=true)
Определения 3_Game/DayZ/Entities/Man.c:168
override bool LocalTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:629
override bool ServerDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:147
proto native void StatUpdate(string name, float value)
Updates stat counter with given value.
proto native PlayerIdentity GetIdentity()
Returns player's identity.
bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
Определения 3_Game/DayZ/Entities/Man.c:170
proto native bool IsSpeechRestricted()
Check if player has resctricted speech.
bool TakeEntityToTargetAttachmentImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:721
proto native UAInterface GetInputInterface()
Returns player's input interface.
proto native void StatUpdateByPosition(string name)
Updates stat counter by player's actual position.
bool JunctureForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
ForceSwap juncture.
Определения 3_Game/DayZ/Entities/Man.c:467
bool CanPlaceItem(EntityAI item)
void SetProcessUIWarning(bool state)
ref ScriptInvoker m_OnItemRemovedFromHands
Определения 3_Game/DayZ/Entities/Man.c:87
bool IsUnconscious()
void JunctureDeleteItem(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:772
bool DropEntityImpl(InventoryMode mode, notnull EntityAI owner, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:152
bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:642
bool TakeEntityToTargetCargoExImpl(InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:600
proto void StatGetAsTime(string name, out string value)
Gets counter value as formatted time string of the specified stat type.
bool ServerReplaceItemInHandsWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:347
proto native bool IsSoundInsideBuilding()
void PredictiveMoveItemFromHandsToInventory()
ToDo: Old system method. Might should be adjusted to new system at some point.
Определения 3_Game/DayZ/Entities/Man.c:238
proto native HumanInventory GetHumanInventory()
override bool LocalDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:142
override void EEItemOutOfHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:115
void OnGameplayDataHandlerSync()
bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:561
ScriptInvoker GetOnItemRemovedFromHands()
Определения 3_Game/DayZ/Entities/Man.c:100
void PredictiveTakeEntityToHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:178
bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:908
proto native void StatUpdateByGivenPos(string name, vector pos)
Updates stat counter by given position.
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:422
override bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:576
bool ReplaceItemInHandsWithNewElsewhereImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
hand replace2
Определения 3_Game/DayZ/Entities/Man.c:354
bool LocalReplaceItemWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:302
bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:408
void EntityAIType()
Определения EntityAIType.c:21
static proto native EntityAI LocationGetEntity(notnull InventoryLocation inv_loc)
static proto native bool ClearInventoryReservation(EntityAI item, InventoryLocation dst)
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
proto native int GetSlotId(int index)
attachments
proto native int GetSlotIdCount()
proto native bool FindFreeLocationFor(notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFreeLocationFor.
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
script counterpart to engine's class Inventory
override bool TakeEntityToInventory(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
Определения HumanInventory.c:254
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:243
inventory for plain man/human
Определения HumanInventory.c:10
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
static string DumpToStringNullSafe(InventoryLocation loc)
Определения InventoryLocation.c:233
proto native int GetSlot()
returns slot id if current type is Attachment
InventoryLocation.
Определения InventoryLocation.c:30
static bool IsSyncLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:789
Определения ObjectTyped.c:2
The class that will be instanced (moddable)
Определения gameplay.c:389
base class for transformation operations (creating one item from another)
Определения ReplaceItemWithNewLambdaBase.c:5
proto static native bool CanStoreInputUserData()
Returns true when the channel is free, AND the InputBuffer is NOT full (same as '!...
Определения gameplay.c:121
ScriptInvoker Class provide list of callbacks usage:
Определения 2_GameLib/DayZ/tools.c:116
Native class for boats - handles physics simulation.
Определения Boat.c:29
Определения UAInput.c:107
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:119
override string GetDebugName()
Определения dayzplayer.c:1191
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetFlags(ShapeFlags flags)
void Obsolete(string msg="")
Определения EnScript.c:371
EntityFlags
Entity flags.
Определения EnEntity.c:115
proto native Widget GetParent()
Get parent of the Effect.
Определения Effect.c:422