DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл Bottle_Base.c

См. исходные тексты.

Перечисления

enum  SoundTypeBottle { POURING = 1 , EMPTYING = 0 }
 

Функции

void Bottle_Base ()
 
void ~Bottle_Base ()
 
override void EEDelete (EntityAI parent)
 
override void EECargoIn (EntityAI item)
 
override void Synchronize ()
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
override void OnVariablesSynchronized ()
 
void RemoveAudioVisualsOnClient ()
 
void RefreshAudioVisualsOnClient (CookingMethodType cooking_method, bool is_done, bool is_empty, bool is_burned)
 
void RefreshAudioVisuals (CookingMethodType cooking_method, bool is_done, bool is_empty, bool is_burned)
 
void RemoveAudioVisuals ()
 
void ParticleCookingStart (int particle_id)
 
void ParticleCookingStop ()
 
void PlayPouringLoopSound ()
 
void StopPouringLoopSound ()
 
void PlayEmptyingLoopSound ()
 
void StopEmptyingLoopSound ()
 
string GetEmptyingLoopSoundset ()
 
string GetEmptyingEndSoundset ()
 
string GetPouringSoundset ()
 
string GetEmptyingLoopSoundsetHard ()
 
string GetEmptyingLoopSoundsetSoft ()
 
string GetEmptyingLoopSoundsetWater ()
 
string GetEmptyingEndSoundsetHard ()
 
string GetEmptyingEndSoundsetSoft ()
 
string GetEmptyingEndSoundsetWater ()
 
float GetLiquidEmptyRate ()
 Returns base liquid empty rate (absolute)..preferrably use the 'GetLiquidThroughputCoef' instead.
 
override void SetActions ()
 
override void OnDebugSpawn ()
 

Переменные

enum SoundTypeBottle m_ParticleCooking
 
int m_ParticlePlaying = ParticleList.INVALID
 
int PARTICLE_BOILING_EMPTY = ParticleList.COOKING_BOILING_EMPTY
 
int PARTICLE_BOILING_START = ParticleList.COOKING_BOILING_START
 
int PARTICLE_BOILING_DONE = ParticleList.COOKING_BOILING_DONE
 
int PARTICLE_BAKING_START = ParticleList.COOKING_BAKING_START
 
int PARTICLE_BAKING_DONE = ParticleList.COOKING_BAKING_DONE
 
int PARTICLE_DRYING_START = ParticleList.COOKING_DRYING_START
 
int PARTICLE_DRYING_DONE = ParticleList.COOKING_DRYING_DONE
 
int PARTICLE_BURNING_DONE = ParticleList.COOKING_BURNING_DONE
 
EffectSound m_PouringLoopSound
 
EffectSound m_EmptyingLoopSound
 
CookingMethodType m_CookingMethod
 
bool m_CookingIsDone
 
bool m_CookingIsEmpty
 
bool m_CookingIsBurned
 
const string SOUND_BOILING_EMPTY = "Boiling_SoundSet"
 
const string SOUND_BOILING_START = "Boiling_SoundSet"
 
const string SOUND_BOILING_DONE = "Boiling_Done_SoundSet"
 
const string SOUND_DRYING_START = "Drying_SoundSet"
 
const string SOUND_DRYING_DONE = "Drying_Done_SoundSet"
 
float m_LiquidEmptyRate
 
const float QUANTITY_EMPTIED_PER_SEC_DEFAULT = 200
 

Перечисления

◆ SoundTypeBottle

Элементы перечислений
POURING 
EMPTYING 
2{
3 POURING = 1,
4 EMPTYING = 0,
5}
@ POURING
Definition Bottle_Base.c:3
@ EMPTYING
Definition Bottle_Base.c:4

Функции

◆ Bottle_Base()

void Bottle_Base ( )
private
47 {
48 RegisterNetSyncVariableInt("m_CookingMethod", CookingMethodType.NONE, CookingMethodType.COUNT);
49 RegisterNetSyncVariableBool("m_CookingIsDone");
50 RegisterNetSyncVariableBool("m_CookingIsEmpty");
51 RegisterNetSyncVariableBool("m_CookingIsBurned");
52
54 }
float m_LiquidEmptyRate
Definition Bottle_Base.c:43
const float QUANTITY_EMPTIED_PER_SEC_DEFAULT
Definition Bottle_Base.c:44
CookingMethodType
Definition Cooking.c:2

