DayZ 1.29
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 {
69 if (IsAlive())
70 return EPlayerStates.ALIVE;
71
72 return EPlayerStates.DEAD;
73 }
74
76
81 proto native EntityAI GetEntityInHands();
82 //Called when an item is removed from the cargo of this item
84 //Called when an item is moved around in the cargo of this item
86
88
96
97
105
107 {
108 SetWeightDirty();
110 m_OnItemAddedToHands.Invoke( item, this );
111 }
112
114 {
115 SetWeightDirty();
117 m_OnItemRemovedFromHands.Invoke( item, this );
118 }
119
121 bool JunctureDropEntity (notnull EntityAI item)
122 {
123 return DropEntityImpl(InventoryMode.JUNCTURE, this, item);
124 }
125
126 override bool PredictiveDropEntity (notnull EntityAI item)
127 {
129 {
130 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveDropEntity input data not sent yet, cannot allow another input action");
131 return false;
132 }
133
134 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
135 return JunctureDropEntity(item);
136 else
137 return DropEntityImpl(InventoryMode.PREDICTIVE, this, item);
138 }
139
140 override bool LocalDropEntity (notnull EntityAI item)
141 {
142 return DropEntityImpl(InventoryMode.LOCAL, this, item);
143 }
144
145 override bool ServerDropEntity (notnull EntityAI item)
146 {
147 return DropEntityImpl(InventoryMode.SERVER, this, item);
148 }
149
150 protected bool DropEntityImpl (InventoryMode mode, notnull EntityAI owner, notnull EntityAI item)
151 {
152 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::DropEntity(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
153 bool code = GetHumanInventory().DropEntity(mode, owner, item);
155 return code;
156 }
157
158
159 override bool CanDropEntity (notnull EntityAI item) { return true; }
160
162
163 bool NeedInventoryJunctureFromServer (notnull EntityAI item, EntityAI currParent, EntityAI newParent) { return false; }
164
167 {
168 TakeEntityToHandsImpl(InventoryMode.JUNCTURE, item);
169 }
170
172 {
174 {
175 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToHands input data not sent yet, cannot allow another input action");
176 return;
177 }
178
179 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
181 else
182 TakeEntityToHandsImpl(InventoryMode.PREDICTIVE, item);
183 }
184
186 {
188 }
189
191 {
193 }
194
196 {
197 if (!g_Game.IsDedicatedServer() )
198 {
200 il.SetHands(this, item);
201 //GetInventory().AddInventoryReservationEx(item, il ,GameInventory.c_InventoryReservationTimeoutShortMS);
202 }
203
204 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Hands(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
205 EntityAI itemInHands = GetEntityInHands();
206
208 if (item.GetInventory().GetCurrentInventoryLocation(src_item))
209 {
210 if (itemInHands == null)
211 {
213 hand_dst.SetHands(this, item);
214 GetHumanInventory().TakeToDst(mode, src_item, hand_dst);
215 }
216 else if (GetHumanInventory().CanSwapEntitiesEx(itemInHands, item))
217 GetInventory().SwapEntities(mode, itemInHands, item);
219 }
220 }
221
222
224 {
225 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Destroy IH=" + GetEntityInHands());
226 GetHumanInventory().LocalDestroyEntity(GetEntityInHands());
228 }
229
232 {
233 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Stash IH=" + GetEntityInHands());
235 {
236 Print("[inv] PredictiveMoveItemFromHandsToInventory input data not sent yet, cannot allow another input action");
237 return;
238 }
239
240 InventoryMode invMode = InventoryMode.PREDICTIVE;
241 EntityAI entityInHands = GetEntityInHands();
242
243 if (NeedInventoryJunctureFromServer(entityInHands, this, this))
244 invMode = InventoryMode.JUNCTURE;
245
246 HumanInventory humanInventory = GetHumanInventory();
248 if (entityInHands.m_OldLocation && entityInHands.m_OldLocation.IsValid())
249 {
251 entityInHands.GetInventory().GetCurrentInventoryLocation(invLoc);
252
254 EntityAI oldLocationParent = entityInHands.m_OldLocation.GetParent();
255 if (oldLocationParent && oldLocationParent.GetHierarchyRootPlayer())
256 {
257 humanInventory.ClearInventoryReservation(entityInHands, entityInHands.m_OldLocation);
258 if (humanInventory.LocationCanMoveEntity(invLoc, entityInHands.m_OldLocation))
259 {
260 EntityAI oldLocEntity = humanInventory.LocationGetEntity(entityInHands.m_OldLocation);
261 if (!oldLocEntity && humanInventory.TakeToDst(invMode, invLoc, entityInHands.m_OldLocation))
262 {
264 return;
265 }
266 else
267 {
268 InventoryLocation newLocation = new InventoryLocation;
269 if (humanInventory.FindFreeLocationFor(entityInHands, FindInventoryLocationType.CARGO, newLocation))
270 {
271 if (humanInventory.TakeToDst(invMode, invLoc, newLocation))
272 {
274 return;
275 }
276 }
277 }
278 }
279 }
280 }
281
284 }
285
288 {
289 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace !HND lambda=" + lambda.DumpToString());
290 bool code = GetHumanInventory().ReplaceItemWithNew(mode, lambda);
292 return code;
293 }
294
299
304
305
308 {
309 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace !HND->HND lambda=" + lambda.DumpToString());
310 bool code = GetHumanInventory().ReplaceItemElsewhereWithNewInHands(mode, lambda);
312 return code;
313 }
314
319
324
325
328 {
329 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace HND->HND lambda=" + lambda.DumpToString());
330 bool code = GetHumanInventory().ReplaceItemInHandsWithNew(mode, lambda);
332 return code;
333 }
334
339
344
345
348 {
349 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Replace HND->elsewhere lambda=" + lambda.DumpToString());
350 bool code = GetHumanInventory().ReplaceItemInHandsWithNewElsewhere(mode, lambda);
352 return code;
353 }
354
359
364
365
368 {
369 return TakeEntityToInventoryImpl(InventoryMode.JUNCTURE, flags, item);
370 }
371
373 {
375 {
376 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToInventory input data not sent yet, cannot allow another input action");
377 return false;
378 }
379
380 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
381 return JunctureTakeEntityToInventory(flags, item);
382 else
383 return TakeEntityToInventoryImpl(InventoryMode.PREDICTIVE, flags, item);
384 }
385
387 {
388 return TakeEntityToInventoryImpl(InventoryMode.LOCAL, flags, item);
389 }
390
392 {
393 return TakeEntityToInventoryImpl(InventoryMode.SERVER, flags, item);
394 }
395
397 {
398 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
399 bool code = GetHumanInventory().TakeEntityToInventory(mode, flags, item);
401 return code;
402 }
403
404
407 {
408 return TakeEntityToCargoImpl(InventoryMode.JUNCTURE, item);
409 }
410
411 override bool PredictiveTakeEntityToCargo (notnull EntityAI item)
412 {
414 {
415 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToCargo input data not sent yet, cannot allow another input action");
416 return false;
417 }
418
419 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
420 return JunctureTakeEntityToCargo(item);
421 else
422 return TakeEntityToCargoImpl(InventoryMode.PREDICTIVE, item);
423 }
424
425 override bool LocalTakeEntityToCargo (notnull EntityAI item)
426 {
427 return TakeEntityToCargoImpl(InventoryMode.LOCAL, item);
428 }
429
430 override bool ServerTakeEntityToCargo (notnull EntityAI item)
431 {
432 return TakeEntityToCargoImpl(InventoryMode.SERVER, item);
433 }
434
435 protected bool TakeEntityToCargoImpl (InventoryMode mode, notnull EntityAI item)
436 {
437 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Cgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
438 bool code = GetHumanInventory().TakeEntityToCargo(mode, item);
440 return code;
441 }
442
443
446 {
447 return TakeEntityAsAttachmentImpl(InventoryMode.JUNCTURE, item);
448 }
449
450 override bool PredictiveTakeEntityAsAttachment (notnull EntityAI item)
451 {
453 {
454 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityAsAttachment input data not sent yet, cannot allow another input action");
455 return false;
456 }
457
458 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
460 else
461 return TakeEntityAsAttachmentImpl(InventoryMode.PREDICTIVE, item);
462 }
463
464 override bool LocalTakeEntityAsAttachment (notnull EntityAI item)
465 {
466 return TakeEntityAsAttachmentImpl(InventoryMode.LOCAL, item);
467 }
468
469 override bool ServerTakeEntityAsAttachment (notnull EntityAI item)
470 {
471 return TakeEntityAsAttachmentImpl(InventoryMode.SERVER, item);
472 }
473
474 protected bool TakeEntityAsAttachmentImpl (InventoryMode mode, notnull EntityAI item)
475 {
476 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Att(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
477 bool code = GetHumanInventory().TakeEntityAsAttachment(mode, item);
479 return code;
480 }
481
482
484 bool JunctureTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
485 {
486 return TakeEntityAsAttachmentExImpl(InventoryMode.JUNCTURE, item, slot);
487 }
488
489 override bool PredictiveTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
490 {
492 {
493 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityAsAttachmentEx input data not sent yet, cannot allow another input action");
494 return false;
495 }
496
497 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), this))
498 return JunctureTakeEntityAsAttachmentEx(item, slot);
499 else
500 return TakeEntityAsAttachmentExImpl(InventoryMode.PREDICTIVE, item, slot);
501 }
502
503 override bool LocalTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
504 {
505 return TakeEntityAsAttachmentExImpl(InventoryMode.LOCAL, item, slot);
506 }
507
508 override bool ServerTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
509 {
510 return TakeEntityAsAttachmentExImpl(InventoryMode.SERVER, item, slot);
511 }
512
513 protected bool TakeEntityAsAttachmentExImpl (InventoryMode mode, notnull EntityAI item, int slot)
514 {
515 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2AttEx(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
516 bool code = GetHumanInventory().TakeEntityAsAttachmentEx(mode, item, slot);
518 return code;
519 }
520
521
523 bool JunctureSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
524 {
525 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
526 }
527
528 bool PredictiveSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
529 {
531 {
532 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveSwapEntities input data not sent yet, cannot allow another input action");
533 return false;
534 }
535
536 EntityAI item1Parent = item1.GetHierarchyParent();
537 EntityAI item2Parent = item2.GetHierarchyParent();
538 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1Parent, item2Parent);
539 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2Parent, item1Parent);
540 if (need_j1 || need_j2)
541 return SwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2);
542 else
543 return SwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2);
544 }
545
546 bool LocalSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
547 {
548 return SwapEntitiesImpl(InventoryMode.LOCAL, item1, item2);
549 }
550
551 bool ServerSwapEntities (notnull EntityAI item1, notnull EntityAI item2)
552 {
553 return SwapEntitiesImpl(InventoryMode.SERVER, item1, item2);
554 }
555
556 protected bool SwapEntitiesImpl (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
557 {
558 bool code;
559 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::SwapImpl(" + typename.EnumToString(InventoryMode, mode) + ") item1=" + Object.GetDebugName(item1) + " item2=" + item2.GetDebugName(this));
560 if (!GameInventory.CanSwapEntitiesEx(item1, item2))
561 Error("[inv] (Man@" + this + ") SwapEntitiesImpl - cannot swap items!");
562
563 code = GetHumanInventory().SwapEntities(mode, item1, item2);
564
566 if (!code)
567 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " SwapEntitiesImpl - cannot swap or forceswap");
568 return code;
569 }
570
571
573 bool JunctureForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
574 {
575 return ForceSwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2, item2_dst);
576 }
577
578 bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
579 {
581 {
582 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveForceSwapEntities input data not sent yet, cannot allow another input action");
583 return false;
584 }
585
586 EntityAI item1Parent = item1.GetHierarchyParent();
587 EntityAI item2Parent = item2.GetHierarchyParent();
588 bool need_j1 = NeedInventoryJunctureFromServer(item1, item1Parent, item2Parent);
589 bool need_j2 = NeedInventoryJunctureFromServer(item2, item2Parent, item1Parent);
590 if (need_j1 || need_j2)
591 return ForceSwapEntitiesImpl(InventoryMode.JUNCTURE, item1, item2, item2_dst);
592 else
593 return ForceSwapEntitiesImpl(InventoryMode.PREDICTIVE, item1, item2, item2_dst);
594 }
595
596 bool LocalForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
597 {
598 return ForceSwapEntitiesImpl(InventoryMode.LOCAL, item1, item2, item2_dst);
599 }
600
601 bool ServerForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
602 {
603 return ForceSwapEntitiesImpl(InventoryMode.SERVER, item1, item2, item2_dst);
604 }
605
606 protected bool ForceSwapEntitiesImpl (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
607 {
608 bool code = false;
609 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ForceSwapImpl(" + typename.EnumToString(InventoryMode, mode) + ") item1=" + Object.GetDebugName(item1) + " item2=" + item2.GetDebugName(this));
610 code = GetHumanInventory().ForceSwapEntities(mode, item1, item2, item2_dst);
611
613 if (!code)
614 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ForceSwapEntitiesImpl - cannot Forceswap");
615 return code;
616 }
617
618
621 {
622 return TakeEntityToTargetInventoryImpl(InventoryMode.JUNCTURE, target, flags, item);
623 }
624
625 override bool PredictiveTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
626 {
628 {
629 Print("[inv] " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetInventory input data not sent yet, cannot allow another input action");
630 return false;
631 }
632
633 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
634 return JunctureTakeEntityToTargetInventory(target, flags, item);
635 else
636 return TakeEntityToTargetInventoryImpl(InventoryMode.PREDICTIVE, target, flags, item);
637 }
638
640 {
641 if( GetInventory().CanAddAttachment( item ) )
642 {
644 }
645 else
646 {
647 GameInventory inventory = GetInventory();
648 GameInventory itemInventory = item.GetInventory();
649 for( int i = 0; i < itemInventory.GetSlotIdCount(); ++i )
650 {
651 int slot_id = itemInventory.GetSlotId(i);
652 EntityAI slot_item = inventory.FindAttachment( slot_id );
653 if( slot_item && inventory.CanSwapEntitiesEx( item, slot_item ) )
654 {
655 return PredictiveSwapEntities(item, slot_item);
656 }
657 }
658 }
659 return false;
660 }
661
662 override bool LocalTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
663 {
664 return TakeEntityToTargetInventoryImpl(InventoryMode.LOCAL, target, flags, item);
665 }
666
667 protected bool TakeEntityToTargetInventoryImpl (InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
668 {
669 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetInv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
670 bool code = GetInventory().TakeEntityToTargetInventory(mode, target, flags, item);
672 return code;
673 }
674
675
677 bool JunctureTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
678 {
679 return TakeEntityToTargetCargoExImpl(InventoryMode.JUNCTURE, cargo, item, row, col);
680 }
681
682 override bool PredictiveTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
683 {
685 {
686 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetCargoEx input data not sent yet, cannot allow another input action");
687 return false;
688 }
689
690 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), cargo.GetCargoOwner()))
691 return JunctureTakeEntityToTargetCargoEx(cargo, item, row, col);
692 else
693 return TakeEntityToTargetCargoExImpl(InventoryMode.PREDICTIVE, cargo, item, row, col);
694 }
695
696 override bool LocalTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
697 {
698 return TakeEntityToTargetCargoExImpl(InventoryMode.LOCAL, cargo, item, row, col);
699 }
700
701 override bool ServerTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
702 {
703 return TakeEntityToTargetCargoExImpl(InventoryMode.SERVER, cargo, item, row, col);
704 }
705
706 protected bool TakeEntityToTargetCargoExImpl (InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col)
707 {
708 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetCgoEx(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
709 bool code = GetInventory().TakeEntityToTargetCargoEx(mode, cargo, item, row, col);
711 return code;
712 }
713
714
716 bool JunctureTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
717 {
718 return TakeEntityToTargetCargoImpl(InventoryMode.JUNCTURE, target, item);
719 }
720
721 override bool PredictiveTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
722 {
724 {
725 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetCargo input data not sent yet, cannot allow another input action");
726 return false;
727 }
728
729 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
730 return JunctureTakeEntityToTargetCargo(target, item);
731 else
732 return TakeEntityToTargetCargoImpl(InventoryMode.PREDICTIVE, target, item);
733 }
734
735 override bool LocalTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
736 {
737 return TakeEntityToTargetCargoImpl(InventoryMode.LOCAL, target, item);
738 }
739
740 override bool ServerTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
741 {
742 if (IsAlive())
743 return TakeEntityToTargetCargoImpl(InventoryMode.SERVER, target, item);
744 else
745 return TakeEntityToTargetCargoImpl(InventoryMode.SERVER, target, item);
746 }
747
748 protected bool TakeEntityToTargetCargoImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
749 {
750 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " Take2TargetCgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
751
752 bool code = GetInventory().TakeEntityToTargetInventory(mode, target, FindInventoryLocationType.CARGO, item);
754 return code;
755 }
756
757
759 bool JunctureTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
760 {
761 return TakeEntityToTargetAttachmentExImpl(InventoryMode.JUNCTURE, target, item, slot);
762 }
763
764 override bool PredictiveTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
765 {
767 {
768 Print("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::PredictiveTakeEntityToTargetAttachmentEx input data not sent yet, cannot allow another input action");
769 return false;
770 }
771
772 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
773 return JunctureTakeEntityToTargetAttachmentEx(target, item, slot);
774 else
775 return TakeEntityToTargetAttachmentExImpl(InventoryMode.PREDICTIVE, target, item, slot);
776 }
777
778 override bool LocalTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
779 {
780 return TakeEntityToTargetAttachmentExImpl(InventoryMode.LOCAL, target, item, slot);
781 }
782
783 override bool ServerTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
784 {
785 return TakeEntityToTargetAttachmentExImpl(InventoryMode.SERVER, target, item, slot);
786 }
787
788 protected bool TakeEntityToTargetAttachmentExImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot)
789 {
790 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2TargetAtt(" + typename.EnumToString(InventoryMode, mode) + ") item=" + Object.GetDebugName(item));
791 bool code = GetInventory().TakeEntityAsTargetAttachmentEx(mode, target, item, slot);
793 return code;
794 }
795
796
798 bool JunctureTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
799 {
800 return TakeEntityToTargetAttachmentImpl(InventoryMode.JUNCTURE, target, item);
801 }
802
803 override bool PredictiveTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
804 {
806 {
807 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeEntityToTargetAttachment input data not sent yet, cannot allow another input action");
808 return false;
809 }
810
811 if (NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), target))
812 return JunctureTakeEntityToTargetAttachment(target, item);
813 else
814 return TakeEntityToTargetAttachmentImpl(InventoryMode.PREDICTIVE, target, item);
815 }
816
817 override bool LocalTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
818 {
819 return TakeEntityToTargetAttachmentImpl(InventoryMode.LOCAL, target, item);
820 }
821
822 override bool ServerTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
823 {
824 return TakeEntityToTargetAttachmentImpl(InventoryMode.SERVER, target, item);
825 }
826
827 protected bool TakeEntityToTargetAttachmentImpl (InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
828 {
830 if( target.GetInventory().FindFreeLocationFor( item, FindInventoryLocationType.ATTACHMENT, il) )
831 {
832 return TakeEntityToTargetAttachmentExImpl(mode, target, item, il.GetSlot());
833 }
834 return false;
835 }
836
837
840 {
841 return TakeToDstImpl(InventoryMode.JUNCTURE, src, dst);
842 }
843
844 override bool PredictiveTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
845 {
847 {
848 Print("[inv] " + GetSimulationTimeStamp() + " Man@" + this + " ::PredictiveTakeToDst input data not sent yet, cannot allow another input action");
849 return false;
850 }
851
852 if (NeedInventoryJunctureFromServer(src.GetItem(), src.GetParent(), dst.GetParent()))
853 return JunctureTakeToDst(src, dst);
854 else
855 return TakeToDstImpl(InventoryMode.PREDICTIVE, src, dst);
856 }
857
858 override bool LocalTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
859 {
860 return TakeToDstImpl(InventoryMode.LOCAL, src, dst);
861 }
862
863 override bool ServerTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
864 {
865 return TakeToDstImpl(InventoryMode.SERVER, src, dst);
866 }
867
868 protected bool TakeToDstImpl (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
869 {
870 if (LogManager.IsSyncLogEnable()) syncDebugPrint("[inv] " + GetDebugName(this) + " STS = " + GetSimulationTimeStamp() + " ::Take2Dst(" + typename.EnumToString(InventoryMode, mode) + ") src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst));
871 bool code = GetHumanInventory().TakeToDst(mode, src, dst);
873 return code;
874 }
875
877
879 {
880
881 }
882
883 override bool CanBeSkinned()
884 {
885 return !GetIsFrozen();
886 }
887
888 override bool DisableVicinityIcon()
889 {
890 return true;
891 }
892
894
899
902
905 proto native bool StatRegister( string name );
907
910 proto native float StatGet( string name );
912
916 proto void StatGetCounter( string name, out string value );
918
922 proto void StatGetAsTime( string name, out string value );
924
928 proto native void StatUpdate( string name, float value );
930
934 proto native void StatUpdateByTime( string name );
936
940 proto native void StatUpdateByPosition( string name );
942
946 proto native void StatUpdateByGivenPos( string name, vector pos );
950 proto native void StatInvokeUpdate();
954 proto native void StatSyncToClient();
956
958 {
959 return false;
960 }
961
962 void SetInventorySoftLock(bool status);
963
966 {
967 return Transport.Cast(GetParent()) != null;
968 }
969
971 bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only = true);
972 void SetProcessUIWarning(bool state);
973 void OnGameplayDataHandlerSync(); //depricated, sync now happens before the player is created, calling of this event still happens for legacy reasons
975
983 {
984 return null;
985 }
986};
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:3942
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:327
override bool ServerTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:822
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:844
void AddItemToDelete(EntityAI item)
override bool LocalTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:662
override bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:372
override bool LocalTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:858
override bool PredictiveTakeEntityAsAttachment(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:450
bool JunctureTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
to target cgo ex juncture
Определения 3_Game/DayZ/Entities/Man.c:677
ref ScriptInvoker m_OnItemAddedToHands
Определения 3_Game/DayZ/Entities/Man.c:83
bool JunctureTakeEntityAsAttachment(notnull EntityAI item)
as att juncture
Определения 3_Game/DayZ/Entities/Man.c:445
bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:435
bool ServerReplaceItemInHandsWithNewElsewhere(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:360
override bool PredictiveTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:489
void UpdateInventoryMenu()
bool JunctureTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
to target cgo juncture
Определения 3_Game/DayZ/Entities/Man.c:716
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:315
override bool PredictiveDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:126
override bool ServerTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:740
override bool ServerTakeEntityToCargo(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:430
bool JunctureDropEntity(notnull EntityAI item)
drop juncture
Определения 3_Game/DayZ/Entities/Man.c:121
bool LocalReplaceItemInHandsWithNewElsewhere(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:355
ScriptInvoker GetOnItemAddedToHands()
Определения 3_Game/DayZ/Entities/Man.c:89
void Man()
Определения 3_Game/DayZ/Entities/Man.c:43
bool IsInventorySoftLocked()
Определения 3_Game/DayZ/Entities/Man.c:957
void SetInventorySoftLock(bool status)
override bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:625
bool LocalReplaceItemInHandsWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:335
override bool LocalTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:386
bool IsInTransport()
returns true if man is in transport, false otherwise
Определения 3_Game/DayZ/Entities/Man.c:965
proto native void StatSyncToClient()
override bool ServerTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:783
bool ServerSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:551
array< InventoryItem > OnDrawOptics2D()
Определения 3_Game/DayZ/Entities/Man.c:982
override bool LocalTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:503
void LocalDestroyEntityInHands()
Определения 3_Game/DayZ/Entities/Man.c:223
int GetPlayerState()
Определения 3_Game/DayZ/Entities/Man.c:67
proto native EntityAI GetEntityInHands()
Returns the current entity in hands.
ref CachedEquipmentStorageBase m_CachedEquipmentStorage
Определения 3_Game/DayZ/Entities/Man.c:87
proto native void SetMasterAttenuation(string masterAttenuation)
override bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:764
void JunctureTakeEntityToHands(notnull EntityAI item)
hand juncture
Определения 3_Game/DayZ/Entities/Man.c:166
bool SwapEntitiesImpl(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:556
override bool ServerTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:391
bool ReplaceItemWithNewImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
!hand -> !hand replace
Определения 3_Game/DayZ/Entities/Man.c:287
bool JunctureTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
as att ex juncture
Определения 3_Game/DayZ/Entities/Man.c:484
bool ReplaceItemElsewhereWithNewInHandsImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
!hand replace -> hand
Определения 3_Game/DayZ/Entities/Man.c:307
void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:195
bool ServerReplaceItemWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:300
override bool LocalTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:778
proto native float StatGet(string name)
Gets counter value of the specified stat type.
void OnItemInHandsChanged()
Определения 3_Game/DayZ/Entities/Man.c:161
override bool LocalTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:817
override bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:721
proto native owned string GetMasterAttenuation()
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:803
bool PredictiveForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:578
bool JunctureSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
swap juncture
Определения 3_Game/DayZ/Entities/Man.c:523
bool JunctureTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
to target inv juncture
Определения 3_Game/DayZ/Entities/Man.c:620
proto native void StatInvokeUpdate()
override bool CanBeSkinned()
Определения 3_Game/DayZ/Entities/Man.c:883
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:190
void LocalTakeEntityToHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:185
bool TakeEntityAsAttachmentExImpl(InventoryMode mode, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:513
override bool CanDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:159
override bool IsMan()
Определения 3_Game/DayZ/Entities/Man.c:48
CachedEquipmentStorageBase GetCachedEquipment()
Определения 3_Game/DayZ/Entities/Man.c:895
override bool ServerTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:701
bool LocalSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:546
proto native owned string GetCurrentWeaponMode()
void EEItemIntoHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:106
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:639
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:888
bool JunctureTakeEntityToCargo(notnull EntityAI item)
to cgo juncture
Определения 3_Game/DayZ/Entities/Man.c:406
bool TakeEntityToTargetAttachmentExImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:788
bool JunctureTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
to inv juncture
Определения 3_Game/DayZ/Entities/Man.c:367
bool ServerReplaceItemElsewhereWithNewInHands(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:320
bool LocalForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:596
bool JunctureTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
to target att ex juncture
Определения 3_Game/DayZ/Entities/Man.c:759
bool JunctureTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
to dst juncture
Определения 3_Game/DayZ/Entities/Man.c:839
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:606
override bool ServerTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:863
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:696
bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения 3_Game/DayZ/Entities/Man.c:868
bool JunctureTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
to target att juncture
Определения 3_Game/DayZ/Entities/Man.c:798
bool ServerForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения 3_Game/DayZ/Entities/Man.c:601
override bool LocalTakeEntityAsAttachment(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:464
override bool LocalTakeEntityToCargo(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:425
override bool LocalTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:735
override bool ServerDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:145
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:163
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:827
proto native UAInterface GetInputInterface()
Returns player's input interface.
override bool ServerTakeEntityAsAttachment(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:469
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:573
bool CanPlaceItem(EntityAI item)
void SetProcessUIWarning(bool state)
ref ScriptInvoker m_OnItemRemovedFromHands
Определения 3_Game/DayZ/Entities/Man.c:85
bool IsUnconscious()
void JunctureDeleteItem(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:878
bool DropEntityImpl(InventoryMode mode, notnull EntityAI owner, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:150
bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:748
bool TakeEntityToTargetCargoExImpl(InventoryMode mode, notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:706
void Transport()
Определения Transport.c:71
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:340
override bool ServerTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
Определения 3_Game/DayZ/Entities/Man.c:508
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:231
proto native HumanInventory GetHumanInventory()
override bool LocalDropEntity(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:140
void OnGameplayDataHandlerSync()
void EEItemOutOfHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:113
bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:667
ScriptInvoker GetOnItemRemovedFromHands()
Определения 3_Game/DayZ/Entities/Man.c:98
void PredictiveTakeEntityToHands(EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:171
override bool PredictiveTakeEntityToCargo(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:411
bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:474
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:528
override bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
Определения 3_Game/DayZ/Entities/Man.c:682
bool ReplaceItemInHandsWithNewElsewhereImpl(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
hand replace2
Определения 3_Game/DayZ/Entities/Man.c:347
bool LocalReplaceItemWithNew(ReplaceItemWithNewLambdaBase lambda)
Определения 3_Game/DayZ/Entities/Man.c:295
bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:396
void EntityAIType()
Определения EntityAIType.c:3
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:253
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:776
Определения 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
Определения UAInput.c:97
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:119
override string GetDebugName()
Определения dayzplayer.c:1173
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)
EntityFlags
Entity flags.
Определения EnEntity.c:115
proto native Widget GetParent()
Get parent of the Effect.
Определения Effect.c:422