DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
KitBase.c
См. документацию.
1class KitBase extends ItemBase
2{
3 protected bool m_DeployedRegularly;
4
5 override bool IsBasebuildingKit()
6 {
7 return true;
8 }
9
10 override bool HasProxyParts()
11 {
12 return true;
13 }
14
15 override bool CanProxyObstruct()
16 {
17 return false;
18 }
19
20 override void EEInit()
21 {
22 super.EEInit();
23
24 //set visual on init
27
28 if (GetGame().IsServer())
29 {
31 }
32 }
33
35 {
36 return true;
37 }
38
39 override void EEItemDetached(EntityAI item, string slot_name)
40 {
41 super.EEItemDetached( item, slot_name );
42
43 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
44 if ( player && player.IsPlayerDisconnected() )
45 return;
46
47 if (item && slot_name == "Rope")
48 {
49 if (GetGame().IsServer() && !m_DeployedRegularly)
50 {
51 DisassembleKit(ItemBase.Cast(item));
52 Delete();
53 }
54 }
55 }
56
57 override void OnItemLocationChanged( EntityAI old_owner, EntityAI new_owner )
58 {
59 super.OnItemLocationChanged( old_owner, new_owner );
60
61 //update visuals after location change
63 }
64
65 override void OnEndPlacement()
66 {
68 }
69
70 override void OnPlacementCancelled( Man player )
71 {
72 super.OnPlacementCancelled(player);
73 m_DeployedRegularly = false;
74 }
75
76 override bool IsDeployable()
77 {
78 return true;
79 }
80
82 {
83 return false;
84 }
85
86 override string GetDeploySoundset()
87 {
88 return "putDown_FenceKit_SoundSet";
89 }
90
91 override string GetLoopDeploySoundset()
92 {
93 return "Shelter_Site_Build_Loop_SoundSet";
94 }
95
96 override void RefreshPhysics()
97 {
98 super.RefreshPhysics();
99
101 }
102
103 //Update visuals and physics
105 {
106 SetAnimationPhase( "Inventory", 0 );
107 SetAnimationPhase( "Placing", 1 );
108 }
109
111 {
112 AddProxyPhysics( "Inventory" );
113 RemoveProxyPhysics( "Placing" );
114 }
115
117 {
118 if (!IsHologram())
119 {
120 Rope rope = Rope.Cast(GetInventory().CreateAttachment("Rope"));
121 }
122 }
123
125
126 void CreateRope(Rope rope)
127 {
128 if (!rope)
129 return;
130
131 InventoryLocation targetLoc = rope.GetTargetLocation();
132 if (targetLoc && targetLoc.GetType() != InventoryLocationType.GROUND)
133 {
134 MiscGameplayFunctions.TransferItemProperties(this, rope);
135 return;
136 }
137
138 EntityAI newRope = EntityAI.Cast(GetGame().CreateObjectEx(rope.GetType(), GetPosition(), ECE_PLACE_ON_SURFACE));
139
140 if (newRope)
141 MiscGameplayFunctions.TransferItemProperties(this, newRope);
142
143 rope.Delete();
144 }
145
146 override void SetActions()
147 {
148 super.SetActions();
149
152 }
153
155 protected ref EffectSound m_DeployLoopSound; //DEPRECATED in favor of m_DeployLoopSoundEx
156
159}
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
Определения ActionDeployObject.c:9
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
void UpdateVisuals()
Определения Construction.c:188
void UpdatePhysics()
Определения Construction.c:207
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
override bool IsHologram()
Определения ItemBase.c:5753
ref EffectSound m_DeployLoopSound
DEPRECATED.
Определения TrapBase.c:692
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
Определения Building.c:6
proto native int GetType()
returns type of InventoryLocation
InventoryLocation.
Определения InventoryLocation.c:29
void UpdateVisuals()
Определения KitBase.c:104
override bool IsBasebuildingKit()
Определения KitBase.c:5
bool m_DeployedRegularly
Определения KitBase.c:3
override bool HasProxyParts()
Определения KitBase.c:10
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Определения KitBase.c:57
void PlayDeployLoopSound()
override void SetActions()
Определения KitBase.c:146
void CreateRope(Rope rope)
Определения KitBase.c:126
void DisassembleKit(ItemBase item)
Определения KitBase.c:124
override bool DisassembleOnLastDetach()
Определения KitBase.c:34
override string GetDeploySoundset()
Определения KitBase.c:86
override bool CanAssignAttachmentsToQuickbar()
Определения KitBase.c:81
override void OnPlacementCancelled(Man player)
Определения KitBase.c:70
override void EEItemDetached(EntityAI item, string slot_name)
Определения KitBase.c:39
override void RefreshPhysics()
Определения KitBase.c:96
override void EEInit()
Определения KitBase.c:20
void AssembleKit()
Определения KitBase.c:116
void UpdatePhysics()
Определения KitBase.c:110
override string GetLoopDeploySoundset()
Определения KitBase.c:91
override bool CanProxyObstruct()
Определения KitBase.c:15
void StopDeployLoopSound()
DEPRECATED.
override bool IsDeployable()
Определения KitBase.c:76
override void OnEndPlacement()
Определения KitBase.c:65
Определения InventoryItem.c:731
override void DisassembleKit(ItemBase item)
Определения FenceKit.c:46
Определения FenceKit.c:2
Определения PlayerBaseClient.c:2
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9
const int CALL_CATEGORY_GAMEPLAY
Определения tools.c:10