|
Dayz
1.11.153731
Dayz Code Explorer by Zeroy
|
Go to the documentation of this file.
4 const string ANIMATION_OPENED =
"LidOff";
5 const string ANIMATION_CLOSED =
"LidOn";
6 const int SOUND_NONE = -1;
7 const int SOUND_OPENING = 0;
8 const int SOUND_CLOSING = 1;
10 protected bool m_IsOpenedClient =
false;
34 m_LastSoundPlayed = SOUND_NONE;
52 super.OnStoreSave( ctx );
54 ctx.
Write( m_Openable.IsOpened() );
59 if ( !super.OnStoreLoad( ctx,
version ) )
87 super.OnVariablesSynchronized();
97 if (
IsOpen() && m_LastSoundPlayed != SOUND_OPENING )
100 SoundBarrelOpenPlay();
103 if ( !
IsOpen() && m_LastSoundPlayed != SOUND_CLOSING )
106 SoundBarrelClosePlay();
111 m_LastSoundPlayed = SOUND_NONE;
139 return super.CanReceiveAttachment(attachment, slotId);
161 if( !super.CanReleaseAttachment( attachment ) )
216 super.EEItemAttached( item, slot_name );
228 bool edible_base_attached =
false;
231 case "DirectCookingA":
233 edible_base_attached =
true;
236 case "DirectCookingB":
238 edible_base_attached =
true;
241 case "DirectCookingC":
243 edible_base_attached =
true;
248 edible_base_attached =
true;
253 edible_base_attached =
true;
258 edible_base_attached =
true;
263 edible_base_attached =
true;
268 if (
GetGame().IsServer() && edible_base_attached )
273 if ( edBase.GetFoodStage() )
274 edBase.SetCookingTime( 0 );
284 super.EEItemDetached ( item, slot_name );
298 case "DirectCookingA":
302 case "DirectCookingB":
306 case "DirectCookingC":
332 if ( item_base.IsKindOf(
"Edible_Base" ) )
335 food_on_dcs.MakeSoundsOnClient(
false );
342 cooking_pot.RemoveAudioVisualsOnClient();
346 FryingPan frying_pan = FryingPan.Cast( item );
347 frying_pan.RemoveAudioVisualsOnClient();
358 if ( !super.CanPutInCargo( parent ) )
381 return super.CanReceiveItemIntoCargo( item );
392 return super.CanLoadItemIntoCargo( item );
403 if ( !super.CanPutIntoHands( parent ) )
416 if( !super.CanDisplayCargo() )
428 if( !super.CanDisplayAttachmentCategory( category_name ) )
434 if ( ( category_name ==
"CookingEquipment" ) || ( category_name ==
"Smoking" ) )
474 return m_Openable.IsOpened();
481 SetAnimationPhase( ANIMATION_OPENED, 0 );
482 SetAnimationPhase( ANIMATION_CLOSED, 1 );
486 SetAnimationPhase( ANIMATION_OPENED, 1 );
487 SetAnimationPhase( ANIMATION_CLOSED, 0 );
547 cc_object.SetOrientation ( GetOrientation() );
558 m_LastSoundPlayed = SOUND_OPENING;
565 m_LastSoundPlayed = SOUND_CLOSING;
602 return "placeBarrel_SoundSet";
static const int BARREL_SMALL_SMOKE
static const int BARREL_FIRE_START
proto native CGame GetGame()
protected FireConsumable GetFireConsumableByItem(ItemBase item)
override bool CanReleaseAttachment(EntityAI attachment)
void BarrelHoles_ColorBase()
override void OnIgnitedThis(EntityAI fire_source)
protected int PARTICLE_NORMAL_SMOKE
override bool CanPutIntoHands(EntityAI parent)
override bool CanPutInCargo(EntityAI parent)
bool DirectCookingSlotsInUse()
void Open()
Implementations only.
bool IsSoundSynchRemote()
proto native void ObjectDelete(Object obj)
protected ref OpenableBehaviour m_Openable
void DestroyClutterCutter(Object clutter_cutter)
const string OBJECT_CLUTTER_CUTTER
static const int BARREL_SMALL_FIRE
void AddAction(typename actionName)
proto native Man GetHierarchyRootPlayer()
Returns root of current hierarchy cast to Man.
override string GetPlaceSoundset()
override bool CanIgniteItem(EntityAI ignite_target=NULL)
ScriptCallQueue GetCallQueue(int call_category)
Returns CallQueue for certain category.
protected ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
protected void AddToFireConsumables(ItemBase item)
override void EEItemAttached(EntityAI item, string slot_name)
override bool CanRemoveFromCargo(EntityAI parent)
override bool CanLoadAttachment(EntityAI attachment)
override void EEItemDetached(EntityAI item, string slot_name)
override void OnStoreSave(ParamsWriteContext ctx)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
protected int PARTICLE_FIRE_START
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
bool HasLastFuelKindlingAttached()
override bool CanDisplayAttachmentCategory(string category_name)
static const int BARREL_FIRE_END
proto bool Write(void value_out)
Serialization general interface.
override void SetActions()
override bool IsBarrelWithHoles()
void RefreshFireplaceVisuals()
proto native EntityAI GetHierarchyParent()
Returns direct parent of current entity.
protected void UpdateVisualState()
protected int PARTICLE_FIRE_END
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
void SoundBarrelClosePlay()
override bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
override bool CanShowSmoke()
static const int BARREL_NORMAL_FIRE
protected float m_LightDistance
protected bool IsKindling(ItemBase item)
override bool HasFlammableMaterial()
proto native void RegisterNetSyncVariableBool(string variableName)
static const int BARREL_NORMAL_SMOKE
override bool CanLoadAttachment(EntityAI attachment)
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
override bool CanLoadItemIntoCargo(EntityAI item)
override void OnVariablesSynchronized()
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 holded in memory until th...
protected void RemoveFromFireConsumables(FireConsumable fire_consumable)
override bool CanReleaseCargo(EntityAI cargo)
void ProcessInvulnerabilityCheck(string servercfg_param)
override void OnIgnitedTarget(EntityAI ignited_item)
protected int PARTICLE_STEAM_END
override bool CanDisplayCargo()
protected int PARTICLE_SMALL_SMOKE
proto bool Read(void value_in)
void SoundBarrelOpenPlay()
override bool CanReceiveItemIntoCargo(EntityAI item)
protected bool IsFuel(ItemBase item)
const int ECE_PLACE_ON_SURFACE
protected int m_LastSoundPlayed
protected void RefreshFireParticlesAndSounds(bool force_refresh)
void StartFire(bool force_start=false)
protected int PARTICLE_SMALL_FIRE
override int GetDamageSystemVersionChange()
override bool CanExtinguishFire()
protected int PARTICLE_NORMAL_FIRE
override bool IsIgnited()
protected bool m_RoofAbove
Base native class of all vehicles in game.
override bool OnStoreLoad(ParamsReadContext ctx, int version)
protected ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
void SetSoundAutodestroy(bool auto_destroy)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
static const int BARREL_FIRE_STEAM_2END