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)
223 ParticleCookingStart(particleId);
227 void RemoveAudioVisuals()
229 ParticleCookingStop();
240 ParticleCookingStop();
243 vector localPos = MiscGameplayFunctions.GetSteamPosition(GetHierarchyParent());
251 void ParticleCookingStop()
261 void PlayPouringLoopSound()
269 void StopPouringLoopSound()
275 void PlayEmptyingLoopSound()
283 void StopEmptyingLoopSound()
292 string GetEmptyingLoopSoundset()
296 string soundSet =
"";
302 soundSet = GetEmptyingLoopSoundsetHard();
306 soundSet = GetEmptyingLoopSoundsetSoft();
308 else if (
GetGame().SurfaceIsPond(pos[0], pos[2]) ||
GetGame().SurfaceIsSea(pos[0], pos[2]))
310 soundSet = GetEmptyingLoopSoundsetWater();
316 string GetEmptyingEndSoundset()
320 string soundSet =
"";
326 soundSet = GetEmptyingEndSoundsetHard();
330 soundSet = GetEmptyingEndSoundsetSoft();
332 else if (
GetGame().SurfaceIsPond(pos[0], pos[2]) ||
GetGame().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()
374 override void OnDebugSpawn()
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
bool IsSurfaceDigable(string surface)
Checks if the surface is digable.
represents base for cargo storage for entities
Super root of all classes in Enforce script.
string GetSurfaceType(SurfaceAnimationBone limbType)
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.
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
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.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
override void EEDelete(EntityAI parent)
override void OnVariablesSynchronized()
EConsumptionPenaltyContext
void SoundCookingStart(string sound_name)
int GetConsumptionPenaltyContext()
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
void RefreshAudioVisualsOnClient(CookingMethodType cooking_method, bool is_done, bool is_empty, bool is_burned)
cooking-related effect methods
void RemoveAudioVisualsOnClient()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
override void OnRPC(ParamsReadContext ctx)