4 const string ANIMATION_OPENED =
"LidOff";
5 const string ANIMATION_CLOSED =
"LidOn";
7 protected bool m_IsOpenedClient =
false;
25 RegisterNetSyncVariableBool(
"m_Openable.m_IsOpened");
65 m_AreaDamage.SetExtents(
"-0.15 0 -0.15",
"0.15 0.75 0.15");
68 m_AreaDamage.SetHitZones({
"Head",
"Torso",
"LeftHand",
"LeftLeg",
"LeftFoot",
"RightHand",
"RightLeg",
"RightFoot"});
80 return "disableContainerDamage";
85 super.OnWasAttached(parent, slot_id);
92 super.OnWasDetached(parent, slot_id);
105 super.OnStoreSave(ctx);
107 ctx.Write(m_Openable.IsOpened());
112 if (!super.OnStoreLoad(ctx, version))
116 if (version >= 110 && !ctx.Read(opened))
140 super.OnVariablesSynchronized();
142 if (!IsBeingPlaced())
156 if (GetHealthLevel() ==
GameConstants.STATE_RUINED || GetHierarchyRootPlayer() != null)
164 return super.CanReceiveAttachment(attachment, slotId);
171 return super.CanReceiveAttachment(attachment, slotId);
190 super.EEItemAttached(item, slot_name);
200 bool edible_base_attached =
false;
203 case "DirectCookingA":
205 edible_base_attached =
true;
207 case "DirectCookingB":
209 edible_base_attached =
true;
211 case "DirectCookingC":
213 edible_base_attached =
true;
218 edible_base_attached =
true;
222 edible_base_attached =
true;
226 edible_base_attached =
true;
230 edible_base_attached =
true;
244 super.EEItemDetached(item, slot_name);
255 case "DirectCookingA":
258 case "DirectCookingB":
261 case "DirectCookingC":
279 if (item_base.IsCookware())
282 item_base.RemoveAudioVisualsOnClient();
285 if (item_base.IsLiquidContainer())
286 item_base.RemoveAudioVisualsOnClient();
295 if (!super.CanPutInCargo(parent))
318 return super.CanReceiveItemIntoCargo(item);
323 if (!super.CanLoadItemIntoCargo(item))
340 if (!super.CanPutIntoHands(parent))
350 if (!GetInventory().IsAttachment() &&
IsOpen())
362 if (!super.CanDisplayCargo())
374 if (!super.CanDisplayAttachmentCategory(category_name))
380 if ((category_name ==
"CookingEquipment") || (category_name ==
"Smoking"))
430 return m_Openable.IsOpened();
437 SetAnimationPhase(ANIMATION_OPENED, 0);
438 SetAnimationPhase(ANIMATION_CLOSED, 1);
442 SetAnimationPhase(ANIMATION_OPENED, 1);
443 SetAnimationPhase(ANIMATION_CLOSED, 0);
512 GetGame().ObjectDelete(clutter_cutter);
534 return "barrel_open_SoundSet";
539 return "barrel_close_SoundSet";
544 return "placeBarrel_SoundSet";
549 super.InitItemSounds();
553 if (GetBarrelOpenSoundset() !=
string.
Empty)
554 handler.AddSound(SoundConstants.ITEM_BARREL_OPEN, GetBarrelOpenSoundset());
556 if (GetBarrelCloseSoundset() !=
string.
Empty)
557 handler.AddSound(SoundConstants.ITEM_BARREL_CLOSE, GetBarrelCloseSoundset());
574 super.OnDebugSpawn();
ActionPlaceObjectCB ActiondeployObjectCB ActionPlaceObject()
void AddAction(typename actionName)
override string GetInvulnerabilityTypeString()
const int ECE_PLACE_ON_SURFACE
Open
Implementations only.
Deferred version of AreaDamageLooped.
override bool CanDetachAttachment(EntityAI parent)
ref OpenableBehaviour m_Openable
override bool CanExtinguishFire()
void InitializeTemperatureSources()
override void SetActions()
override bool CanCookOnStick()
override bool IsBaseFireplace()
void SoundBarrelOpenPlay()
override bool CanIgniteItem(EntityAI ignite_target=NULL)
override void EEItemAttached(EntityAI item, string slot_name)
override bool IsPrepareToDelete()
override bool CanDisplayCargo()
override bool CanPutIntoHands(EntityAI parent)
string GetBarrelCloseSoundset()
override bool CanShowSmoke()
void DestroyClutterCutter(Object clutter_cutter)
override bool CanReleaseCargo(EntityAI cargo)
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
void BarrelHoles_ColorBase()
override bool HasFlammableMaterial()
override bool CanPutInCargo(EntityAI parent)
override void OnIgnitedTarget(EntityAI target_item)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override void OnDebugSpawn()
override bool CanLoadAttachment(EntityAI attachment)
override bool IsIgnited()
override void OnWasAttached(EntityAI parent, int slot_id)
override void OnIgnitedThis(EntityAI fire_source)
override void CreateAreaDamage()
override string GetInvulnerabilityTypeString()
override bool CanReceiveItemIntoCargo(EntityAI item)
override void OnVariablesSynchronized()
string GetBarrelOpenSoundset()
override bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
void SoundBarrelClosePlay()
override void InitItemSounds()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override void EEItemDetached(EntityAI item, string slot_name)
override bool CanRemoveFromCargo(EntityAI parent)
override void OnWasDetached(EntityAI parent, int slot_id)
override void OnStoreSave(ParamsWriteContext ctx)
override string GetDeploySoundset()
override bool CanDisplayAttachmentCategory(string category_name)
override bool IsBarrelWithHoles()
override int GetDamageSystemVersionChange()
override bool CanLoadItemIntoCargo(EntityAI item)
override bool CanLoadAttachment(EntityAI attachment)
Serialization general interface. Serializer API works with:
original Timer deletes m_params which is unwanted
void RefreshFireplaceVisuals()
void RemoveFromFireConsumables(FireConsumable fire_consumable)
ref UniversalTemperatureSourceSettings m_UTSSettings
bool DirectCookingSlotsInUse()
ref UnderObjectDecalSpawnSettings m_UnderObjectDecalSpawnSettings
void AddToFireConsumables(ItemBase item)
const string OBJECT_CLUTTER_CUTTER
bool IsFuel(ItemBase item)
Returns if item attached to fireplace is fuel.
void RefreshFireParticlesAndSounds(bool force_refresh)
ref AreaDamageManager m_AreaDamage
const float PARAM_SMALL_FIRE_TEMPERATURE
int PARTICLE_NORMAL_SMOKE
void StartFire(bool force_start=false)
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
ref UniversalTemperatureSourceLambdaFireplace m_UTSLFireplace
ref UniversalTemperatureSource m_UTSource
void ClearCookingEquipment()
DEPRECATED.
FireConsumable GetFireConsumableByItem(ItemBase item)
ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
bool IsKindling(ItemBase item)
Returns if item attached to fireplace is kindling.
bool m_ThawnSurfaceUnderSupport
size of wetness increment (per FP heating tick) added to overall FP wetness when ignited on wet surfa...
const float PARAM_OUTDOOR_FIRE_TEMPERATURE
maximum fireplace temperature of a normal fire (degree Celsius)
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
ItemSoundHandler GetItemSoundHandler()
override void SetTakeable(bool pState)
void ItemSoundHandler(ItemBase parent)