Dayz  1.11.153731
Dayz Code Explorer by Zeroy
MediumTent.c
Go to the documentation of this file.
1 class MediumTent extends TentBase
2 {
3  void MediumTent()
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  }
15 
16  override void EEInit()
17  {
18  super.EEInit();
19  }
20 
21  override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
22  {
23  super.OnItemLocationChanged(old_owner, new_owner);
24  }
25 
26  override string GetSoundOpen()
27  {
28  return "MediumTent_Door_Open_SoundSet";
29  }
30 
31  override string GetSoundClose()
32  {
33  return "MediumTent_Door_Close_SoundSet";
34  }
35 
36  override bool HasClutterCutter()
37  {
38  return true;
39  }
40 
41  override string GetClutterCutter()
42  {
43  return "MediumTentClutterCutter";
44  }
45 
46  //================================================================
47  // ADVANCED PLACEMENT
48  //================================================================
49 
50  override void OnPlacementComplete( Man player, vector position = "0 0 0", vector orientation = "0 0 0" )
51  {
52  super.OnPlacementComplete( player, position, orientation );
53 
54  PlayerBase pb = PlayerBase.Cast( player );
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  }
65 
66  override string GetDeploySoundset()
67  {
68  return "placeMediumTent_SoundSet";
69  }
70 
71  override string GetLoopDeploySoundset()
72  {
73  return "mediumtent_deploy_SoundSet";
74  }
75 };
76 
77 class MediumTent_Green extends MediumTent {};
78 class MediumTent_Orange extends MediumTent {};
79 
80 //placing classes
81 class MediumTentPlacing extends MediumTent {};
82 class MediumTent_GreenPlacing extends MediumTentPlacing {};
83 class MediumTent_OrangePlacing extends MediumTentPlacing {};
GetGame
proto native CGame GetGame()
TentBase::OnItemLocationChanged
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Definition: MediumTent.c:21
TentBase::GetClutterCutter
override string GetClutterCutter()
Definition: MediumTent.c:41
TentBase::GetDeploySoundset
override string GetDeploySoundset()
Definition: MediumTent.c:66
TentBase::EEInit
override void EEInit()
Definition: MediumTent.c:16
TentBase::GetSoundOpen
override string GetSoundOpen()
Definition: MediumTent.c:26
MediumTentPlacing
Definition: MediumTent.c:82
PlayerBase
Definition: PlayerBaseClient.c:1
vector
Definition: EnConvert.c:95
m_ClutterCutter
protected Object m_ClutterCutter
Definition: FireplaceBase.c:194
MediumTent
Definition: MediumTent.c:77
TentBase
Definition: CarTent.c:1
CGame::CreateObjectEx
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
m_HalfExtents
class Container_Base extends ItemBase m_HalfExtents
TentBase::MediumTent
void MediumTent()
Definition: MediumTent.c:3
ToggleAnimations
Definition: ToggleSelections.c:1
TentBase::OnPlacementComplete
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
Definition: MediumTent.c:50
ECE_PLACE_ON_SURFACE
const int ECE_PLACE_ON_SURFACE
Definition: CentralEconomy.c:33
TentBase::GetLoopDeploySoundset
override string GetLoopDeploySoundset()
Definition: MediumTent.c:71
Vector
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
EntityAI
Base native class of all vehicles in game.
Definition: Building.c:4
TentBase::HasClutterCutter
override bool HasClutterCutter()
Definition: MediumTent.c:36
TentBase::GetSoundClose
override string GetSoundClose()
Definition: MediumTent.c:31