DayZ 1.24
Loading...
Searching...
No Matches
TentBase Class Reference
Collaboration diagram for TentBase:
[legend]

Private Member Functions

void CarTent ()
 
override void EEInit ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override string GetSoundOpen ()
 
override string GetSoundClose ()
 
override bool HasClutterCutter ()
 
override bool IsDeployable ()
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
void MediumTent ()
 
override void EEInit ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override string GetSoundOpen ()
 
override string GetSoundClose ()
 
override bool HasClutterCutter ()
 
override string GetClutterCutter ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
void PartyTent ()
 
override string GetSoundOpen ()
 
override string GetSoundClose ()
 
override string GetSoundOpenWindow ()
 
override string GetSoundCloseWindow ()
 
override bool HasClutterCutter ()
 
override string GetClutterCutter ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override void HandleCamoNetAttachment (bool hide)
 
override void AnimateCamonetToggle (ToggleAnimations toggle)
 
override void AnimateCamonetByOpeningSelection (string opening_selection)
 
void ShelterBase ()
 
override void SetActions ()
 
override void EEInit ()
 
void Deconstruct ()
 
string GetMaterialPath ()
 
string GetShelterVariant ()
 
void SpawnKit ()
 
override bool IsPlayerInside (PlayerBase player, string selection)
 

Static Private Attributes

static const string SITE_OBJECT_TYPE = "ShelterSite"
 

Detailed Description

Definition at line 1 of file CarTent.c.

Member Function Documentation

◆ AnimateCamonetByOpeningSelection()

override void TentBase::AnimateCamonetByOpeningSelection ( string opening_selection)
inlineprivate

Definition at line 139 of file PartyTent.c.

140 {
141 string camo = "Camo" + opening_selection.Substring(4, 2);
142 SetAnimationPhase(camo, 1);
143 }

Referenced by ItemBase::EEHealthLevelChanged().

◆ AnimateCamonetToggle()

override void TentBase::AnimateCamonetToggle ( ToggleAnimations toggle)
inlineprivate

Definition at line 125 of file PartyTent.c.

126 {
127 if (!m_CamoNet)
128 return;
129
130 bool is_closed = m_OpeningMask & toggle.GetOpeningBit();
131 string camo_off = "Camo" + toggle.GetToggleOff().Substring(4, 2);
132 string camo_on = "Camo" + toggle.GetToggleOn().Substring(4, 2);
133
134 SetAnimationPhase(camo_off, is_closed);
135 SetAnimationPhase(camo_on, !is_closed);
136 }

Referenced by ItemBase::ToggleAnimation().

◆ CarTent()

void TentBase::CarTent ( )
inlineprivate

Definition at line 3 of file CarTent.c.

4 {
5 m_ToggleAnimations.Insert(new ToggleAnimations("EntranceO", "EntranceC", OPENING_0), 0);
6
7 m_ShowAnimationsWhenPitched.Insert("Body");
8 //m_ShowAnimationsWhenPitched.Insert( "EntranceO" );
9 m_ShowAnimationsWhenPitched.Insert("Pack");
10
11 m_ShowAnimationsWhenPacked.Insert("Inventory");
12
13 m_HalfExtents = Vector(1.8, 0.33, 3.4);
14 }
Container_Base m_HalfExtents
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References m_HalfExtents, and Vector().

◆ Deconstruct()

void TentBase::Deconstruct ( )
inlineprivate

Definition at line 32 of file Shelter.c.

33 {
35 SpawnKit();
36 Delete();
37 }
static void SpawnConstructionMaterialPiles(notnull EntityAI entity, Man player, string cfg_path, string main_part_name, string damagezone_name="", bool is_base=false)
spawns material from any construction; 'player' parameter optional
string GetMaterialPath()
Definition Shelter.c:39
void SpawnKit()
Definition Shelter.c:49
string GetShelterVariant()
Definition Shelter.c:44

References GetMaterialPath(), ShelterBase::GetShelterVariant(), StaticConstructionMethods::SpawnConstructionMaterialPiles(), and SpawnKit().

◆ EEInit() [1/3]

override void TentBase::EEInit ( )
inlineprivate

Definition at line 16 of file CarTent.c.

17 {
18 super.EEInit();
19 }

◆ EEInit() [2/3]

override void TentBase::EEInit ( )
inlineprivate

Definition at line 16 of file MediumTent.c.

17 {
18 super.EEInit();
19 }

◆ EEInit() [3/3]

override void TentBase::EEInit ( )
inlineprivate

Definition at line 25 of file Shelter.c.

26 {
27 super.EEInit();
28
29 TryPitch(true, true);
30 }

◆ GetClutterCutter() [1/2]

