DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HumanInventory.c
См. документацию.
1
10{
12 //int m_UserReservationToClear = -1;
16 proto native EntityAI GetEntityInHands();
17
21 proto native bool CanAddEntityInHands(EntityAI e);
22
30 proto native bool TestAddEntityInHands(EntityAI e, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check);
31
35 proto native bool CanRemoveEntityInHands();
36
37 proto native bool CanOpenInventory();
38
44 proto native EntityAI CreateInHands(string typeName);
45
46 proto native int GetUserReservedLocationCount();
47 proto native int FindUserReservedLocationIndex(notnull EntityAI e);
48 proto native int FindCollidingUserReservedLocationIndex(notnull EntityAI e, notnull InventoryLocation dst);
49 proto native void GetUserReservedLocation(int index, out notnull InventoryLocation dst);
51
52 proto native void SetUserReservedLocation(notnull EntityAI eai, notnull InventoryLocation dst);
53 proto native void ClearUserReservedLocation(notnull EntityAI eai);
54 proto native bool ClearUserReservedLocationAtIndex(int index);
55 proto native void ClearUserReservedLocationForContainer(notnull EntityAI eai);
56 proto native bool GetDebugFlag();
57
65 override EntityAI CreateInInventory(string type)
66 {
67 EntityAI newEntity = super.CreateInInventory(type);
68 if (newEntity == null)
69 newEntity = CreateInHands(type);
70 return newEntity;
71 }
72
74 {
75 if (g_Game.IsClient())
77 else if (!g_Game.IsMultiplayer())
78 {
80 eai.GetOnReleaseLock().Invoke(eai);
81 }
82
83 }
84
86 {
87 if (g_Game.IsClient())
89 else if (!g_Game.IsMultiplayer())
90 {
92
94
96 EntityAI item = il.GetItem();
97 item.GetOnReleaseLock().Invoke(item);
98 }
99
100 }
101
103 {
104 return Man.Cast(GetInventoryOwner());
105 }
106
108 {
109 return e == GetEntityInHands();
110 }
111
113
117
119 {
121 cpy.Copy(src);
122 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] OnEntityInHandsCreated src=" + InventoryLocation.DumpToStringNullSafe(cpy));
123 ProcessHandEvent(new HandEventCreated(GetManOwner(), src));
124 }
125
127 {
129 cpy.Copy(src);
130 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] OnEntityInHandsDestroyed src=" + InventoryLocation.DumpToStringNullSafe(cpy));
131 ProcessHandEvent(new HandEventDestroyed(GetManOwner(), cpy));
132 }
133
135 {
136 return true;
137 }
138
139 override bool DropEntity(InventoryMode mode, EntityAI owner, notnull EntityAI item)
140 {
142 if (item)
143 {
144 GameInventory itemInventory = item.GetInventory();
145 if (itemInventory && itemInventory.GetCurrentInventoryLocation(src))
146 {
147 switch (src.GetType())
148 {
149 case InventoryLocationType.HANDS:
150 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::DropEntity(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
151 HandEvent(mode, new HandEventDrop(GetManOwner(), src));
152 return true;
153
154 default:
155 return super.DropEntity(mode, owner, item);
156 }
157 }
158 }
159
160 Error("No inventory location");
161 return false;
162 }
163
164 bool ThrowEntity(EntityAI item, vector dir, float force)
165 {
166 if (g_Game.IsServer() && g_Game.IsMultiplayer())
167 return false;
168
169 DayZPlayer player = DayZPlayer.Cast(item.GetHierarchyRootPlayer());
170 InventoryMode invMode = InventoryMode.PREDICTIVE;
171
172 if (player.NeedInventoryJunctureFromServer(item, item.GetHierarchyParent(), null))
173 invMode = InventoryMode.JUNCTURE;
174
176 if (item)
177 {
178 GameInventory itemInventory = item.GetInventory();
179 if (itemInventory && itemInventory.GetCurrentInventoryLocation(src))
180 {
181 switch (src.GetType())
182 {
183 case InventoryLocationType.HANDS:
184 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ThrowEntity item=" + item);
185 HandEventThrow throwEvent = new HandEventThrow(GetManOwner(), src);
186 throwEvent.SetForce(dir * force);
187 HandEvent(invMode, throwEvent);
188 return true;
189
190 default:
191 DropEntity(invMode, player, item);
192 return true;
193 }
194 }
195 }
196 Error("No inventory location");
197 return false;
198 }
199
201 {
202 if (src.GetType() == InventoryLocationType.HANDS)
203 {
204 Man man_src = Man.Cast(src.GetParent());
205 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HI::RedirectToHandEvent - source location == HANDS, player has to handle this");
206
207 EntityAI item = src.GetItem();
208
209 int r_index = FindUserReservedLocationIndex(item);
210
211 if (r_index >= 0)
212 {
214 GetUserReservedLocation(r_index,r_il);
215
217 int r_type = r_il.GetType();
218 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
219 {
220 r_il.GetParent().GetOnReleaseLock().Invoke(item);
221 }
222 else if (r_type == InventoryLocationType.ATTACHMENT)
223 {
224 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(item, r_il.GetSlot());
225 }
226 }
227
228 man_src.GetHumanInventory().HandEvent(mode, new HandEventMoveTo(man_src, src, dst));
229 return true;
230 }
231
232 if (dst.GetType() == InventoryLocationType.HANDS)
233 {
234 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HI::RedirectToHandEvent - dst location == HANDS, player has to handle this");
235
236 Man man_dst = Man.Cast(dst.GetParent());
237 man_dst.GetHumanInventory().HandEvent(mode, new HandEventTake(man_dst, src));
238 return true;
239 }
240 return false;
241 }
242
243 override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
244 {
245 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] Take2Dst(" + typename.EnumToString(InventoryMode, mode) + ") src=" + InventoryLocation.DumpToStringNullSafe(src) + " dst=" + InventoryLocation.DumpToStringNullSafe(dst));
246
247 if (GetManOwner().IsAlive() && RedirectToHandEvent(mode, src, dst))
248 return true;
249
250 return super.TakeToDst(mode, src, dst);
251 }
252
253 //[Obsolete("1.30: Use TakeEntityToTargetInventory instead")]
255 {
257 if (item.GetInventory().GetCurrentInventoryLocation(src))
258 {
260 if (FindFreeLocationFor(item, flags, dst))
261 {
262 if (RedirectToHandEvent(mode, src, dst))
263 return true;
264
265 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
266 return super.TakeEntityToInventory(mode, flags, item);
267 }
268 else
269 return false; // no room
270 }
271 Error("HumanInventory::TakeEntityToInventory: No inventory location");
272 return false;
273 }
274
275 override bool SwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
276 {
277 InventoryLocation src1, src2, dst1, dst2;
278 if (GameInventory.MakeSrcAndDstForSwap(item1, item2, src1, src2, dst1, dst2))
279 {
280 bool handled = false;
281 switch (src1.GetType())
282 {
283 case InventoryLocationType.HANDS:
285 InventoryLocation fswap_dst2 = new InventoryLocation;
286 if ( SwappingToPreviousLocation(item1, item2, fswap_dst2) )
287 {
288 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Swap HandEventForceSwap(" + typename.EnumToString(InventoryMode, mode) + ") IH=src1=" + InventoryLocation.DumpToStringNullSafe(src1) + " src2=" + InventoryLocation.DumpToStringNullSafe(src2));
289 HandEvent(mode, new HandEventForceSwap(GetManOwner(), src1, src2, dst1, fswap_dst2));
290 }
291 else
292 {
293 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Swap HandEventSwap(" + typename.EnumToString(InventoryMode, mode) + ") src1=" + InventoryLocation.DumpToStringNullSafe(src1) + "src2=" + InventoryLocation.DumpToStringNullSafe(src2));
294 HandEvent(mode, new HandEventSwap(GetManOwner(), src1, src2, dst1, dst2));
295 }
296 handled = true;
297 break;
298 }
299
300 switch (src2.GetType())
301 {
302 case InventoryLocationType.HANDS:
303 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Swap HandEventSwap2(" + typename.EnumToString(InventoryMode, mode) + ") src1=" + InventoryLocation.DumpToStringNullSafe(src1) + " IH=src2=" + InventoryLocation.DumpToStringNullSafe(src2));
304 HandEvent(mode, new HandEventSwap(GetManOwner(), src2, src1, dst2, dst1));
305 handled = true;
306 break;
307 }
308
309 if (!handled)
310 return super.SwapEntities(mode, item1, item2);
311
312 return true;
313 }
314
315 Error("HumanInventory::SwapEntities: cannot create src1, src2, dst1, dst2");
316 return false;
317 }
318
319 override bool ForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
320 {
321 InventoryLocation src1, src2, dst1;
322 if (GameInventory.MakeSrcAndDstForForceSwap(item1, item2, src1, src2, dst1, item2_dst))
323 {
324 GameInventory manOwnerInventory = GetManOwner().GetInventory();
325
326 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::FSwap(" + typename.EnumToString(InventoryMode, mode) + ") dst1=" + InventoryLocation.DumpToStringNullSafe(dst1)+ " dst2=" + InventoryLocation.DumpToStringNullSafe(item2_dst));
327 bool handled = false;
328 switch (src1.GetType())
329 {
330 case InventoryLocationType.HANDS:
331 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::FSwap-HND@1(" + typename.EnumToString(InventoryMode, mode) + ") src1=" + InventoryLocation.DumpToStringNullSafe(src1) + " src2=" + InventoryLocation.DumpToStringNullSafe(src2) + " dst1=" + InventoryLocation.DumpToStringNullSafe(dst1) + " item2_dst=" + InventoryLocation.DumpToStringNullSafe(item2_dst));
332 HandEventBase e = new HandEventForceSwap(GetManOwner(), src1, src2, dst1, item2_dst);
334 HandEvent(mode, e);
335 handled = true;
336 break;
337
338 }
339
340 switch (src2.GetType())
341 {
342 case InventoryLocationType.HANDS:
344 InventoryLocation fswap_dst2 = new InventoryLocation;
345 if ( SwappingToPreviousLocation(item2, item1, fswap_dst2))
346 {
347 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::FSwap-PREV(" + typename.EnumToString(InventoryMode, mode) + ") src1=" + InventoryLocation.DumpToStringNullSafe(src1) + " src2=" + InventoryLocation.DumpToStringNullSafe(src2) + " dst1=" + InventoryLocation.DumpToStringNullSafe(dst1) + " fswap_dst2=" + InventoryLocation.DumpToStringNullSafe(fswap_dst2));
348 HandEvent(mode, new HandEventForceSwap(GetManOwner(), src1, src2, dst1, fswap_dst2));
349 }
350 else
351 {
352 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::FSwap-HND@2(" + typename.EnumToString(InventoryMode, mode) + ") src1=" + InventoryLocation.DumpToStringNullSafe(src1) + " src2=" + InventoryLocation.DumpToStringNullSafe(src2) + " dst1=" + InventoryLocation.DumpToStringNullSafe(dst1) + " item2_dst=" + InventoryLocation.DumpToStringNullSafe(item2_dst));
353 HandEvent(mode, new HandEventForceSwap(GetManOwner(), src1, src2, dst1, item2_dst));
354 }
355
356 handled = true;
357 break;
358 }
359
360 bool returnValue = true;
361
362 if (!handled)
363 returnValue = super.ForceSwapEntities(mode, item1, item2, item2_dst);
364
365 return returnValue;
366 }
367
368 Error("HumanInventory::ForceSwapEntities: No inventory location");
369 return false;
370 }
371
372 override bool LocalDestroyEntity(notnull EntityAI item)
373 {
375 if (item.GetInventory().GetCurrentInventoryLocation(src))
376 {
377 switch (src.GetType())
378 {
379 case InventoryLocationType.HANDS:
380 if (GetInventoryOwner().IsAlive())
381 {
382 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::LocalDestroy inv item=" + item);
383 HandEvent(InventoryMode.LOCAL, new HandEventDestroy(GetManOwner(), src));
384 return true;
385 }
386
387 return super.LocalDestroyEntity(item);
388
389 default:
390 return super.LocalDestroyEntity(item);
391 }
392 }
393
394 Error("LocalDestroyEntity: No inventory location");
395 return false;
396 }
397
399 {
400 EntityAI itemInHands = GetEntityInHands();
401 if (itemInHands == lambda.m_OldItem)
402 return ReplaceItemInHandsWithNew(mode, lambda);
403
404 return super.ReplaceItemWithNew(mode, lambda);
405 }
406
408 {
409 HandEventBase heb = new HandEventDestroyElsewhereAndReplaceWithNewInHands(GetManOwner(), null, lambda);
411 }
412
414 {
415 if (GetEntityInHands())
416 {
417 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl Item in hands, event=" + e.DumpToString());
418 return false;
419 }
420
421 InventoryLocation dst = e.GetDst();
422 if (dst)
423 {
424 switch (dst.GetType())
425 {
426 case InventoryLocationType.HANDS:
427 if (GetInventoryOwner().IsAlive())
428 {
429 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl event=" + e);
430 HandEvent(mode, e);
431 return true;
432 }
433
434 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
435 Error("HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl TODO"); // replace-with-new in corpse's hands, not implemented
436 return false;
437
438 default:
439 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl src has to be hands");
440 return false;
441 }
442 }
443
444 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl no dst in event, event=" + e.DumpToString());
445 return false;
446 }
447
449 {
450 EntityAI itemInHands = GetEntityInHands();
452 if (itemInHands && itemInHands.GetInventory().GetCurrentInventoryLocation(src))
453 {
454 switch (src.GetType())
455 {
456 case InventoryLocationType.HANDS:
457 if ((mode != InventoryMode.SERVER) && GetInventoryOwner().IsAlive())
458 {
459 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl event=" + e);
460 HandEvent(mode, e);
461 return true;
462 }
463
464 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
465 HandEvent(mode, e);
466 return true;
467
468 default:
469 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl src has to be hands");
470 return false;
471 }
472 }
473
474 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl No item in hands, event=" + e.DumpToString());
475 return false;
476 }
477
483
485 {
486 HandEventBase heb = new HandEventDestroyAndReplaceWithNewElsewhere(GetManOwner(), null, lambda);
487 return ReplaceItemInHandsWithNewImpl(mode, heb);
488 }
489
491 {
492 bool SwapToPrevious = true;
495 dst = new InventoryLocation();
496 GameInventory item1Inventory = item1.GetInventory();
497 if (item1Inventory.GetCurrentInventoryLocation(src1) && item2.GetInventory().GetCurrentInventoryLocation(src2))
498 {
499 if (item1.m_OldLocation && item1.m_OldLocation.IsValid() && !item1.m_OldLocation.CollidesWith(src2) && item1.m_OldLocation.GetParent() && item1.m_OldLocation.GetParent().GetHierarchyRootPlayer())
500 {
501 dst.Copy(item1.m_OldLocation);
502
503 if (src2.GetType() == InventoryLocationType.ATTACHMENT) //item2 is currently attached somewhere
504 {
505 int count = item1Inventory.GetSlotIdCount();
506 for (int i = 0; i < count; ++i)
507 {
508 int slotID = item1Inventory.GetSlotId(i);
509 if (src2.GetSlot() == slotID) //can be attached into the same slot. And will be.
510 return false;
511 }
512 }
513
514 if (!item1.m_OldLocation.GetParent().GetInventory().LocationCanAddEntity(item1.m_OldLocation))
515 SwapToPrevious = false;
516
517 if (CanSwapEntitiesEx(item1,item2))
518 SwapToPrevious = false;
519
520 if (SwapToPrevious)
521 return true;
522 }
523 }
524
525 return false;
526 }
527
529
530 void Update(float delta_time)
531 {
534 {
537 ctx.Write(InventoryCommandType.USER_RESERVATION_CANCEL);
539 ctx.Send();
540
542
545 EntityAI item = il.GetItem();
546 item.GetOnReleaseLock().Invoke(item);
548 }
549 }
550
552 {
553 validation.m_Result = InventoryValidationResult.SUCCESS;
554
555 int index = -1;
556 if (!ctx.Read(index))
557 {
559 return true;
560 }
561
563 //m_UserReservationToClear = index;
564
565 return true;
566 }
567
569 {
570 int index = -1;
571 if (!ctx.Read(index))
572 {
573 return false;
574 }
575
577 return true;
578 }
579
581 {
582 return true;
583 }
584
585
586 bool PostDeferredForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
587 {
588 return true;
589 }
590
591 bool OnInventoryCheck(int userDataType, ParamsReadContext ctx)
592 {
593 return false;
594 }
595}
InventoryCommandType
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
InventoryValidationResult
const int INPUT_UDT_INVENTORY
DayZGame g_Game
Определения DayZGame.c:4074
void hndDebugPrint(string s)
Определения HandFSM.c:1
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:18
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
Определения DayZPlayerImplement.c:87
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
static bool MakeSrcAndDstForSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, out InventoryLocation dst2)
helper function for swap
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static bool MakeSrcAndDstForForceSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, notnull InventoryLocation dst2)
helper function for ForceSwap
proto native EntityAI GetInventoryOwner()
Engine native functions.
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.
script counterpart to engine's class Inventory
override InventoryLocation GetDst()
Определения Hand_Events.c:215
override bool ReserveInventory()
Определения Hand_Events.c:705
override string DumpToString()
Определения Hand_Events.c:333
Abstracted event, not to be used, only inherited.
Определения Hand_Events.c:212
Определения Hand_Events.c:732
represent hand state base
Определения HandAnimatedForceSwapping.c:4
bool ExecuteUserReservationCancelRemote(inout Serializer ctx)
Определения HumanInventory.c:568
override bool ReplaceItemWithNew(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
Определения HumanInventory.c:398
proto native void SetUserReservedLocation(notnull EntityAI eai, notnull InventoryLocation dst)
int m_syncClearUserReservationindex
Определения HumanInventory.c:11
void ClearUserReservedLocationAtIndexSynced(int index)
Определения HumanInventory.c:85
Man GetManOwner()
Определения HumanInventory.c:102
proto native bool TestAddEntityInHands(EntityAI e, bool do_resevation_check, bool do_item_check, bool do_lock_check, bool do_occupancy_test, bool do_script_check)
bool ProcessHandEvent(HandEventBase e)
proto native void ClearUserReservedLocationForContainer(notnull EntityAI eai)
proto native int GetUserReservedLocationCount()
bool OnInventoryCheck(int userDataType, ParamsReadContext ctx)
Определения HumanInventory.c:591
proto native int FindCollidingUserReservedLocationIndex(notnull EntityAI e, notnull InventoryLocation dst)
bool HandEvent(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:134
proto native EntityAI CreateInHands(string typeName)
creates new entity in hands
proto native int FindFirstUserReservedLocationIndexForContainer(notnull EntityAI e)
override EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
Определения HumanInventory.c:65
void ClearUserReservedLocationSynced(notnull EntityAI eai)
Определения HumanInventory.c:73
void OnHandsEnteredStableState(HandStateBase src, HandStateBase dst)
void OnEntityInHandsDestroyed(InventoryLocation src)
Определения HumanInventory.c:126
bool ReplaceItemInHandsWithNewElsewhere(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
Определения HumanInventory.c:484
proto native bool CanOpenInventory()
bool PostDeferredForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
Определения HumanInventory.c:586
proto native EntityAI GetEntityInHands()
void OnHandsExitedStableState(HandStateBase src, HandStateBase dst)
bool RedirectToHandEvent(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:200
bool ReplaceItemElsewhereWithNewInHands(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
Определения HumanInventory.c:407
bool HasEntityInHands(EntityAI e)
Определения HumanInventory.c:107
proto native void ClearUserReservedLocation(notnull EntityAI eai)
void HandleInventoryManipulation()
override bool TakeEntityToInventory(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
Определения HumanInventory.c:254
proto native int FindUserReservedLocationIndex(notnull EntityAI e)
void OnHandsStateChanged(HandStateBase src, HandStateBase dst)
override bool LocalDestroyEntity(notnull EntityAI item)
Определения HumanInventory.c:372
override bool DropEntity(InventoryMode mode, EntityAI owner, notnull EntityAI item)
Определения HumanInventory.c:139
proto native bool CanAddEntityInHands(EntityAI e)
alternative for TestAddEntityInHands(e, true, true, true);
bool ValidateUserReservationCancel(inout Serializer ctx, InventoryValidation validation)
Определения HumanInventory.c:551
bool ReplaceItemInHandsWithNewImpl(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:448
proto native void GetUserReservedLocation(int index, out notnull InventoryLocation dst)
bool ReplaceItemInHandsWithNew(InventoryMode mode, ReplaceItemWithNewLambdaBase lambda)
Определения HumanInventory.c:478
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:243
proto native bool ClearUserReservedLocationAtIndex(int index)
override bool ForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
Определения HumanInventory.c:319
bool SwappingToPreviousLocation(EntityAI item1, EntityAI item2, out InventoryLocation dst)
Определения HumanInventory.c:490
override bool SwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
Определения HumanInventory.c:275
bool ReplaceItemInElsewhereWithNewinHandsImpl(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:413
void OnEntityInHandsCreated(InventoryLocation src)
Определения HumanInventory.c:118
proto native bool GetDebugFlag()
bool ThrowEntity(EntityAI item, vector dir, float force)
Определения HumanInventory.c:164
void Update(float delta_time)
Определения HumanInventory.c:530
proto native bool CanRemoveEntityInHands()
bool PostDeferredEventTakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:580
inventory for plain man/human
Определения HumanInventory.c:10
proto native EntityAI GetParent()
returns parent of current inventory location
static string DumpToStringNullSafe(InventoryLocation loc)
Определения InventoryLocation.c:233
proto native int GetSlot()
returns slot id if current type is Attachment
proto native InventoryLocation Copy(notnull InventoryLocation rhs)
copies location data to another location
proto native int GetType()
returns type of InventoryLocation
proto native EntityAI GetItem()
returns item of current inventory location
InventoryLocation.
Определения InventoryLocation.c:30
InventoryValidationResult m_Result
static bool IsInventoryHFSMLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:779
base class for transformation operations (creating one item from another)
Определения ReplaceItemWithNewLambdaBase.c:5
proto native void Send()
proto static native bool CanStoreInputUserData()
Returns true when the channel is free, AND the InputBuffer is NOT full (same as '!...
Определения gameplay.c:121
proto bool Write(void value_out)
Serialization general interface. Serializer API works with:
Определения Serializer.c:56
Определения EnConvert.c:119
Serializer ParamsReadContext
Определения gameplay.c:15
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
proto native owned string GetName()
Test name getter. Strictly for UI porposes!
Определения SyncedValue.c:119