DayZ 1.24
Loading...
Searching...
No Matches
TentBase.c
Go to the documentation of this file.
1class TentBase extends ItemBase
2{
3 const int OPENING_0 = 1;
4 const int OPENING_1 = 2;
5 const int OPENING_2 = 4;
6 const int OPENING_3 = 8;
7 const int OPENING_4 = 16;
8 const int OPENING_5 = 32;
9 const int OPENING_6 = 64;
10 const int OPENING_7 = 128;
11 const int OPENING_8 = 256;
12 const int OPENING_9 = 512;
13 const int OPENING_10 = 1024;
14 const int OPENING_11 = 2048;
15 const int OPENING_12 = 4096;
16 const int OPENING_13 = 8192;
17 const int OPENING_14 = 16384;
18 const int OPENING_15 = 32768;
19
20 static const int PACKED = 0;
21 static const int PITCHED = 1;
22 const float MAX_PLACEMENT_HEIGHT_DIFF = 1.5;
23
24 protected int m_State;
25 protected int m_StateLocal = -1;
26 protected bool m_IsEntrance;
27 protected bool m_IsWindow;
28 protected bool m_IsToggle;
29 protected bool m_IsBeingPacked = false;
30 protected int m_OpeningMask = 0;
31 protected int m_OpeningMaskLocal = -1;
32
38 protected CamoNet m_CamoNet;
39 protected vector m_HalfExtents; // The Y value contains a heightoffset and not the halfextent !!!
40
41 void TentBase()
42 {
43 m_ToggleAnimations = new map<ref ToggleAnimations, bool>;
44 m_ShowAnimationsWhenPitched = new array<string>;
45 m_ShowAnimationsWhenPacked = new array<string>;
46
48 RegisterNetSyncVariableInt("m_State");
49 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
50 RegisterNetSyncVariableBool("m_IsEntrance");
51 RegisterNetSyncVariableBool("m_IsWindow");
52 RegisterNetSyncVariableBool("m_IsToggle");
53 RegisterNetSyncVariableBool("m_IsDeploySound");
54 RegisterNetSyncVariableInt("m_OpeningMask");
55 RegisterNetSyncVariableBool("m_IsBeingPacked");
56
57 ProcessInvulnerabilityCheck(GetInvulnerabilityTypeString());
58 }
59
60 void ~TentBase()
61 {
62 if (GetGame())
63 DestroyClutterCutter();
64
66 }
67
69 {
70 return "disableContainerDamage";
71 }
72
73 override bool HasProxyParts()
74 {
75 return true;
76 }
77
79 override bool CanProxyObstructSelf()
80 {
81 return true;
82 }
83
84 override bool IsItemTent()
85 {
86 return true;
87 }
88
90 {
91 return false;
92 }
93
94 override int GetMeleeTargetType()
95 {
96 return EMeleeTargetType.NONALIGNABLE;
97 }
98
100 {
101 super.OnStoreSave(ctx);
102
103 ctx.Write(m_State);
104 ctx.Write(m_OpeningMask);
105 }
106
107 override bool OnStoreLoad(ParamsReadContext ctx, int version)
108 {
109 if (!super.OnStoreLoad(ctx, version))
110 return false;
111
112 ctx.Read(m_State);
113 if (version >= 110)
114 {
115 if (!ctx.Read(m_OpeningMask))
116 Print("ERROR: no opening mask found! Default openinng settings initialized.");
117 }
118
119 if (m_State == PITCHED)
120 {
121 TryPitch(true);
122
123 if (GetGame().IsServer())
124 {
126 {
128 m_ClutterCutter.SetOrientation(GetOrientation());
129 }
130
131 RefreshAttachements();
132 }
133 }
134 else
135 Pack(true);
136
137 return true;
138 }
139
140 override void RefreshPhysics()
141 {
142 super.RefreshPhysics();
143
144 if (m_State == PITCHED)
145 TryPitch(false, true);
146 else
147 Pack(false, true);
148 }
149
151 {
152 super.OnItemLocationChanged(old_owner, new_owner);
153
154 if (new_owner || old_owner)
155 {
156 if (GetInventory().CountInventory() == 1) // refuse to pack tent with anything inside
157 Pack(false);
158 }
159 }
160
162 {
163 super.OnVariablesSynchronized();
164
165 if (IsDeploySound())
167 else
168 {
169 if (m_State == PITCHED)
170 {
171 if (IsManipulatedEntrance() && IsSoundSynchRemote())
172 {
173 if (m_IsToggle)
174 SoundTentOpenPlay();
175 else
176 SoundTentClosePlay();
177 }
178 else if (IsManipulatedWindow() && IsSoundSynchRemote())
179 {
180 if (m_IsToggle)
181 SoundTentOpenWindowPlay();
182 else
183 SoundTentCloseWindowPlay();
184 }
185 }
186 }
187
190
193
194 if (m_State != m_StateLocal)
195 {
196 if (m_State == PACKED)
197 Pack(false);
198 else
199 TryPitch(false);
200
201 m_StateLocal = m_State;
202 }
203
204 if ((m_OpeningMaskLocal != m_OpeningMask)) //opening synchronization for physics recalculation
205 {
206 HandleOpeningsPhysics();
207 m_OpeningMaskLocal = m_OpeningMask;
208
209 if (m_State == PACKED)
210 {
211 Pack(false); //intentional
212 }
213 }
214 }
215
216 override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
217 {
218 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
219
221 return;
222
223 if (zone == "" && GetState() == PITCHED && newLevel == GameConstants.STATE_RUINED && GetGame().IsServer())
224 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
225
226 if (zone != "Body" && zone != "Inventory" && zone != "")
227 {
229 {
231 DamageSystem.GetComponentNamesFromDamageZone(this, zone, selections);
232 for (int j = 0; j < selections.Count(); j++)
233 {
234 if (selections.Get(j) != "")
235 {
236 RemoveProxyPhysics(selections.Get(j)); //To keep
237 //HideSelection(selections.Get(j)); //To change
239 }
240 }
241 }
243 {
244 if (GetState() == PITCHED)
245 TryPitch(true);
246 }
247 }
248 }
249
251 {
252 string cfg_path = "cfgVehicles " + GetType() + " AnimationSources";
253
254 if (GetGame().ConfigIsExisting(cfg_path))
255 {
256 int selections = GetGame().ConfigGetChildrenCount(cfg_path);
258
259 for (int i = 0; i < selections; i++)
260 {
261 string selection_name;
262 GetGame().ConfigGetChildName(cfg_path, i, selection_name);
263 if (hide_animations)
264 SetAnimationPhase(selection_name, 1);
265
267 proxy_selection_name.ToLower();
268 if (hide_physics)
269 RemoveProxyPhysics(proxy_selection_name);
270 }
271 }
272 }
273
275 {
276 return CanBeManipulated();
277 }
278
279 override bool CanPutIntoHands(EntityAI parent)
280 {
281 if (!super.CanPutIntoHands(parent))
282 return false;
283
284 return CanBeManipulated();
285 }
286
287 override bool CanPutInCargo(EntityAI parent)
288 {
289 if (!super.CanPutInCargo(parent))
290 return false;
291
292 return CanBeManipulated();
293 }
294
296 {
297 return CanBeManipulated();
298 }
299
301 {
302 return true;
303 }
304
306 {
307 int slot_id_camo;
308 int slot_id_xlights;
310
312 m_CamoNet = CamoNet.Cast(GetInventory().FindAttachment(slot_id_camo));
313
315 eai_xlights = GetInventory().FindAttachment(slot_id_xlights);
316
317 if (m_CamoNet)
318 {
320 //SetAnimationPhase("Camonet", 0);
321
322 if (!IsKindOf("MediumTent"))
323 AddProxyPhysics("camonet");
324 }
325
326 if (eai_xlights)
327 {
328 SetAnimationPhase("Xlights", 0);
329 SetAnimationPhase("Xlights_glass_r", 0);
330 SetAnimationPhase("Xlights_glass_g", 0);
331 SetAnimationPhase("Xlights_glass_b", 0);
332 SetAnimationPhase("Xlights_glass_y", 0);
333 }
334 }
335
336 override void EEItemAttached(EntityAI item, string slot_name)
337 {
338 super.EEItemAttached(item, slot_name);
339
340 if (item.IsKindOf("CamoNet"))
341 {
342 m_CamoNet = CamoNet.Cast(item);
344 //SetAnimationPhase("Camonet", 0);
345
346 if (!IsKindOf("MediumTent"))
347 AddProxyPhysics("camonet");
348 }
349
350 if (item.IsKindOf("XmasLights"))
351 {
352 SetAnimationPhase("Xlights", 0);
353 SetAnimationPhase("Xlights_glass_r", 0);
354 SetAnimationPhase("Xlights_glass_g", 0);
355 SetAnimationPhase("Xlights_glass_b", 0);
356 SetAnimationPhase("Xlights_glass_y", 0);
357
358 XmasLights xlights = XmasLights.Cast(item);
359 xlights.AttachToObject(this);
360 }
361 }
362
363 override void EEItemDetached(EntityAI item, string slot_name)
364 {
365 super.EEItemDetached(item, slot_name);
366
367 if (item.IsKindOf("CamoNet"))
368 {
369 m_CamoNet = null;
371 //SetAnimationPhase("Camonet", 1);
372
373 if (!IsKindOf("MediumTent"))
374 RemoveProxyPhysics("camonet");
375 }
376
377 if (item.IsKindOf("XmasLights"))
378 {
379 SetAnimationPhase("Xlights", 1);
380 SetAnimationPhase("Xlights_glass_r", 1);
381 SetAnimationPhase("Xlights_glass_g", 1);
382 SetAnimationPhase("Xlights_glass_b", 1);
383 SetAnimationPhase("Xlights_glass_y", 1);
384
385 XmasLights xlights = XmasLights.Cast(item);
386 xlights.DetachFromObject(this);
387 }
388 }
389
390 override int GetViewIndex()
391 {
392 if (MemoryPointExists("invView2"))
393 {
395 GetInventory().GetCurrentInventoryLocation(il);
396 InventoryLocationType type = il.GetType();
397
398 if (GetState() == PACKED)
399 {
400 switch (type)
401 {
402 case InventoryLocationType.ATTACHMENT:
403 return 1;
404 default:
405 return 0;
406 }
407 }
408 else
409 {
410 switch (type)
411 {
412 case InventoryLocationType.ATTACHMENT:
413 case InventoryLocationType.GROUND:
414 return 1;
415 default:
416 return 0;
417 }
418 }
419 }
420
421 return 0;
422 }
423
425 {
426 return m_State;
427 }
428
430 {
431 return m_StateLocal;
432 }
433
435 {
436 if (GetState() == PITCHED)
437 {
438 if (GetInventory().GetCargo().GetItemCount() == 0 && GetInventory().AttachmentCount() == 0)
439 return true;
440 }
441
442 return false;
443 }
444
446 {
447 if (GetState() == PACKED)
448 return true;
449 else
450 return false;
451 }
452
454 {
455 if (item.IsKindOf("CamoNet") && GetState() == PITCHED)
456 return true;
457
458 return false;
459 }
460
462 {
463 return false;
464 }
465
466 void Pack(bool update_navmesh, bool init = false)
467 {
468 HideAllAnimationsAndProxyPhysics();
469
470 m_State = PACKED;
471 m_IsEntrance = PACKED;
472 m_IsWindow = PACKED;
473 m_IsToggle = PACKED;
474
475 Refresh();
476
477 GetInventory().LockInventory(HIDE_INV_FROM_SCRIPT);
478
479 if (update_navmesh)
480 RegenerateNavmesh();
481
482 DestroyClutterCutter();
483
484 if (GetGame().IsServer() && !IsHologram())
485 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
486
487 SetSynchDirty();
488
489 if ((!GetGame().IsDedicatedServer()) && !init)
490 GetOnViewIndexChanged().Invoke();
491 }
492
493 void Pitch(bool update_navmesh, bool init = false)
494 {
495 HideAllAnimationsAndProxyPhysics();
496
497 m_State = PITCHED;
498 m_IsEntrance = PITCHED;
499 m_IsWindow = PITCHED;
500 m_IsToggle = PITCHED;
501
502 Refresh();
503
504 GetInventory().UnlockInventory(HIDE_INV_FROM_SCRIPT);
505
506 if (update_navmesh)
507 RegenerateNavmesh();
508
509 SetSynchDirty();
510
511 if ((!GetGame().IsDedicatedServer()) && !init)
512 GetOnViewIndexChanged().Invoke();
513 }
514
515 protected void TryPitch(bool update_navmesh, bool init = false)
516 {
517 if (GetHierarchyRootPlayer())
518 {
519 if (GetGame().IsDedicatedServer())
520 Pack(update_navmesh, init);
521
522 return;
523 }
524
525 Pitch(update_navmesh, init);
526 }
527
529 {
531 string animation_name;
532
533 if (GetState() == PITCHED)
534 {
535 for (int i = 0; i < m_ShowAnimationsWhenPitched.Count(); i++)
536 {
537 animation_name = m_ShowAnimationsWhenPitched.Get(i);
538
539 SetAnimationPhase(animation_name, 0);
540 }
541
542 HandleOpeningsVisuals();
543 }
544 else
545 {
546 for (int j = 0; j < m_ShowAnimationsWhenPacked.Count(); j++)
547 {
548 animation_name = m_ShowAnimationsWhenPacked.Get(j);
549
550 SetAnimationPhase(animation_name, 0);
551 }
552 }
553 }
554
556 {
558 string animation_name;
559
560 if (GetState() == PITCHED)
561 {
562 for (int i = 0; i < m_ShowAnimationsWhenPitched.Count(); i++)
563 {
564 animation_name = m_ShowAnimationsWhenPitched.Get(i);
565
567 proxy_selection_name.ToLower();
568 AddProxyPhysics(proxy_selection_name);
569 }
570
571 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(HandleOpeningsPhysics);
572 }
573 else
574 {
575 for (int j = 0; j < m_ShowAnimationsWhenPacked.Count(); j++)
576 {
577 animation_name = m_ShowAnimationsWhenPacked.Get(j);
578
580 proxy_selection_name.ToLower();
581 AddProxyPhysics(proxy_selection_name);
582 }
583 }
584 }
585
586 //refresh visual/physics state
587 void Refresh()
588 {
589 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).Call(UpdateVisuals);
591 }
592
593 bool CanToggleAnimations(string selection)
594 {
595 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
596 {
597 ToggleAnimations toggle = m_ToggleAnimations.GetKey(i);
598 string toggle_off = toggle.GetToggleOff();
599 toggle_off.ToLower();
600 string toggle_on = toggle.GetToggleOn();
601 toggle_on.ToLower();
602
603 if (toggle_off == selection || toggle_on == selection)
604 {
605 string zone;
606 DamageSystem.GetDamageZoneFromComponentName(this, selection, zone);
607 return GetHealthLevel(zone) < GameConstants.STATE_RUINED;
608 }
609 }
610
611 return false;
612 }
613
615 {
616 m_IsEntrance = false;
617 m_IsWindow = false;
618 m_IsToggle = false;
619 }
620
622 {
623 m_IsEntrance = true;
624 }
625
627 {
628 m_IsWindow = true;
629 }
630
632 {
633 return m_IsEntrance;
634 }
635
637 {
638 return m_IsWindow;
639 }
640
641 //used by user action
642 void ToggleAnimation(string selection)
643 {
644 if (m_State == PACKED)
645 return;
646
647 bool is_closed;
648 ResetToggle();
649
650 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
651 {
652 ToggleAnimations toggle = m_ToggleAnimations.GetKey(i);
653
654 string toggle_off = toggle.GetToggleOff();
655 toggle_off.ToLower();
656 string toggle_on = toggle.GetToggleOn();
657 toggle_on.ToLower();
658
659 if (toggle_off == selection || toggle_on == selection)
660 {
661 is_closed = m_OpeningMask & toggle.GetOpeningBit();
662 if (is_closed)
663 {
664 SetAnimationPhase(toggle.GetToggleOff(), 0);
665 AddProxyPhysics(toggle.GetToggleOff());
666 SetAnimationPhase(toggle.GetToggleOn(), 1);
667 RemoveProxyPhysics(toggle.GetToggleOn());
668 m_ToggleAnimations.Set(toggle, false);
669 m_IsToggle = true;
670 m_OpeningMask &= ~toggle.GetOpeningBit();
671
672 if (selection.Contains("window"))
673 ManipulateWindow();
674
675 if (selection.Contains("entrance") || selection.Contains("door"))
676 ManipulateEntrance();
677
679 }
680 else
681 {
682 SetAnimationPhase(toggle.GetToggleOff(), 1);
683 RemoveProxyPhysics(toggle.GetToggleOff());
684 SetAnimationPhase(toggle.GetToggleOn(), 0);
685 AddProxyPhysics(toggle.GetToggleOn());
686 m_ToggleAnimations.Set(toggle, true);
687 m_IsToggle = false;
688 m_OpeningMask |= toggle.GetOpeningBit();
689
690 if (selection.Contains("window"))
691 ManipulateWindow();
692
693 if (selection.Contains("entrance") || selection.Contains("door"))
694 ManipulateEntrance();
695
697 }
698 }
699 }
700 SetSynchDirty();
702 }
703
705 {
706 SetAnimationPhase("CamoNet", hide);
707 }
708
710
712
713 string GetSoundOpen() {};
714
715 string GetSoundClose() {};
716
718
720
722 {
724 sound.SetAutodestroy(true);
725 }
726
728 {
730 sound.SetAutodestroy(true);
731 }
732
734 {
736 sound.SetAutodestroy(true);
737 }
738
744
746 {
747 SetAffectPathgraph(true, false);
748
749 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, this);
750 }
751
753 string GetClutterCutter() {};
754
756 {
757 if (GetGame().IsMultiplayer() || GetGame().IsServer())
758 {
759 if (m_ClutterCutter)
760 GetGame().ObjectDelete(m_ClutterCutter);
761 }
762 }
763
764 //================================================================
765 // ADVANCED PLACEMENT
766 //================================================================
767
768 override bool IsDeployable()
769 {
770 return true;
771 }
772
773 override void OnPlacementComplete(Man player, vector position = "0 0 0", vector orientation = "0 0 0")
774 {
775 super.OnPlacementComplete(player, position, orientation);
776
777 if (GetGame().IsServer())
778 {
779 TryPitch(true);
780
781 SetIsDeploySound(true);
782 }
783 }
784
786 {
787 if (!GetGame().IsDedicatedServer())
788 {
789 if (!m_DeployLoopSound || !m_DeployLoopSound.IsSoundPlaying())
791 }
792 }
793
795 {
796 if (!GetGame().IsDedicatedServer())
797 {
798 m_DeployLoopSound.SetSoundFadeOut(0.5);
799 m_DeployLoopSound.SoundStop();
800 }
801 }
802
803 override void SetActions()
804 {
805 super.SetActions();
806
810 AddAction(ActionDeployObject);
811 }
812
814 {
815 bool is_closed;
816 bool is_ruined;
817 string zone;
818 string component;
820
821 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
822 {
823 toggle = m_ToggleAnimations.GetKey(i);
824 is_closed = m_OpeningMask & toggle.GetOpeningBit();
825 component = toggle.GetToggleOff(); //either one works
826 component.ToLower();
827 DamageSystem.GetDamageZoneFromComponentName(this, component, zone);
828 //is_ruined = (GetHealthLevel(zone) == GameConstants.STATE_RUINED);
829
830 if (is_closed)
831 {
832 SetAnimationPhase(toggle.GetToggleOff(), 1);
833 SetAnimationPhase(toggle.GetToggleOn(), is_ruined);
834 m_ToggleAnimations.Set(toggle, false);
835 }
836 else
837 {
838 SetAnimationPhase(toggle.GetToggleOn(), 1);
839 SetAnimationPhase(toggle.GetToggleOff(), is_ruined);
840 m_ToggleAnimations.Set(toggle, true);
841 }
842 //AnimateCamonetToggle(toggle);
843 }
844 }
845
847 {
848 bool is_closed;
849 bool is_ruined;
850 int hplevel;
851 string zone;
852 string component;
854
855 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
856 {
857 toggle = m_ToggleAnimations.GetKey(i);
858 is_closed = m_OpeningMask & toggle.GetOpeningBit();
859 component = toggle.GetToggleOff(); //either one works
860 component.ToLower();
861 DamageSystem.GetDamageZoneFromComponentName(this, component, zone);
862 is_ruined = (GetHealthLevel(zone) == GameConstants.STATE_RUINED);
863
864 //re-adding physics to avoid proxy physics stacking
865 RemoveProxyPhysics(toggle.GetToggleOff());
866 RemoveProxyPhysics(toggle.GetToggleOn());
867
868 if (!is_ruined && GetState() == PITCHED)
869 {
870 if (is_closed)
871 AddProxyPhysics(toggle.GetToggleOn());
872 else
873 AddProxyPhysics(toggle.GetToggleOff());
874 }
875 }
876 }
877
879 {
880 return 110;
881 }
882
884 {
885 if (GetHealthLevel() == GameConstants.STATE_RUINED || m_IsBeingPacked)
886 return false;
887
888 return super.CanReceiveItemIntoCargo(item);
889 }
890
892 {
893 if (!super.CanLoadItemIntoCargo(item))
894 return false;
895 if (GetHealthLevel() == GameConstants.STATE_RUINED)
896 return false;
897
898 return true;
899 }
900
902 {
903 if (GetHealthLevel() == GameConstants.STATE_RUINED)
904 return false;
905
906 return super.CanReceiveAttachment(attachment, slotId);
907 }
908
910 {
911 if (GetHealthLevel() == GameConstants.STATE_RUINED)
912 return false;
913
914 return super.CanLoadAttachment(attachment);
915 }
916
917 override bool CanBePlaced(Man player, vector position)
918 {
919 vector playerpos = player.GetPosition();
920 float delta1 = playerpos[1] - position[1];
921
922 if (delta1 > MAX_PLACEMENT_HEIGHT_DIFF || delta1 < -MAX_PLACEMENT_HEIGHT_DIFF)
923 return false;
924 return true;
925 }
926
928 {
929 m_IsBeingPacked = isBeingPacked;
930 SetSynchDirty();
931 }
932};
eBleedingSourceType GetType()
ActionPackTentCB ActionContinuousBaseCB ActionPackTent()
void AddAction(typename actionName)
vector GetOrientation()
override string GetInvulnerabilityTypeString()
const int ECE_PLACE_ON_SURFACE
void UpdateVisuals()
void UpdatePhysics()
Container_Base m_HalfExtents
EMeleeTargetType
Object m_ClutterCutter
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void SetIsDeploySound(bool is_deploy_sound)
Definition ItemBase.c:8972
bool CanPlayDeployLoopSound()
Definition ItemBase.c:9039
void SoundSynchRemote()
Definition ItemBase.c:8945
override bool IsHologram()
Definition ItemBase.c:5641
void PlayDeploySound()
Definition ItemBase.c:9003
bool IsDeploySound()
Definition ItemBase.c:8977
bool m_FixDamageSystemInit
Definition ItemBase.c:4740
bool IsSoundSynchRemote()
Definition ItemBase.c:8952
enum MagnumStableStateID init
void Refresh()
bool m_State
void PlayDeployLoopSound()
void StopDeployLoopSound()
ref EffectSound m_DeployLoopSound
Definition TrapBase.c:47
class JsonUndergroundAreaTriggerData GetPosition
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
InventoryLocation.
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
override int GetMeleeTargetType()
Definition TentBase.c:94
override void EEItemAttached(EntityAI item, string slot_name)
Definition TentBase.c:336
bool CanToggleAnimations(string selection)
Definition TentBase.c:593
bool IsManipulatedWindow()
Definition TentBase.c:636
bool CanAttach(ItemBase item)
Definition TentBase.c:453
void UpdateVisuals()
Definition TentBase.c:528
void HandleOpeningsPhysics()
Definition TentBase.c:846
void SoundTentClosePlay()
Definition TentBase.c:727
override bool CanReceiveItemIntoCargo(EntityAI item)
Definition TentBase.c:883
override bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition TentBase.c:107
void HandleOpeningsVisuals()
Definition TentBase.c:813
bool IsManipulatedEntrance()
Definition TentBase.c:631
int GetStateLocal()
Definition TentBase.c:429
void SoundTentOpenPlay()
Definition TentBase.c:721
override int GetViewIndex()
Definition TentBase.c:390
override bool CanProxyObstructSelf()
prevents showing cargo when outside the tent geometry
Definition TentBase.c:79
override bool HasProxyParts()
Definition TentBase.c:73
override bool CanBeRepairedByCrafting()
Definition TentBase.c:89
bool ConditionOutOfHands(EntityAI player)
Definition TentBase.c:295
void Refresh()
Definition TentBase.c:587
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Definition TentBase.c:150
string GetSoundCloseWindow()
Definition TentBase.c:719
override bool CanPutIntoHands(EntityAI parent)
Definition TentBase.c:279
void PlayDeployLoopSound()
Definition TentBase.c:785
override bool IsItemTent()
Definition TentBase.c:84
override void SetActions()
Definition TentBase.c:803
void HideAllAnimationsAndProxyPhysics(bool hide_animations=true, bool hide_physics=true)
Definition TentBase.c:250
bool CanBeManipulated()
Definition TentBase.c:445
override string GetInvulnerabilityTypeString()
Definition TentBase.c:68
override bool CanLoadAttachment(EntityAI attachment)
Definition TentBase.c:909
bool m_IsEntrance
Definition TentBase.c:26
string GetClutterCutter()
Definition TentBase.c:753
override int GetDamageSystemVersionChange()
Definition TentBase.c:878
ref array< string > m_ShowAnimationsWhenPacked
Definition TentBase.c:35
string GetSoundOpenWindow()
Definition TentBase.c:717
CamoNet m_CamoNet
Definition TentBase.c:38
string GetSoundOpen()
Definition TentBase.c:713
void Pack(bool update_navmesh, bool init=false)
Definition TentBase.c:466
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
Definition TentBase.c:216
override void OnStoreSave(ParamsWriteContext ctx)
Definition TentBase.c:99
bool m_IsToggle
Definition TentBase.c:28
bool HasClutterCutter()
Definition TentBase.c:752
void Pitch(bool update_navmesh, bool init=false)
Definition TentBase.c:493
vector m_HalfExtents
Definition TentBase.c:39
void SoundTentOpenWindowPlay()
Definition TentBase.c:733
void ResetToggle()
Definition TentBase.c:614
override bool CanLoadItemIntoCargo(EntityAI item)
Definition TentBase.c:891
void ManipulateEntrance()
Definition TentBase.c:621
int m_State
Definition TentBase.c:24
void HandleCamoNetAttachment(bool hide)
Definition TentBase.c:704
override void EEItemDetached(EntityAI item, string slot_name)
Definition TentBase.c:363
void AnimateCamonetToggle(ToggleAnimations toggle)
Definition TentBase.c:709
override void OnVariablesSynchronized()
Definition TentBase.c:161
override void RefreshPhysics()
Definition TentBase.c:140
void SetIsBeingPacked(bool isBeingPacked)
Definition TentBase.c:927
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
Definition TentBase.c:901
override bool CanPutInCargo(EntityAI parent)
Definition TentBase.c:287
void RefreshAttachements()
Definition TentBase.c:305
ref array< string > m_ShowAnimationsWhenPitched
Definition TentBase.c:34
void UpdatePhysics()
Definition TentBase.c:555
void TryPitch(bool update_navmesh, bool init=false)
Definition TentBase.c:515
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
Definition TentBase.c:773
string GetSoundClose()
Definition TentBase.c:715
void SoundTentCloseWindowPlay()
Definition TentBase.c:739
override bool IsIgnoredByConstruction()
Definition TentBase.c:461
void ManipulateWindow()
Definition TentBase.c:626
Object m_ClutterCutter
Definition TentBase.c:36
ref map< ref ToggleAnimations, bool > m_ToggleAnimations
Definition TentBase.c:33
void TentBase()
Definition TentBase.c:41
bool CanBePacked()
Definition TentBase.c:434
void StopDeployLoopSound()
Definition TentBase.c:794
bool ConditionIntoInventory(EntityAI player)
Definition TentBase.c:274
bool m_IsWindow
Definition TentBase.c:27
void RegenerateNavmesh()
Definition TentBase.c:745
override bool CanBePlaced(Man player, vector position)
Definition TentBase.c:917
void AnimateCamonetByOpeningSelection(string opening_selection)
Definition TentBase.c:711
override bool CanBeRepairedToPristine()
Definition TentBase.c:300
override bool IsDeployable()
Definition TentBase.c:768
void DestroyClutterCutter()
Definition TentBase.c:755
void ToggleAnimation(string selection)
Definition TentBase.c:642
void ~TentBase()
Definition TentBase.c:60
int GetState()
Definition TentBase.c:424
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
override string GetSoundClose()
Definition CarTent.c:31
override void AnimateCamonetToggle(ToggleAnimations toggle)
Definition PartyTent.c:125
override string GetClutterCutter()
Definition MediumTent.c:41
override string GetSoundOpen()
Definition CarTent.c:26
override string GetSoundCloseWindow()
Definition PartyTent.c:41
override void AnimateCamonetByOpeningSelection(string opening_selection)
Definition PartyTent.c:139
override void HandleCamoNetAttachment(bool hide)
Definition PartyTent.c:86
override bool HasClutterCutter()
Definition CarTent.c:36
override string GetSoundOpenWindow()
Definition PartyTent.c:36
override string GetLoopDeploySoundset()
Definition CarTent.c:55
static const vector Zero
Definition EnConvert.c:110
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
const int STATE_RUINED
Definition constants.c:757
bool Contains(string sample)
Returns true if sample is substring of string.
Definition EnString.c:286
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8
proto native int GetState()
returns one of STATE_...