override string TentBase::GetClutterCutter ( )
inlineprivate

Definition at line 41 of file MediumTent.c.

42 {
43 return "MediumTentClutterCutter";
44 }

Referenced by ItemBase::OnStoreLoad().

◆ GetClutterCutter() [2/2]

override string TentBase::GetClutterCutter ( )
inlineprivate

Definition at line 51 of file PartyTent.c.

52 {
53 return "LargeTentClutterCutter"; //TODO add custom clutter cutter?
54 }

◆ GetDeploySoundset() [1/3]

override string TentBase::GetDeploySoundset ( )
inlineprivate

Definition at line 50 of file CarTent.c.

51 {
52 return "placeCarTent_SoundSet";
53 }

◆ GetDeploySoundset() [2/3]

override string TentBase::GetDeploySoundset ( )
inlineprivate

Definition at line 66 of file MediumTent.c.

67 {
68 return "placeMediumTent_SoundSet";
69 }

◆ GetDeploySoundset() [3/3]

override string TentBase::GetDeploySoundset ( )
inlineprivate

Definition at line 76 of file PartyTent.c.

77 {
78 return "placeLargeTent_SoundSet";
79 }

◆ GetLoopDeploySoundset() [1/3]

override string TentBase::GetLoopDeploySoundset ( )
inlineprivate

Definition at line 55 of file CarTent.c.

56 {
57 return "cartent_deploy_SoundSet";
58 }

Referenced by ItemBase::PlayDeployLoopSound().

◆ GetLoopDeploySoundset() [2/3]

override string TentBase::GetLoopDeploySoundset ( )
inlineprivate

Definition at line 71 of file MediumTent.c.

72 {
73 return "mediumtent_deploy_SoundSet";
74 }

◆ GetLoopDeploySoundset() [3/3]

override string TentBase::GetLoopDeploySoundset ( )
inlineprivate

Definition at line 81 of file PartyTent.c.

82 {
83 return "largetent_deploy_SoundSet";
84 }

◆ GetMaterialPath()

string TentBase::GetMaterialPath ( )
inlineprivate

Definition at line 39 of file Shelter.c.

40 {
41 return string.Format("%1 %2 Construction site %3 Materials", CFG_VEHICLESPATH, SITE_OBJECT_TYPE, GetShelterVariant());
42 }
static const string SITE_OBJECT_TYPE
Definition Shelter.c:3
const string CFG_VEHICLESPATH
Definition constants.c:209

References CFG_VEHICLESPATH, string::Format(), ShelterBase::GetShelterVariant(), and SITE_OBJECT_TYPE.

◆ GetShelterVariant()

string TentBase::GetShelterVariant ( )
inlineprivate

Definition at line 44 of file Shelter.c.

45 {
46 return "";
47 }

◆ GetSoundClose() [1/3]

override string TentBase::GetSoundClose ( )
inlineprivate

Definition at line 31 of file CarTent.c.

32 {
33 return "CarTent_Door_Close_SoundSet";
34 }

Referenced by ItemBase::SoundTentClosePlay().

◆ GetSoundClose() [2/3]

override string TentBase::GetSoundClose ( )
inlineprivate

Definition at line 31 of file MediumTent.c.

32 {
33 return "MediumTent_Door_Close_SoundSet";
34 }

◆ GetSoundClose() [3/3]

override string TentBase::GetSoundClose ( )
inlineprivate

Definition at line 31 of file PartyTent.c.

32 {
33 return "LargeTent_Door_Close_SoundSet";
34 }

◆ GetSoundCloseWindow()

override string TentBase::GetSoundCloseWindow ( )
inlineprivate

Definition at line 41 of file PartyTent.c.

42 {
43 return "LargeTent_Window_Close_SoundSet";
44 }

Referenced by ItemBase::SoundTentCloseWindowPlay().

◆ GetSoundOpen() [1/3]

override string TentBase::GetSoundOpen ( )
inlineprivate

Definition at line 26 of file CarTent.c.

27 {
28 return "CarTent_Door_Open_SoundSet";
29 }

Referenced by ItemBase::SoundTentOpenPlay().

◆ GetSoundOpen() [2/3]

override string TentBase::GetSoundOpen ( )
inlineprivate

Definition at line 26 of file MediumTent.c.

27 {
28 return "MediumTent_Door_Open_SoundSet";
29 }

◆ GetSoundOpen() [3/3]

override string TentBase::GetSoundOpen ( )
inlineprivate

Definition at line 26 of file PartyTent.c.

27 {
28 return "LargeTent_Door_Open_SoundSet";
29 }

◆ GetSoundOpenWindow()

override string TentBase::GetSoundOpenWindow ( )
inlineprivate

