4 const string ANIMATION_OPENED =
"LidOff";
5 const string ANIMATION_CLOSED =
"LidOn";
7 protected bool m_IsOpenedClient =
false;
25 RegisterNetSyncVariableBool(
"m_Openable.m_IsOpened");
39 return "disableContainerDamage";
44 super.OnWasAttached(parent, slot_id);
51 super.OnWasDetached(parent, slot_id);
64 super.OnStoreSave( ctx );
66 ctx.
Write( m_Openable.IsOpened() );
71 if ( !super.OnStoreLoad( ctx, version ) )
75 if ( version >= 110 && !ctx.
Read( opened ) )
99 super.OnVariablesSynchronized();
111 SoundBarrelOpenPlay();
116 SoundBarrelClosePlay();
145 return super.CanReceiveAttachment(attachment, slotId);
164 super.EEItemAttached(item, slot_name);
174 bool edible_base_attached =
false;
177 case "DirectCookingA":
179 edible_base_attached =
true;
181 case "DirectCookingB":
183 edible_base_attached =
true;
185 case "DirectCookingC":
187 edible_base_attached =
true;
192 edible_base_attached =
true;
196 edible_base_attached =
true;
200 edible_base_attached =
true;
204 edible_base_attached =
true;
209 if (
GetGame().IsServer() && edible_base_attached)
214 if (edBase.GetFoodStage())
216 edBase.SetCookingTime(0);
231 super.EEItemDetached(item, slot_name);
242 case "DirectCookingA":
245 case "DirectCookingB":
248 case "DirectCookingC":
271 cooking_pot.RemoveAudioVisualsOnClient();
276 FryingPan frying_pan = FryingPan.Cast(item);
277 frying_pan.RemoveAudioVisualsOnClient();
287 if ( !super.CanPutInCargo( parent ) )
310 return super.CanReceiveItemIntoCargo( item );
315 if (!super.CanLoadItemIntoCargo( item ))
321 if ( GetHierarchyParent() )
335 if (!super.CanPutIntoHands(parent))
345 if ( !GetInventory().IsAttachment() &&
IsOpen() )
357 if( !super.CanDisplayCargo() )
369 if( !super.CanDisplayAttachmentCategory( category_name ) )
375 if ( ( category_name ==
"CookingEquipment" ) || ( category_name ==
"Smoking" ) )
432 return m_Openable.IsOpened();
439 SetAnimationPhase( ANIMATION_OPENED, 0 );
440 SetAnimationPhase( ANIMATION_CLOSED, 1 );
444 SetAnimationPhase( ANIMATION_OPENED, 1 );
445 SetAnimationPhase( ANIMATION_CLOSED, 0 );
552 return "placeBarrel_SoundSet";
569 super.OnDebugSpawn();
void AddAction(typename actionName)
override string GetInvulnerabilityTypeString()
const int ECE_PLACE_ON_SURFACE
void RefreshFireplaceVisuals()
bool DirectCookingSlotsInUse()
protected int PARTICLE_SMALL_FIRE
protected ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
protected void RemoveFromFireConsumables(FireConsumable fire_consumable)
protected bool IsFuel(ItemBase item)
Returns if item attached to fireplace is fuel.
const string OBJECT_CLUTTER_CUTTER
protected int PARTICLE_FIRE_END
protected int PARTICLE_SMALL_SMOKE
protected FireConsumable GetFireConsumableByItem(ItemBase item)
protected int PARTICLE_FIRE_START
protected int PARTICLE_NORMAL_FIRE
protected bool m_RoofAbove
protected void AddToFireConsumables(ItemBase item)
protected int PARTICLE_STEAM_END
void StartFire(bool force_start=false)
protected float m_LightDistance
protected bool IsKindling(ItemBase item)
Returns if item attached to fireplace is kindling.
protected int PARTICLE_NORMAL_SMOKE
void ClearCookingEquipment()
DEPRECATED.
protected void RefreshFireParticlesAndSounds(bool force_refresh)
protected ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
override bool IsBeingPlaced()
override void SetTakeable(bool pState)
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
void Open()
Implementations only.
bool IsSoundSynchRemote()
protected bool m_Initialized
class JsonUndergroundAreaTriggerData GetPosition
proto native void ObjectDelete(Object obj)
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
override ScriptCallQueue GetCallQueue(int call_category)
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
override void OnDebugSpawn()
override bool CanDisplayAttachmentCategory(string category_name)
override bool IsBarrelWithHoles()
override void OnIgnitedTarget(EntityAI ignited_item)
override bool CanDisplayCargo()
override void OnStoreSave(ParamsWriteContext ctx)
void SoundBarrelOpenPlay()
override bool CanReceiveItemIntoCargo(EntityAI item)
void BarrelHoles_ColorBase()
override bool CanLoadItemIntoCargo(EntityAI item)
override bool CanExtinguishFire()
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
override bool CanPutInCargo(EntityAI parent)
override bool IsIgnited()
void SoundBarrelClosePlay()
override bool CanReleaseCargo(EntityAI cargo)
override void EEItemDetached(EntityAI item, string slot_name)
override void OnIgnitedThis(EntityAI fire_source)
override int GetDamageSystemVersionChange()
override string GetPlaceSoundset()
override bool CanIgniteItem(EntityAI ignite_target=NULL)
override bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
override void OnWasDetached(EntityAI parent, int slot_id)
override bool CanPutIntoHands(EntityAI parent)
override bool CanRemoveFromCargo(EntityAI parent)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override bool HasFlammableMaterial()
protected ref OpenableBehaviour m_Openable
override void EEItemAttached(EntityAI item, string slot_name)
override bool IsPrepareToDelete()
void DestroyClutterCutter(Object clutter_cutter)
override void OnWasAttached(EntityAI parent, int slot_id)
override bool CanShowSmoke()
override void OnVariablesSynchronized()
protected void UpdateVisualState()
override bool CanDetachAttachment(EntityAI parent)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanLoadAttachment(EntityAI attachment)
override string GetInvulnerabilityTypeString()
override void SetActions()
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanLoadAttachment(EntityAI attachment)
static const int BARREL_NORMAL_SMOKE
static const int BARREL_NORMAL_FIRE
static const int BARREL_FIRE_END
static const int BARREL_FIRE_START
static const int BARREL_SMALL_SMOKE
static const int BARREL_SMALL_FIRE
static const int BARREL_FIRE_STEAM_2END
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
proto void CallLater(func fn, int delay=0, bool repeat=false, 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 ...
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
proto native CGame GetGame()