40 private const float QUANTITY_EMPTIED_PER_SEC_DEFAULT = 200;
45 RegisterNetSyncVariableBool(
"m_CookingIsDone");
46 RegisterNetSyncVariableBool(
"m_CookingIsEmpty");
47 RegisterNetSyncVariableBool(
"m_CookingIsBurned");
60 super.EEDelete( parent );
66 override void EECargoIn(
EntityAI item)
68 super.EECargoIn(item);
70 MiscGameplayFunctions.SoakItemInsideParentContainingLiquidAboveThreshold(
ItemBase.Cast(item),
this);
73 override void OnFreezeStateChangeServer()
75 super.OnFreezeStateChangeServer();
79 if (!GetIsFrozen() &&
GetLiquidType() != 0 && Class.CastTo(cargo,GetInventory().GetCargo()))
81 int count = cargo.GetItemCount();
82 for (
int i = 0; i < count; ++i)
84 MiscGameplayFunctions.SoakItemInsideParentContainingLiquidAboveThreshold(
ItemBase.Cast(cargo.GetItem(i)),
this);
109 super.OnRPC(sender, rpc_type, ctx);
111 Param1<bool> p =
new Param1<bool>(
false);
116 bool play = p.param1;
121 PlayPouringLoopSound();
123 StopPouringLoopSound();
129 PlayEmptyingLoopSound();
131 StopEmptyingLoopSound();
139 super.OnVariablesSynchronized();
147 RemoveAudioVisuals();
169 void RefreshAudioVisuals(
CookingMethodType cooking_method,
bool is_done,
bool is_empty,
bool is_burned)
171 string soundName =
"";
174 switch (cooking_method)
211 particleId = ParticleList.NONE;
223 ParticleCookingStart(particleId);
227 void RemoveAudioVisuals()
229 ParticleCookingStop();
240 ParticleCookingStop();
243 vector localPos = MiscGameplayFunctions.GetSteamPosition(GetHierarchyParent());
251 void ParticleCookingStop()
261 void PlayPouringLoopSound()
265 m_PouringLoopSound = SEffectManager.PlaySoundOnObject(GetPouringSoundset(),
this, 0, 0,
true);
269 void StopPouringLoopSound()
275 void PlayEmptyingLoopSound()
279 m_EmptyingLoopSound = SEffectManager.PlaySoundOnObject(GetEmptyingLoopSoundset(),
this, 0, 0,
true);
283 void StopEmptyingLoopSound()
288 EffectSound sound = SEffectManager.PlaySoundOnObject(GetEmptyingEndSoundset(),
this);
292 string GetEmptyingLoopSoundset()
295 string surfaceType =
g_Game.GetPlayer().GetSurfaceType();
296 string soundSet =
"";
298 bool diggable =
g_Game.IsSurfaceDigable(surfaceType);
302 soundSet = GetEmptyingLoopSoundsetHard();
306 soundSet = GetEmptyingLoopSoundsetSoft();
308 else if (
g_Game.SurfaceIsPond(pos[0], pos[2]) ||
g_Game.SurfaceIsSea(pos[0], pos[2]))
310 soundSet = GetEmptyingLoopSoundsetWater();
316 string GetEmptyingEndSoundset()
319 string surfaceType =
g_Game.GetPlayer().GetSurfaceType();
320 string soundSet =
"";
322 bool diggable =
g_Game.IsSurfaceDigable(surfaceType);
326 soundSet = GetEmptyingEndSoundsetHard();
330 soundSet = GetEmptyingEndSoundsetSoft();
332 else if (
g_Game.SurfaceIsPond(pos[0], pos[2]) ||
g_Game.SurfaceIsSea(pos[0], pos[2]))
334 soundSet = GetEmptyingEndSoundsetWater();
340 string GetPouringSoundset();
341 string GetEmptyingLoopSoundsetHard();
342 string GetEmptyingLoopSoundsetSoft();
343 string GetEmptyingLoopSoundsetWater();
344 string GetEmptyingEndSoundsetHard();
345 string GetEmptyingEndSoundsetSoft();
346 string GetEmptyingEndSoundsetWater();
349 float GetLiquidEmptyRate()
369 AddAction(ActionWashHandsItemContinuous);
ActionExtinguishFireplaceByLiquidCB ActionContinuousBaseCB ActionExtinguishFireplaceByLiquid()
void AddAction(typename actionName)
EffectSound m_PouringLoopSound
int PARTICLE_BOILING_DONE
EffectSound m_EmptyingLoopSound
int PARTICLE_DRYING_START
int PARTICLE_BAKING_START
int PARTICLE_BURNING_DONE
CookingMethodType m_CookingMethod
int PARTICLE_BOILING_EMPTY
enum SoundTypeBottle m_ParticleCooking
int PARTICLE_BOILING_START
const string SOUND_BOILING_EMPTY
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
void SoundStop()
Stops sound.
Legacy way of using particles in the game.
override void EEDelete(EntityAI parent)
override void OnVariablesSynchronized()
EConsumptionPenaltyContext
void SoundCookingStart(string sound_name)
int GetConsumptionPenaltyContext()
Serializer ParamsReadContext
class GP5GasMask extends MaskBase ItemBase
vector GetPosition()
Get the world position of the Effect.
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
void RefreshAudioVisualsOnClient(CookingMethodType cooking_method, bool is_done, bool is_empty, bool is_burned)
cooking-related effect methods
void RemoveAudioVisualsOnClient()
override int GetLiquidType()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).
override void OnRPC(ParamsReadContext ctx)