Definition at line 36 of file PartyTent.c.

37 {
38 return "LargeTent_Window_Open_SoundSet";
39 }

Referenced by ItemBase::SoundTentOpenWindowPlay().

◆ HandleCamoNetAttachment()

override void TentBase::HandleCamoNetAttachment ( bool hide)
inlineprivate

Definition at line 86 of file PartyTent.c.

87 {
88 bool is_closed;
89 bool is_ruined;
90 string component;
91 string zone;
92 string camo_off;
93 string camo_on;
95
96 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
97 {
98 toggle = m_ToggleAnimations.GetKey(i);
99 camo_off = "Camo" + toggle.GetToggleOff().Substring(4, 2);
100 camo_on = "Camo" + toggle.GetToggleOn().Substring(4, 2);
101
102 if (hide)
103 {
104 SetAnimationPhase(camo_off, hide);
105 SetAnimationPhase(camo_on, hide);
106 }
107 else
108 {
109 component = toggle.GetToggleOff(); //either one works
110 component.ToLower();
111 DamageSystem.GetDamageZoneFromComponentName(this, component, zone);
112 is_ruined = GetHealthLevel(zone) == GameConstants.STATE_RUINED;
113 is_closed = m_OpeningMask & toggle.GetOpeningBit();
114
115 if (is_closed)
116 SetAnimationPhase(camo_on, is_ruined);
117 else
118 SetAnimationPhase(camo_off, is_ruined);
119 }
120 }
121
122 SetAnimationPhase("Camo_Roof", hide);
123 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
const int STATE_RUINED
Definition constants.c:757

References component, and GameConstants::STATE_RUINED.

Referenced by ItemBase::EEItemAttached(), ItemBase::EEItemDetached(), and ItemBase::RefreshAttachements().

◆ HasClutterCutter() [1/3]

override bool TentBase::HasClutterCutter ( )
inlineprivate

Definition at line 36 of file CarTent.c.

37 {
38 return false;
39 }

Referenced by ItemBase::OnStoreLoad().

◆ HasClutterCutter() [2/3]

override bool TentBase::HasClutterCutter ( )
inlineprivate

Definition at line 36 of file MediumTent.c.

37 {
38 return true;
39 }

◆ HasClutterCutter() [3/3]

override bool TentBase::HasClutterCutter ( )
inlineprivate

Definition at line 46 of file PartyTent.c.

47 {
48 return true;
49 }

◆ IsDeployable()

override bool TentBase::IsDeployable ( )
inlineprivate

Definition at line 45 of file CarTent.c.

46 {
47 return true;
48 }

◆ IsPlayerInside()

override bool TentBase::IsPlayerInside ( PlayerBase player,
string selection )
inlineprivate

Definition at line 55 of file Shelter.c.

56 {
57 vector player_pos = player.GetPosition();
59 vector ref_dir = GetDirection();
60 ref_dir[1] = 0;
61 ref_dir.Normalize();
62
63 vector x[2];
64 vector b1, b2;
65 GetCollisionBox(x);
66 b1 = x[0];
67 b2 = x[1];
68
70 dir_to_shelter[1] = 0;
71 float len = dir_to_shelter.Length();
72
73 dir_to_shelter.Normalize();
74
75 vector ref_dir_angle = ref_dir.VectorToAngles();
78
79 vector test_position = test_angles.AnglesToVector() * len;
80
81 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2)
82 return false;
83 else
84 return true;
85 }
Icon x
class JsonUndergroundAreaTriggerData GetPosition

References GetPosition, and x.

◆ MediumTent()

void TentBase::MediumTent ( )
inlineprivate

Definition at line 3 of file MediumTent.c.

4 {
5 m_ToggleAnimations.Insert(new ToggleAnimations("EntranceO", "EntranceC", OPENING_0), 0);
6
7 m_ShowAnimationsWhenPitched.Insert("Body");
8 //m_ShowAnimationsWhenPitched.Insert( "EntranceO" );
9 m_ShowAnimationsWhenPitched.Insert("Pack");
10
11 m_ShowAnimationsWhenPacked.Insert("Inventory");
12
13 m_HalfExtents = Vector(0.8, 0.15, 1.3);
14 }

References m_HalfExtents, and Vector().

◆ OnItemLocationChanged() [1/2]

override void TentBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprivate

Definition at line 21 of file CarTent.c.

22 {
23 super.OnItemLocationChanged(old_owner, new_owner);
24 }

◆ OnItemLocationChanged() [2/2]

override void TentBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprivate

Definition at line 21 of file MediumTent.c.

22 {
23 super.OnItemLocationChanged(old_owner, new_owner);
24 }

◆ OnPlacementComplete() [1/2]