Перекрестные ссылки m_LiquidEmptyRate и QUANTITY_EMPTIED_PER_SEC_DEFAULT.

◆ EECargoIn()

override void EECargoIn ( EntityAI item)
private
71 {
72 super.EECargoIn(item);
73
74 MiscGameplayFunctions.SoakItemInsideParentContainingLiquidAboveThreshold(ItemBase.Cast(item), this);
75 }
Definition InventoryItem.c:731
Definition EntityAI.c:95

◆ EEDelete()

override void EEDelete ( EntityAI parent)
private
63 {
64 super.EEDelete( parent );
65
66 //remove audio visuals
68 }
void RemoveAudioVisuals()
Definition Bottle_Base.c:229

Перекрестные ссылки RemoveAudioVisuals().

◆ GetEmptyingEndSoundset()

string GetEmptyingEndSoundset ( )
private
319 {
320 vector pos = GetPosition();
321 string surfaceType = GetGame().GetPlayer().GetSurfaceType();
322 string soundSet = "";
323
324 bool diggable = GetGame().IsSurfaceDigable(surfaceType);
325
326 if (!diggable)
327 {
329 }
330 else if (diggable)
331 {
333 }
334 else if (GetGame().SurfaceIsPond(pos[0], pos[2]) || GetGame().SurfaceIsSea(pos[0], pos[2]))
335 {
337 }
338
339 return soundSet;
340 }
string GetEmptyingEndSoundsetSoft()
string GetEmptyingEndSoundsetHard()
string GetEmptyingEndSoundsetWater()
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition EnConvert.c:106
proto native CGame GetGame()

Перекрестные ссылки Bottle_Base::GetEmptyingEndSoundsetHard(), Bottle_Base::GetEmptyingEndSoundsetSoft(), Bottle_Base::GetEmptyingEndSoundsetWater(), GetGame() и GetPosition.

Используется в StopEmptyingLoopSound().

◆ GetEmptyingEndSoundsetHard()

string GetEmptyingEndSoundsetHard ( )
private

◆ GetEmptyingEndSoundsetSoft()

string GetEmptyingEndSoundsetSoft ( )
private

◆ GetEmptyingEndSoundsetWater()

string GetEmptyingEndSoundsetWater ( )
private

◆ GetEmptyingLoopSoundset()

string GetEmptyingLoopSoundset ( )
private
295 {
296 vector pos = GetPosition();
297 string surfaceType = GetGame().GetPlayer().GetSurfaceType();
298 string soundSet = "";
299
300 bool diggable = GetGame().IsSurfaceDigable(surfaceType);
301
302 if (!diggable)
303 {
305 }
306 else if (diggable)
307 {
309 }
310 else if (GetGame().SurfaceIsPond(pos[0], pos[2]) || GetGame().SurfaceIsSea(pos[0], pos[2]))
311 {
313 }
314
315 return soundSet;
316 }
string GetEmptyingLoopSoundsetHard()
string GetEmptyingLoopSoundsetWater()
string GetEmptyingLoopSoundsetSoft()

Перекрестные ссылки Bottle_Base::GetEmptyingLoopSoundsetHard(), Bottle_Base::GetEmptyingLoopSoundsetSoft(), Bottle_Base::GetEmptyingLoopSoundsetWater(), GetGame() и GetPosition.

Используется в PlayEmptyingLoopSound().

◆ GetEmptyingLoopSoundsetHard()

string GetEmptyingLoopSoundsetHard ( )
private

◆ GetEmptyingLoopSoundsetSoft()

string GetEmptyingLoopSoundsetSoft ( )
private

◆ GetEmptyingLoopSoundsetWater()

string GetEmptyingLoopSoundsetWater ( )
private

◆ GetLiquidEmptyRate()

float GetLiquidEmptyRate ( )
private

Returns base liquid empty rate (absolute)..preferrably use the 'GetLiquidThroughputCoef' instead.

352 {
353 return m_LiquidEmptyRate;
354 }

Перекрестные ссылки m_LiquidEmptyRate.

◆ GetPouringSoundset()

string GetPouringSoundset ( )
private

◆ OnDebugSpawn()

override void OnDebugSpawn ( )
private
377 {
379 }
void SetQuantityMax()
Definition ItemBase.c:8040

Перекрестные ссылки SetQuantityMax().

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
private
90 {
91 super.OnRPC(sender, rpc_type, ctx);
92
93 Param1<bool> p = new Param1<bool>(false);
94
95 if (!ctx.Read(p))
96 return;
97
98 bool play = p.param1;
99 switch (rpc_type)
100 {
101 case SoundTypeBottle.POURING:
102 if (play)
104 else
106
107 break;
108
109 case SoundTypeBottle.EMPTYING:
110 if (play)
112 else
114
115 break;
116 }
117 }
SoundTypeBottle
Definition Bottle_Base.c:2
void StopEmptyingLoopSound()
Definition Bottle_Base.c:285
void StopPouringLoopSound()
Definition Bottle_Base.c:271
void PlayEmptyingLoopSound()
Definition Bottle_Base.c:277
void PlayPouringLoopSound()
Definition Bottle_Base.c:263

Перекрестные ссылки PlayEmptyingLoopSound(), PlayPouringLoopSound(), StopEmptyingLoopSound() и StopPouringLoopSound().

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
private
120 {
121 super.OnVariablesSynchronized();
122
124 {
126 }
127 else
128 {
130 }
131 }
bool m_CookingIsBurned
Definition Bottle_Base.c:34
bool m_CookingIsEmpty
Definition Bottle_Base.c:33
void RefreshAudioVisuals(CookingMethodType cooking_method, bool is_done, bool is_empty, bool is_burned)
Definition Bottle_Base.c:150
bool m_CookingIsDone
Definition Bottle_Base.c:32
CookingMethodType m_CookingMethod
Definition Bottle_Base.c:31

Перекрестные ссылки m_CookingIsBurned, m_CookingIsDone, m_CookingIsEmpty, m_CookingMethod, RefreshAudioVisuals() и RemoveAudioVisuals().

◆ ParticleCookingStart()

void ParticleCookingStart ( int particle_id)
private
237 {
238 #ifndef SERVER
240 {
241 //stop previous particles
243
244 //create new
245 vector localPos = MiscGameplayFunctions.GetSteamPosition(GetHierarchyParent());
246 m_ParticleCooking = ParticleManager.GetInstance().PlayInWorld(particle_id, localPos);
248
249 }
250 #endif
251 }
enum SoundTypeBottle m_ParticleCooking
int m_ParticlePlaying
Definition Bottle_Base.c:11
void ParticleCookingStop()
Definition Bottle_Base.c:253
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
int particle_id
Definition SmokeSimulation.c:28

Перекрестные ссылки m_ParticleCooking, m_ParticlePlaying, particle_id, ParticleCookingStop() и ParticleManager().

Используется в RefreshAudioVisuals().

◆ ParticleCookingStop()

void ParticleCookingStop ( )
private
254 {
255 if (m_ParticleCooking && GetGame() && !GetGame().IsDedicatedServer())
256 {
257 m_ParticleCooking.Stop();
260 }
261 }
Definition ParticleList.c:12
static const int INVALID
Definition ParticleList.c:20

Перекрестные ссылки GetGame(), ParticleList::INVALID, m_ParticleCooking и m_ParticlePlaying.

Используется в ParticleCookingStart() и RemoveAudioVisuals().

◆ PlayEmptyingLoopSound()

void PlayEmptyingLoopSound ( )
private
278 {
280 {
282 }
283 }
EffectSound m_EmptyingLoopSound
Definition Bottle_Base.c:28
string GetEmptyingLoopSoundset()
Definition Bottle_Base.c:294
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
Definition EffectSound.c:274
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:247

Перекрестные ссылки GetEmptyingLoopSoundset(), EffectSound::IsSoundPlaying(), m_EmptyingLoopSound и SEffectManager::PlaySoundOnObject().

Используется в OnRPC().

◆ PlayPouringLoopSound()

void PlayPouringLoopSound ( )
private
264 {
266 {
268 }
269 }
EffectSound m_PouringLoopSound
Definition Bottle_Base.c:27
string GetPouringSoundset()

Перекрестные ссылки Bottle_Base::GetPouringSoundset(), EffectSound::IsSoundPlaying(), m_PouringLoopSound и SEffectManager::PlaySoundOnObject().

Используется в OnRPC().

◆ RefreshAudioVisuals()

void RefreshAudioVisuals ( CookingMethodType cooking_method,
bool is_done,
bool is_empty,
bool is_burned )
private
151 {
152 string soundName;
153 int particleId;
154
155 //if at least one of the food items is burned
156 if (is_burned)
157 {
160 }
161 //proper cooking methods
162 else
163 {
164 switch (cooking_method)
165 {
166 case CookingMethodType.BOILING:
167 if (is_empty)
168 {
171 }
172 else
173 {
174 if (is_done)
175 {
178 }
179 else
180 {
183 }
184 }
185
186 break;
187
188 case CookingMethodType.BAKING:
189 if (is_done)
190 {
193 }
194 else
195 {
198 }
199
200 break;
201
202 case CookingMethodType.DRYING:
203 if (is_done)
204 {
207 }
208 else
209 {
212 }
213
214 break;
215
216 default:
217 soundName = "";
219
220 break;
221 }
222 }
223
224 //play effects
227 }
int PARTICLE_BAKING_DONE
Definition Bottle_Base.c:19
int PARTICLE_DRYING_DONE
Definition Bottle_Base.c:22
int PARTICLE_BOILING_DONE
Definition Bottle_Base.c:16
int PARTICLE_DRYING_START
Definition Bottle_Base.c:21
int PARTICLE_BAKING_START
Definition Bottle_Base.c:18
void ParticleCookingStart(int particle_id)
Definition Bottle_Base.c:236
int PARTICLE_BURNING_DONE
Definition Bottle_Base.c:24
const string SOUND_DRYING_START
Definition Bottle_Base.c:40
int PARTICLE_BOILING_EMPTY
Definition Bottle_Base.c:14
const string SOUND_DRYING_DONE
Definition Bottle_Base.c:41
const string SOUND_BOILING_DONE
Definition Bottle_Base.c:39
const string SOUND_BOILING_START
Definition Bottle_Base.c:38
int PARTICLE_BOILING_START
Definition Bottle_Base.c:15
const string SOUND_BOILING_EMPTY
Definition Bottle_Base.c:37
const string SOUND_BURNING_DONE
Definition Edible_Base.c:976
const string SOUND_BAKING_DONE
Definition Edible_Base.c:975
const string SOUND_BAKING_START
Definition Edible_Base.c:974
void SoundCookingStart(string sound_name)
Definition Edible_Base.c:1580
static const int NONE
Definition ParticleList.c:21

Перекрестные ссылки ParticleList::NONE, PARTICLE_BAKING_DONE, PARTICLE_BAKING_START, PARTICLE_BOILING_DONE, PARTICLE_BOILING_EMPTY, PARTICLE_BOILING_START, PARTICLE_BURNING_DONE, PARTICLE_DRYING_DONE, PARTICLE_DRYING_START, ParticleCookingStart(), SOUND_BAKING_DONE, SOUND_BAKING_START, SOUND_BOILING_DONE, SOUND_BOILING_EMPTY, SOUND_BOILING_START, SOUND_BURNING_DONE, SOUND_DRYING_DONE, SOUND_DRYING_START и SoundCookingStart().

Используется в OnVariablesSynchronized().

◆ RefreshAudioVisualsOnClient()

void RefreshAudioVisualsOnClient ( CookingMethodType cooking_method,
bool is_done,
bool is_empty,
bool is_burned )
private
141 {
146
147 Synchronize();
148 }
override void Synchronize()
Definition Bottle_Base.c:84

Перекрестные ссылки m_CookingIsBurned, m_CookingIsDone, m_CookingIsEmpty, m_CookingMethod и Synchronize().

◆ RemoveAudioVisuals()

void RemoveAudioVisuals ( )
private
230 {
233 }
void SoundCookingStop()
Definition Edible_Base.c:1593

Перекрестные ссылки ParticleCookingStop() и SoundCookingStop().

Используется в EEDelete() и OnVariablesSynchronized().

◆ RemoveAudioVisualsOnClient()

void RemoveAudioVisualsOnClient ( )
private
134 {
136
137 Synchronize();
138 }

Перекрестные ссылки m_CookingMethod и Synchronize().

◆ SetActions()

override void SetActions ( )
private
357 {
358 super.SetActions();
359
374 }
ActionExtinguishFireplaceByLiquidCB ActionContinuousBaseCB ActionExtinguishFireplaceByLiquid()
Definition ActionExtinguishFireplaceByLiquid.c:15
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
Definition ActionDrainLiquid.c:12
Definition ActionDrink.c:10
Definition ActionEmptyBottleBase.c:24
Definition ActionFillBottleBase.c:27
Definition ActionFillBottleSnow.c:2
Definition ActionFillCoolant.c:12
Definition ActionFillFuel.c:12
Definition ActionFillGeneratorTank.c:12
Definition ActionForceDrink.c:10
Definition ActionPourLiquid.c:12
Definition ActionWashHandsItemContinuous.c:10
Definition ActionWaterGardenSlot.c:12
Definition ActionWaterPlant.c:12

Перекрестные ссылки ActionExtinguishFireplaceByLiquid() и AddAction().

◆ StopEmptyingLoopSound()

void StopEmptyingLoopSound ( )
private
286 {
289
291 sound.SetAutodestroy(true);
292 }
string GetEmptyingEndSoundset()
Definition Bottle_Base.c:318
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
void SoundStop()
Stops sound.
Definition EffectSound.c:217

Перекрестные ссылки GetEmptyingEndSoundset(), m_EmptyingLoopSound, SEffectManager::PlaySoundOnObject() и EffectSound::SoundStop().

Используется в OnRPC().

◆ StopPouringLoopSound()

void StopPouringLoopSound ( )
private
272 {
275 }

Перекрестные ссылки m_PouringLoopSound и EffectSound::SoundStop().

Используется в OnRPC().

◆ Synchronize()

override void Synchronize ( )
private
85 {
86 SetSynchDirty();
87 }

◆ ~Bottle_Base()

void ~Bottle_Base ( )
private
57 {
60 }
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:271

Перекрестные ссылки SEffectManager::DestroyEffect(), m_EmptyingLoopSound и m_PouringLoopSound.

Переменные

◆ m_CookingIsBurned

bool m_CookingIsBurned
protected

◆ m_CookingIsDone

bool m_CookingIsDone
protected

◆ m_CookingIsEmpty

bool m_CookingIsEmpty
protected

◆ m_CookingMethod

◆ m_EmptyingLoopSound

EffectSound m_EmptyingLoopSound
protected

◆ m_LiquidEmptyRate

float m_LiquidEmptyRate
protected

Используется в Bottle_Base() и GetLiquidEmptyRate().

◆ m_ParticleCooking

enum SoundTypeBottle m_ParticleCooking

Используется в ParticleCookingStart() и ParticleCookingStop().

◆ m_ParticlePlaying

int m_ParticlePlaying = ParticleList.INVALID
protected

Используется в ParticleCookingStart() и ParticleCookingStop().

◆ m_PouringLoopSound

EffectSound m_PouringLoopSound
protected

◆ PARTICLE_BAKING_DONE

int PARTICLE_BAKING_DONE = ParticleList.COOKING_BAKING_DONE
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_BAKING_START

int PARTICLE_BAKING_START = ParticleList.COOKING_BAKING_START
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_BOILING_DONE

int PARTICLE_BOILING_DONE = ParticleList.COOKING_BOILING_DONE
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_BOILING_EMPTY

int PARTICLE_BOILING_EMPTY = ParticleList.COOKING_BOILING_EMPTY
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_BOILING_START

int PARTICLE_BOILING_START = ParticleList.COOKING_BOILING_START
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_BURNING_DONE

int PARTICLE_BURNING_DONE = ParticleList.COOKING_BURNING_DONE
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_DRYING_DONE

int PARTICLE_DRYING_DONE = ParticleList.COOKING_DRYING_DONE
protected

Используется в RefreshAudioVisuals().

◆ PARTICLE_DRYING_START

int PARTICLE_DRYING_START = ParticleList.COOKING_DRYING_START
protected

Используется в RefreshAudioVisuals().

◆ QUANTITY_EMPTIED_PER_SEC_DEFAULT

const float QUANTITY_EMPTIED_PER_SEC_DEFAULT = 200
private

Используется в Bottle_Base().

◆ SOUND_BOILING_DONE

const string SOUND_BOILING_DONE = "Boiling_Done_SoundSet"
protected

Используется в RefreshAudioVisuals().

◆ SOUND_BOILING_EMPTY

const string SOUND_BOILING_EMPTY = "Boiling_SoundSet"
protected

Используется в RefreshAudioVisuals().

◆ SOUND_BOILING_START

const string SOUND_BOILING_START = "Boiling_SoundSet"
protected

Используется в RefreshAudioVisuals().

◆ SOUND_DRYING_DONE

const string SOUND_DRYING_DONE = "Drying_Done_SoundSet"
protected

Используется в RefreshAudioVisuals().

◆ SOUND_DRYING_START

const string SOUND_DRYING_START = "Drying_SoundSet"
protected

Используется в RefreshAudioVisuals().