DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ InitItemVariables()

override void InitItemVariables ( )
private

См. определение в файле ItemBase.c строка 158

159 {
160 super.InitItemVariables();
161
162 ItemBaseType itemBaseType = ItemBaseType.Cast(GetEntityType());
163
164 m_VarQuantity = itemBaseType.m_VarQuantityInit; //should be by the CE, this is just a precaution
165 m_VarWet = itemBaseType.m_VarWetInit;
166 m_Cleanness = itemBaseType.m_CleannessInit;
167
168 m_WantPlayImpactSound = false;
169 m_ImpactSpeed = 0.0;
170
171 // TODO: move to EntityType (ONLY IF POSSIBLE, GetQuantity() plays against it)
172 //{
173 if (IsLiquidContainer() && GetQuantity() != 0)
175 //}
176
177 m_IsBeingPlaced = false;
178 m_IsHologram = false;
179 m_IsTakeable = true;
180 m_CanBeMovedOverride = false;
181
182 //Define if item can be split and set ability to be combined accordingly
183 can_this_be_combined = ItemBaseType.Cast(GetEntityType()).m_CanBeSplit;
185
186 //RegisterNetSyncVariableInt("m_VariablesMask");
187 if (HasQuantity())
188 RegisterNetSyncVariableFloat("m_VarQuantity", itemBaseType.m_VarQuantityMin, itemBaseType.m_VarQuantityMax);
189
190 RegisterNetSyncVariableFloat("m_VarWet", GetWetMin(), GetWetMax(), 2);
191 RegisterNetSyncVariableInt("m_VarLiquidType");
192 RegisterNetSyncVariableInt("m_Cleanness",0,1);
193
194 RegisterNetSyncVariableBoolSignal("m_WantPlayImpactSound");
195 RegisterNetSyncVariableFloat("m_ImpactSpeed");
196 RegisterNetSyncVariableInt("m_ImpactSoundSurfaceHash");
197
198 RegisterNetSyncVariableInt("m_ColorComponentR", 0, 255);
199 RegisterNetSyncVariableInt("m_ColorComponentG", 0, 255);
200 RegisterNetSyncVariableInt("m_ColorComponentB", 0, 255);
201 RegisterNetSyncVariableInt("m_ColorComponentA", 0, 255);
202
203 RegisterNetSyncVariableBool("m_IsBeingPlaced");
204 RegisterNetSyncVariableBool("m_IsTakeable");
205 RegisterNetSyncVariableBool("m_IsHologram");
206
209 {
210 RegisterNetSyncVariableInt("m_SoundSyncPlay", 0, ITEM_SOUNDS_MAX);
211 RegisterNetSyncVariableInt("m_SoundSyncStop", 0, ITEM_SOUNDS_MAX);
212 RegisterNetSyncVariableInt("m_SoundSyncSlotID", int.MIN, int.MAX);
213 }
214
216 }
const int MIN
Определения EnConvert.c:28
const int MAX
Определения EnConvert.c:27
float m_VarWet
Определения ItemBase.c:42
float m_VarQuantity
Определения ItemBase.c:37
override float GetWetMax()
Определения ItemBase.c:3722
bool m_CanBeMovedOverride
Определения ItemBase.c:60
bool IsLiquidContainer()
Определения ItemBase.c:825
int m_Cleanness
Определения ItemBase.c:46
override float GetQuantity()
Определения ItemBase.c:3486
const int ITEM_SOUNDS_MAX
Определения ItemBase.c:116
override bool HasQuantity()
Определения ItemBase.c:3481
int GetLiquidTypeInit()
Определения ItemBase.c:3878
void InitItemSounds()
Определения ItemBase.c:4416
int m_VarLiquidType
Определения ItemBase.c:54
bool m_IsTakeable
Определения ItemBase.c:57
bool can_this_be_combined
Определения ItemBase.c:62
int m_SoundSyncSlotID
Определения ItemBase.c:119
bool m_WantPlayImpactSound
Определения ItemBase.c:48
override float GetWetMin()
Определения ItemBase.c:3727
bool m_CanThisBeSplit
Определения ItemBase.c:63
bool m_IsHologram
Определения ItemBase.c:56
float m_ImpactSpeed
Определения ItemBase.c:50
bool m_IsBeingPlaced
Определения ItemBase.c:55
ref ItemSoundHandler m_ItemSoundHandler
Определения ItemBase.c:122
const int INVALID
Invalid slot (-1)
Определения InventorySlots.c:17
provides access to slot configuration
Определения InventorySlots.c:6
int m_VarQuantityMax
Определения ItemBaseType.c:16
bool m_CanBeSplit
Определения ItemBaseType.c:10
int m_CleannessInit
Cleanness config.
Определения ItemBaseType.c:19
int m_VarQuantityMin
Определения ItemBaseType.c:15
float m_VarWetInit
Wetness config.
Определения ItemBaseType.c:38
int m_VarQuantityInit
Определения ItemBaseType.c:14
Определения ItemBaseType.c:5

Перекрестные ссылки can_this_be_combined, GetLiquidTypeInit(), GetQuantity(), GetWetMax(), GetWetMin(), HasQuantity(), ItemBase::InitItemSounds(), InventorySlots::INVALID, IsLiquidContainer(), ITEM_SOUNDS_MAX, m_CanBeMovedOverride, ItemBaseType::m_CanBeSplit, m_CanThisBeSplit, m_Cleanness, ItemBaseType::m_CleannessInit, m_ImpactSpeed, m_IsBeingPlaced, m_IsHologram, m_IsTakeable, m_ItemSoundHandler, m_SoundSyncSlotID, m_VarLiquidType, m_VarQuantity, ItemBaseType::m_VarQuantityInit, ItemBaseType::m_VarQuantityMax, ItemBaseType::m_VarQuantityMin, m_VarWet, ItemBaseType::m_VarWetInit, m_WantPlayImpactSound, MAX и MIN.

Используется в Entity::EntityAI().