override void TentBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 50 of file MediumTent.c.

51 {
52 super.OnPlacementComplete(player, position, orientation);
53
55
56 if (GetGame().IsServer())
57 {
58 if (!m_ClutterCutter)
59 {
60 m_ClutterCutter = GetGame().CreateObjectEx("MediumTentClutterCutter", pb.GetLocalProjectionPosition(), ECE_PLACE_ON_SURFACE);
61 m_ClutterCutter.SetOrientation(pb.GetLocalProjectionOrientation());
62 }
63 }
64 }
const int ECE_PLACE_ON_SURFACE
Object m_ClutterCutter
proto native CGame GetGame()

References ECE_PLACE_ON_SURFACE, GetGame(), and m_ClutterCutter.

◆ OnPlacementComplete() [2/2]

override void TentBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 60 of file PartyTent.c.

61 {
62 super.OnPlacementComplete(player, position, orientation);
63
65
66 if (GetGame().IsServer())
67 {
68 if (!m_ClutterCutter)
69 {
70 m_ClutterCutter = GetGame().CreateObjectEx("LargeTentClutterCutter", pb.GetLocalProjectionPosition(), ECE_PLACE_ON_SURFACE);
71 m_ClutterCutter.SetOrientation(pb.GetLocalProjectionOrientation());
72 }
73 }
74 }

References ECE_PLACE_ON_SURFACE, GetGame(), and m_ClutterCutter.

◆ PartyTent()

void TentBase::PartyTent ( )
inlineprivate

Definition at line 3 of file PartyTent.c.

4 {
5 m_ToggleAnimations.Insert(new ToggleAnimations("Door1o", "Door1c", OPENING_0), 0);
6 m_ToggleAnimations.Insert(new ToggleAnimations("Door2o", "Door2c", OPENING_1), 0);
7 m_ToggleAnimations.Insert(new ToggleAnimations("Door3o", "Door3c", OPENING_2), 0);
8 m_ToggleAnimations.Insert(new ToggleAnimations("Door4o", "Door4c", OPENING_3), 0);
9 m_ToggleAnimations.Insert(new ToggleAnimations("Door5o", "Door5c", OPENING_4), 0);
10 m_ToggleAnimations.Insert(new ToggleAnimations("Door6o", "Door6c", OPENING_5), 0);
11
12 m_ShowAnimationsWhenPitched.Insert("Body");
13 m_ShowAnimationsWhenPitched.Insert("Pack");
14 /*m_ShowAnimationsWhenPitched.Insert( "Door1o" );
15 m_ShowAnimationsWhenPitched.Insert( "Door2o" );
16 m_ShowAnimationsWhenPitched.Insert( "Door3o" );
17 m_ShowAnimationsWhenPitched.Insert( "Door4o" );
18 m_ShowAnimationsWhenPitched.Insert( "Door5o" );
19 m_ShowAnimationsWhenPitched.Insert( "Door6o" );*/
20
21 m_ShowAnimationsWhenPacked.Insert("Inventory");
22
23 m_HalfExtents = Vector(1.3, 0.35, 2.7);
24 }

References m_HalfExtents, and Vector().

◆ SetActions()

override void TentBase::SetActions ( )
inlineprivate

Definition at line 13 of file Shelter.c.

14 {
15 super.SetActions();
16
20 RemoveAction(ActionDeployObject);
21
23 }
ActionPackTentCB ActionContinuousBaseCB ActionPackTent()
void AddAction(typename actionName)
void RemoveAction(typename actionName)

References ActionPackTent(), AddAction(), and RemoveAction().

◆ ShelterBase()

void TentBase::ShelterBase ( )
inlineprivate

Definition at line 5 of file Shelter.c.

6 {
7 m_ShowAnimationsWhenPitched.Insert("Body");
8 m_ShowAnimationsWhenPacked.Insert("Body");
9
10 m_HalfExtents = Vector(0.8, 0.15, 1.3);
11 }

References m_HalfExtents, and Vector().

◆ SpawnKit()

void TentBase::SpawnKit ( )
inlineprivate

Definition at line 49 of file Shelter.c.

50 {
51 ItemBase constructionKit = ItemBase.Cast(GetGame().CreateObjectEx("ShelterKit", GetPosition(), ECE_PLACE_ON_SURFACE));
52 constructionKit.SetHealth01("", "", GetHealth01());
53 }

References ECE_PLACE_ON_SURFACE, GetGame(), and GetPosition.

Member Data Documentation

◆ SITE_OBJECT_TYPE

const string TentBase::SITE_OBJECT_TYPE = "ShelterSite"
staticprivate

Definition at line 3 of file Shelter.c.


The documentation for this class was generated from the following files: