DayZ 1.24
Loading...
Searching...
No Matches
FireplaceBase Class Reference
Collaboration diagram for FireplaceBase:
[legend]

Protected Member Functions

void BarrelHoles_ColorBase ()
 
override bool CanCookOnStick ()
 
override bool IsBaseFireplace ()
 
override void CreateAreaDamage ()
 
override int GetDamageSystemVersionChange ()
 
override string GetInvulnerabilityTypeString ()
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override bool CanDetachAttachment (EntityAI parent)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override bool IsBarrelWithHoles ()
 
override void OnVariablesSynchronized ()
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanLoadAttachment (EntityAI attachment)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override bool IsPrepareToDelete ()
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanLoadItemIntoCargo (EntityAI item)
 
override bool CanReleaseCargo (EntityAI cargo)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanDisplayCargo ()
 
override bool CanDisplayAttachmentCategory (string category_name)
 
override void Open ()
 
void OpenLoad ()
 
override void Close ()
 
void CloseLoad ()
 
override bool IsOpen ()
 
void UpdateVisualState ()
 
override bool CanExtinguishFire ()
 
override bool CanShowSmoke ()
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override bool IsIgnited ()
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
void SoundBarrelOpenPlay ()
 
void SoundBarrelClosePlay ()
 
void DestroyClutterCutter (Object clutter_cutter)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 
override string GetPlaceSoundset ()
 
override void SetActions ()
 
override void OnDebugSpawn ()
 
void FireplaceIndoor ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
void SetFirePointIndex (int fire_point_index)
 
void SetSmokePointPosition (vector smoke_point_pos)
 
vector GetSmokeEffectPosition ()
 
override void ParticleSmallSmokeStart ()
 
override void ParticleNormalSmokeStart ()
 
override bool IsFireplaceIndoor ()
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanRemoveFromHands (EntityAI player)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override bool IsIgnited ()
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 
void OvenIndoor ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
void SetFirePointIndex (int fire_point_index)
 
void SetSmokePointPosition (vector smoke_point_pos)
 
vector GetSmokeEffectPosition ()
 
override void ParticleSmallSmokeStart ()
 
override void ParticleNormalSmokeStart ()
 
override bool IsIndoorOven ()
 
override bool CanReleaseAttachment (EntityAI attachment)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanRemoveFromHands (EntityAI player)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override bool IsIgnited ()
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 

Static Protected Member Functions

static int GetFirePointIndex (string action_selection)
 
static bool CanPlaceFireplaceInSelectedSpot (Object building, int fire_point_index, out vector fire_point_pos_world, out vector fire_point_rot_world)
 
static int GetFirePointIndex (string action_selection)
 
static bool CanPlaceFireplaceInSelectedSpot (Object building, int fire_point_index, out vector fire_point_pos_world, out vector fire_point_rot_world)
 

Protected Attributes

bool m_IsOpenedClient = false
 
ref OpenableBehaviour m_Openable
 
float m_SmokePosX
 
float m_SmokePosY
 
float m_SmokePosZ
 
int m_FirePointIndex = 1
 

Static Protected Attributes

static const string FIREPOINT_ACTION_SELECTION = "fireplace_action"
 
static const string FIREPOINT_FIRE_POSITION = "fireplace_point"
 
static const string FIREPOINT_PLACE_ROT = "fireplace_rot"
 
static const string FIREPOINT_SMOKE_POSITION = "fireplace_smoke"
 
static const string OVENPOINT_ACTION_SELECTION = "oven_action"
 
static const string OVENPOINT_FIRE_POSITION = "oven_point"
 
static const string OVENPOINT_PLACE_ROT = "oven_rot"
 
static const string OVENPOINT_SMOKE_POSITION = "oven_smoke"
 

Private Member Functions

void Fireplace ()
 
override bool IsBaseFireplace ()
 
override void EOnTouch (IEntity other, int extra)
 
override void EOnContact (IEntity other, Contact extra)
 
void ContactEvent (IEntity other, vector position)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanDisplayAttachmentSlot (int slot_id)
 
override bool CanLoadAttachment (EntityAI attachment)
 
override bool CanReleaseAttachment (EntityAI attachment)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override void SetCookingEquipment (ItemBase equipment)
 
override void OnBeforeTryDelete ()
 
override bool IsPrepareToDelete ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanLoadItemIntoCargo (EntityAI item)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanDisplayAttachmentCategory (string category_name)
 
override bool CanAssignAttachmentsToQuickbar ()
 
override float HeightStartCheckOverride ()
 
override bool CanShowSmoke ()
 
void DestroyClutterCutter (Object clutter_cutter)
 
override void RefreshPhysics ()
 
override void RefreshFireplacePhysics ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override bool IsIgnited ()
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 
override string GetPlaceSoundset ()
 
override void SetActions ()
 

Static Private Member Functions

static Fireplace IgniteEntityAsFireplace (notnull EntityAI entity, notnull EntityAI fire_source)
 
static bool CanIgniteEntityAsFireplace (notnull EntityAI entity)
 

Private Attributes

const string ANIMATION_OPENED = "LidOff"
 
const string ANIMATION_CLOSED = "LidOn"
 
bool m_ContactEventProcessing
 

Detailed Description

Definition at line 1 of file BarrelHoles_ColorBase.c.

Member Function Documentation

◆ AfterStoreLoad()

override void FireplaceBase::AfterStoreLoad ( )
inlineprivate

Definition at line 514 of file Fireplace.c.

515 {
516 super.AfterStoreLoad();
517
518 if (IsBurning())
519 {
520 if (!m_ClutterCutter)
521 {
523 m_ClutterCutter.SetOrientation(GetOrientation());
524 }
525 }
526 }
vector GetOrientation()
const int ECE_PLACE_ON_SURFACE
Object m_ClutterCutter
const string OBJECT_CLUTTER_CUTTER
bool IsBurning()
class JsonUndergroundAreaTriggerData GetPosition
proto native CGame GetGame()

References ECE_PLACE_ON_SURFACE, GetGame(), GetOrientation(), GetPosition, IsBurning(), m_ClutterCutter, and OBJECT_CLUTTER_CUTTER.

◆ BarrelHoles_ColorBase()

void FireplaceBase::BarrelHoles_ColorBase ( )
inlineprotected

Definition at line 11 of file BarrelHoles_ColorBase.c.

12 {
13 //Particles - default for FireplaceBase
21
22 m_Openable = new OpenableBehaviour(false);
23
24 //synchronized variables
25 RegisterNetSyncVariableBool("m_Openable.m_IsOpened");
26
27 ProcessInvulnerabilityCheck(GetInvulnerabilityTypeString());
28
29 m_LightDistance = 50;
30 }
float m_LightDistance
int PARTICLE_STEAM_END
int PARTICLE_NORMAL_FIRE
int PARTICLE_FIRE_START
int PARTICLE_NORMAL_SMOKE
int PARTICLE_FIRE_END
int PARTICLE_SMALL_SMOKE
int PARTICLE_SMALL_FIRE
ref OpenableBehaviour m_Openable
override string GetInvulnerabilityTypeString()
static const int BARREL_FIRE_STEAM_2END
static const int BARREL_SMALL_FIRE
static const int BARREL_FIRE_END
static const int BARREL_NORMAL_FIRE
static const int BARREL_SMALL_SMOKE
static const int BARREL_NORMAL_SMOKE
static const int BARREL_FIRE_START

References ParticleList::BARREL_FIRE_END, ParticleList::BARREL_FIRE_START, ParticleList::BARREL_FIRE_STEAM_2END, ParticleList::BARREL_NORMAL_FIRE, ParticleList::BARREL_NORMAL_SMOKE, ParticleList::BARREL_SMALL_FIRE, ParticleList::BARREL_SMALL_SMOKE, GetInvulnerabilityTypeString(), m_LightDistance, PARTICLE_FIRE_END, PARTICLE_FIRE_START, PARTICLE_NORMAL_FIRE, PARTICLE_NORMAL_SMOKE, PARTICLE_SMALL_FIRE, PARTICLE_SMALL_SMOKE, and PARTICLE_STEAM_END.

◆ CanAssignAttachmentsToQuickbar()

override bool FireplaceBase::CanAssignAttachmentsToQuickbar ( )
inlineprivate

Definition at line 426 of file Fireplace.c.

427 {
428 return false;
429 }

◆ CanBeIgnitedBy() [1/4]

override bool FireplaceBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprotected

Definition at line 460 of file BarrelHoles_ColorBase.c.

461 {
462 if (HasAnyKindling() && !IsBurning() && IsOpen() && !GetHierarchyParent())
463 return true;
464
465 return false;
466 }
bool HasAnyKindling()
override bool IsOpen()

References HasAnyKindling(), IsBurning(), and IsOpen().

◆ CanBeIgnitedBy() [2/4]

override bool FireplaceBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprivate

Definition at line 538 of file Fireplace.c.

539 {
540 return HasAnyKindling() && !IsBurning() && !GetHierarchyParent();
541 }

References HasAnyKindling(), and IsBurning().

◆ CanBeIgnitedBy() [3/4]

override bool FireplaceBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprotected

Definition at line 313 of file FireplaceIndoor.c.

314 {
315 if (HasAnyKindling() && !GetHierarchyParent())
316 return true;
317
318 return false;
319 }

References HasAnyKindling().

◆ CanBeIgnitedBy() [4/4]

override bool FireplaceBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprotected

Definition at line 291 of file OvenIndoor.c.

292 {
293 if (HasAnyKindling() && !GetHierarchyParent())
294 return true;
295
296 return false;
297 }

References HasAnyKindling().

◆ CanCookOnStick()

override bool FireplaceBase::CanCookOnStick ( )
inlineprotected

Definition at line 32 of file BarrelHoles_ColorBase.c.

33 {
34 return false;
35 }

◆ CanDetachAttachment()

override bool FireplaceBase::CanDetachAttachment ( EntityAI parent)
inlineprotected

Definition at line 80 of file BarrelHoles_ColorBase.c.

81 {
82 return GetNumberOfItems() == 0;
83 }
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition ItemBase.c:8059

References GetNumberOfItems().

◆ CanDisplayAttachmentCategory() [1/2]

override bool FireplaceBase::CanDisplayAttachmentCategory ( string category_name)
inlineprotected

Definition at line 362 of file BarrelHoles_ColorBase.c.

363 {
364 //super
365 if (!super.CanDisplayAttachmentCategory(category_name))
366 return false;
367 //
368
369 if ((category_name == "CookingEquipment") || (category_name == "Smoking"))
370 return !IsOpen();
371 else
372 return IsOpen();
373
374 return true;
375 }

References IsOpen().

◆ CanDisplayAttachmentCategory() [2/2]

override bool FireplaceBase::CanDisplayAttachmentCategory ( string category_name)
inlineprivate

Definition at line 404 of file Fireplace.c.

405 {
406 if (!super.CanDisplayAttachmentCategory(category_name))
407 return false;
408
409 if (IsOven())
410 {
411 if (category_name == "CookingEquipment")
412 return false;
413 if ((category_name == "DirectCooking") || (category_name == "Smoking"))
414 return true;
415 }
416 else
417 {
418 if (category_name == "CookingEquipment")
419 return true;
420 if ((category_name == "DirectCooking") || (category_name == "Smoking"))
421 return false;
422 }
423 return true;
424 }
bool IsOven()

References IsOven().

◆ CanDisplayAttachmentSlot()

override bool FireplaceBase::CanDisplayAttachmentSlot ( int slot_id)
inlineprivate

Definition at line 94 of file Fireplace.c.

95 {
97 if (super.CanDisplayAttachmentSlot(slot_id))
98 {
99 if (slot_name != "CookingEquipment" || FindAttachmentBySlotName("CookingTripod"))
100 return true;
101 }
102
103 return false;
104 }
provides access to slot configuration
static proto native owned string GetSlotName(int id)
converts slot_id to string

References InventorySlots::GetSlotName().

◆ CanDisplayCargo()

override bool FireplaceBase::CanDisplayCargo ( )
inlineprotected

Definition at line 352 of file BarrelHoles_ColorBase.c.

353 {
354 //super
355 if (!super.CanDisplayCargo())
356 return false;
357 //
358
359 return IsOpen();
360 }

References IsOpen().

◆ CanExtinguishFire()

override bool FireplaceBase::CanExtinguishFire ( )
inlineprotected

Definition at line 440 of file BarrelHoles_ColorBase.c.

441 {
442 if (IsOpen() && IsBurning())
443 return true;
444
445 return false;
446 }

References IsBurning(), and IsOpen().

◆ CanIgniteEntityAsFireplace()

static bool FireplaceBase::CanIgniteEntityAsFireplace ( notnull EntityAI entity)
inlinestaticprivate

Definition at line 680 of file Fireplace.c.

681 {
682 //check ceiling (enough space for smoke)
683 if (MiscGameplayFunctions.IsUnderRoof(entity, FireplaceBase.MIN_CEILING_HEIGHT) && IsEntityOnInteriorSurface(entity))
684 return false;
685
686 //check surface
687 if (FireplaceBase.IsEntityOnWaterSurface(entity))
688 return false;
689
690 if (!MiscGameplayFunctions.IsUnderRoof(entity))
691 return !FireplaceBase.IsRainingAboveEntity(entity);
692
693 return true;
694 }
static bool IsEntityOnInteriorSurface(notnull EntityAI entity_ai)

References IsEntityOnInteriorSurface().

◆ CanIgniteItem() [1/4]

override bool FireplaceBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Definition at line 468 of file BarrelHoles_ColorBase.c.

469 {
470 if (IsBurning() && IsOpen())
471 return true;
472
473 return false;
474 }

References IsBurning(), and IsOpen().

◆ CanIgniteItem() [2/4]

override bool FireplaceBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Definition at line 543 of file Fireplace.c.

544 {
545 return IsBurning();
546 }

References IsBurning().

◆ CanIgniteItem() [3/4]

override bool FireplaceBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Definition at line 321 of file FireplaceIndoor.c.

322 {
323 if (IsBurning())
324 return true;
325
326 return false;
327 }

References IsBurning().

◆ CanIgniteItem() [4/4]

override bool FireplaceBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Definition at line 299 of file OvenIndoor.c.

300 {
301 if (IsBurning())
302 return true;
303
304 return false;
305 }

References IsBurning().

◆ CanLoadAttachment() [1/2]

override bool FireplaceBase::CanLoadAttachment ( EntityAI attachment)
inlineprotected

Definition at line 162 of file BarrelHoles_ColorBase.c.

163 {
165
166 if (GetHealthLevel() == GameConstants.STATE_RUINED)
167 return false;
168
169 return super.CanLoadAttachment(attachment);
170 }
const int STATE_RUINED
Definition constants.c:757

References GameConstants::STATE_RUINED.

◆ CanLoadAttachment() [2/2]

override bool FireplaceBase::CanLoadAttachment ( EntityAI attachment)
inlineprivate

IsOven() &&

Definition at line 106 of file Fireplace.c.

107 {
108 if (!super.CanLoadAttachment(attachment))
109 return false;
110
112
113 //cookware
114 if ((item.Type() == ATTACHMENT_CAULDRON) || (item.Type() == ATTACHMENT_COOKING_POT))
115 {
116 //if ( IsItemTypeAttached( ATTACHMENT_TRIPOD ) /*|| IsOven()*/ )
117 return true;
118 }
119 if (item.Type() == ATTACHMENT_FRYING_PAN)
120 {
121 //if ( IsOven() )
122 return true;
123 }
124
125 // food on direct cooking slots
126 //if ( IsOven() )
127 //{
128 if (item.IsKindOf("Edible_Base"))
129 return true;
130 //}
131 //tripod
132 if (item.Type() == ATTACHMENT_TRIPOD)
133 {
134 if ( GetHierarchyParent() == NULL)
135 return true;
136 }
137
138 //stones
139 if (item.Type() == ATTACHMENT_STONES)
140 {
141 if (GetHierarchyParent() /*|| IsBurning()*/)
142 return false;
143
144 return true;
145 }
146
147 return true;
148 }
ATTACHMENT_FRYING_PAN
ATTACHMENT_CAULDRON
ATTACHMENT_STONES
ATTACHMENT_COOKING_POT
ATTACHMENT_TRIPOD

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, ATTACHMENT_STONES, and ATTACHMENT_TRIPOD.

◆ CanLoadItemIntoCargo() [1/2]

override bool FireplaceBase::CanLoadItemIntoCargo ( EntityAI item)
inlineprotected

Definition at line 317 of file BarrelHoles_ColorBase.c.

318 {
319 if (!super.CanLoadItemIntoCargo(item))
320 return false;
321
322 if (GetHealthLevel() == GameConstants.STATE_RUINED)
323 return false;
324
325 if (GetHierarchyParent())
326 return false;
327
328 return true;
329 }

References GameConstants::STATE_RUINED.

◆ CanLoadItemIntoCargo() [2/2]

override bool FireplaceBase::CanLoadItemIntoCargo ( EntityAI item)
inlineprivate

Definition at line 381 of file Fireplace.c.

382 {
383 if (!super.CanLoadItemIntoCargo(item))
384 return false;
385
386 if (GetHierarchyParent())
387 return false;
388
389 return true;
390 }

◆ CanPlaceFireplaceInSelectedSpot() [1/2]

static bool FireplaceBase::CanPlaceFireplaceInSelectedSpot ( Object building,
int fire_point_index,
out vector fire_point_pos_world,
out vector fire_point_rot_world )
inlinestaticprotected

Definition at line 99 of file FireplaceIndoor.c.

100 {
101 //Get fire point index position
102 vector fire_point_pos = building.GetSelectionPositionMS(FIREPOINT_FIRE_POSITION + fire_point_index.ToString());
103 vector fire_point_rot = building.GetSelectionPositionMS(FIREPOINT_PLACE_ROT + fire_point_index.ToString());
106
107 //check if there is any FireplaceIndoor objects near selected fire point
110 GetGame().GetObjectsAtPosition3D(fire_point_pos_world, 0.25, nearest_objects, proxy_cargos);
111
112 for (int i = 0; i < nearest_objects.Count(); ++i)
113 {
114 Object object = nearest_objects.Get(i);
115
116 if (object.IsInherited(FireplaceIndoor))
117 return false;
118 }
119
120 return true;
121 }
static const string FIREPOINT_PLACE_ROT
static const string FIREPOINT_FIRE_POSITION

References GetGame().

◆ CanPlaceFireplaceInSelectedSpot() [2/2]

static bool FireplaceBase::CanPlaceFireplaceInSelectedSpot ( Object building,
int fire_point_index,
out vector fire_point_pos_world,
out vector fire_point_rot_world )
inlinestaticprotected

Definition at line 99 of file OvenIndoor.c.

100 {
101 //Get fire point index position
102 vector fire_point_pos = building.GetSelectionPositionMS(OVENPOINT_FIRE_POSITION + fire_point_index.ToString());
103 vector fire_point_rot = building.GetSelectionPositionMS(OVENPOINT_PLACE_ROT + fire_point_index.ToString());
106
107 //check if there is any FireplaceIndoor objects near selected fire point
110 GetGame().GetObjectsAtPosition3D(fire_point_pos_world, 1, nearest_objects, proxy_cargos);
111
112 for (int i = 0; i < nearest_objects.Count(); ++i)
113 {
114 Object object = nearest_objects.Get(i);
115
116 if (object.IsInherited(OvenIndoor))
117 return false;
118 }
119
120 return true;
121 }
void OvenIndoor()
Definition OvenIndoor.c:13
static const string OVENPOINT_PLACE_ROT
Definition OvenIndoor.c:10
static const string OVENPOINT_FIRE_POSITION
Definition OvenIndoor.c:9

References GetGame().

◆ CanPutInCargo() [1/4]

override bool FireplaceBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 289 of file BarrelHoles_ColorBase.c.

290 {
291 if (!super.CanPutInCargo(parent))
292 return false;
293
295 return false;
296
297 return true;
298 }
bool DirectCookingSlotsInUse()
bool IsCargoEmpty()

References DirectCookingSlotsInUse(), IsBurning(), IsCargoEmpty(), and IsOpen().

◆ CanPutInCargo() [2/4]

override bool FireplaceBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 356 of file Fireplace.c.

357 {
358 if (!super.CanPutInCargo(parent))
359 return false;
360
361 if (HasAshes() || IsBurning() || HasStones() || HasStoneCircle() || IsOven() || !IsCargoEmpty() || HasCookingStand())
362 return false;
363
364 return true;
365 }
bool HasCookingStand()
bool HasAshes()
bool HasStones()
bool HasStoneCircle()

References HasAshes(), HasCookingStand(), HasStoneCircle(), HasStones(), IsBurning(), IsCargoEmpty(), and IsOven().

◆ CanPutInCargo() [3/4]

override bool FireplaceBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 280 of file FireplaceIndoor.c.

281 {
282 return false;
283 }

◆ CanPutInCargo() [4/4]

override bool FireplaceBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 264 of file OvenIndoor.c.

265 {
266 return false;
267 }

◆ CanPutIntoHands() [1/4]

override bool FireplaceBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 337 of file BarrelHoles_ColorBase.c.

338 {
339 if (!super.CanPutIntoHands(parent))
340 return false;
341
343 return false;
344
345 if (!GetInventory().IsAttachment() && IsOpen())
346 return false;
347
348 return true;
349 }
bool SmokingSlotsInUse()

References DirectCookingSlotsInUse(), IsBurning(), IsCargoEmpty(), IsOpen(), and SmokingSlotsInUse().

◆ CanPutIntoHands() [2/4]

override bool FireplaceBase::CanPutIntoHands ( EntityAI parent)
inlineprivate

Definition at line 393 of file Fireplace.c.

394 {
395 if (!super.CanPutIntoHands(parent))
396 return false;
397
398 if (HasAshes() || IsBurning() || HasStones() || HasStoneCircle() || IsOven() || !IsCargoEmpty() || HasCookingStand())
399 return false;
400
401 return true;
402 }

References HasAshes(), HasCookingStand(), HasStoneCircle(), HasStones(), IsBurning(), IsCargoEmpty(), and IsOven().

◆ CanPutIntoHands() [3/4]

override bool FireplaceBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 297 of file FireplaceIndoor.c.

298 {
299 return false;
300 }

◆ CanPutIntoHands() [4/4]

override bool FireplaceBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 275 of file OvenIndoor.c.

276 {
277 return false;
278 }

◆ CanReceiveAttachment() [1/2]

override bool FireplaceBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

Definition at line 140 of file BarrelHoles_ColorBase.c.

141 {
143
144 if (GetHealthLevel() == GameConstants.STATE_RUINED || GetHierarchyRootPlayer() != null)
145 return false;
146
147 //direct cooking slots
148 if (!IsOpen())
149 {
150 if ((item.Type() == ATTACHMENT_CAULDRON) || (item.Type() == ATTACHMENT_COOKING_POT) || (item.Type() == ATTACHMENT_FRYING_PAN) || (item.IsKindOf("Edible_Base")))
151 return super.CanReceiveAttachment(attachment, slotId);
152 }
153 else
154 {
155 if (IsKindling(item) || IsFuel(item))
156 return super.CanReceiveAttachment(attachment, slotId);
157 }
158
159 return false;
160 }
bool IsFuel(ItemBase item)
Returns if item attached to fireplace is fuel.
bool IsKindling(ItemBase item)
Returns if item attached to fireplace is kindling.

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, IsFuel(), IsKindling(), IsOpen(), and GameConstants::STATE_RUINED.

◆ CanReceiveAttachment() [2/2]

override bool FireplaceBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate

Definition at line 46 of file Fireplace.c.

47 {
48 if (!super.CanReceiveAttachment(attachment, slotId))
49 return false;
50
52
53 //cookware
54 if ((item.Type() == ATTACHMENT_CAULDRON) || (item.Type() == ATTACHMENT_COOKING_POT))
55 {
56 if (FindAttachmentBySlotName("CookingTripod") || IsOven())
57 return true;
58 return false;
59 }
60 if (item.Type() == ATTACHMENT_FRYING_PAN)
61 {
62 if (IsOven())
63 return true;
64 return false;
65 }
66
67 // food on direct cooking slots
68 if (item.IsKindOf("Edible_Base"))
69 {
70 if (IsOven())
71 return true;
72 return false;
73 }
74 //tripod
75
76 if (item.IsInherited(TripodBase))
77 {
78 if (!IsOven() && !GetHierarchyParent())
79 return true;
80 return false;
81 }
82
83 //stones
84 if (item.Type() == ATTACHMENT_STONES)
85 {
86 if (!GetHierarchyParent() && !IsBurning())
87 return true;
88 return false;
89 }
90
91 return true;
92 }

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, ATTACHMENT_STONES, IsBurning(), and IsOven().

◆ CanReceiveItemIntoCargo() [1/3]

override bool FireplaceBase::CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected

Definition at line 306 of file BarrelHoles_ColorBase.c.

307 {
308 if (GetHealthLevel() == GameConstants.STATE_RUINED)
309 return false;
310
311 if (!IsOpen())
312 return false;
313
314 return super.CanReceiveItemIntoCargo(item);
315 }

References IsOpen(), and GameConstants::STATE_RUINED.

◆ CanReceiveItemIntoCargo() [2/3]

override bool FireplaceBase::CanReceiveItemIntoCargo ( EntityAI item)
inlineprivate

Definition at line 373 of file Fireplace.c.

374 {
375 if (GetHierarchyParent())
376 return false;
377
378 return super.CanReceiveItemIntoCargo(item);
379 }

◆ CanReceiveItemIntoCargo() [3/3]

override bool FireplaceBase::CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected

Definition at line 291 of file FireplaceIndoor.c.

292 {
293 return super.CanReceiveItemIntoCargo(item);
294 }

◆ CanReleaseAttachment() [1/2]

override bool FireplaceBase::CanReleaseAttachment ( EntityAI attachment)
inlineprivate

Definition at line 150 of file Fireplace.c.

151 {
152 if (!super.CanReleaseAttachment(attachment))
153 return false;
154
156 //stones
157 if (item.Type() == ATTACHMENT_STONES)
158 {
159 if (IsBurning())
160 return false;
161
162 int stone_quantity = item.GetQuantity();
163 if (HasStoneCircle() && stone_quantity <= 8)
164 return false;
165
166 if (IsOven())
167 return false;
168 }
169
170 return true;
171 }

References ATTACHMENT_STONES, HasStoneCircle(), IsBurning(), and IsOven().

◆ CanReleaseAttachment() [2/2]

override bool FireplaceBase::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

Definition at line 158 of file OvenIndoor.c.

159 {
160 if (!super.CanReleaseAttachment(attachment))
161 return false;
162
164 if (IsKindling(item) || IsFuel(item))
165 return !IsBurning();
166
167 return true;
168 }

References IsBurning(), IsFuel(), and IsKindling().

◆ CanReleaseCargo()

override bool FireplaceBase::CanReleaseCargo ( EntityAI cargo)
inlineprotected

Definition at line 331 of file BarrelHoles_ColorBase.c.

332 {
333 return IsOpen();
334 }

References IsOpen().

◆ CanRemoveFromCargo() [1/4]

override bool FireplaceBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 300 of file BarrelHoles_ColorBase.c.

301 {
302 return true;
303 }

◆ CanRemoveFromCargo() [2/4]

override bool FireplaceBase::CanRemoveFromCargo ( EntityAI parent)
inlineprivate

Definition at line 367 of file Fireplace.c.

368 {
369 return true;
370 }

◆ CanRemoveFromCargo() [3/4]

override bool FireplaceBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 285 of file FireplaceIndoor.c.

286 {
287 return true;
288 }

◆ CanRemoveFromCargo() [4/4]

override bool FireplaceBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 269 of file OvenIndoor.c.

270 {
271 return true;
272 }

◆ CanRemoveFromHands() [1/2]

override bool FireplaceBase::CanRemoveFromHands ( EntityAI player)
inlineprotected

Definition at line 302 of file FireplaceIndoor.c.

303 {
304 return false;
305 }

◆ CanRemoveFromHands() [2/2]

override bool FireplaceBase::CanRemoveFromHands ( EntityAI player)
inlineprotected

Definition at line 280 of file OvenIndoor.c.

281 {
282 return false;
283 }

◆ CanShowSmoke() [1/2]

override bool FireplaceBase::CanShowSmoke ( )
inlineprotected

Definition at line 449 of file BarrelHoles_ColorBase.c.

450 {
451 return IsOpen();
452 }

References IsOpen().

Referenced by RefreshFireParticlesAndSounds().

◆ CanShowSmoke() [2/2]

override bool FireplaceBase::CanShowSmoke ( )
inlineprivate

Definition at line 437 of file Fireplace.c.

438 {
439 return !IsOven();
440 }

References IsOven().

◆ Close()

override void FireplaceBase::Close ( )
inlineprotected

Definition at line 400 of file BarrelHoles_ColorBase.c.

401 {
402 m_Openable.Close();
403 m_RoofAbove = true;
404
406 SetTakeable(true);
408 }
bool m_RoofAbove
override void SetTakeable(bool pState)
Definition ItemBase.c:8905
void SoundSynchRemote()
Definition ItemBase.c:8945

References m_RoofAbove, SetTakeable(), and SoundSynchRemote().

◆ CloseLoad()

void FireplaceBase::CloseLoad ( )
inlineprotected

Definition at line 410 of file BarrelHoles_ColorBase.c.

411 {
412 m_Openable.Close();
413 m_RoofAbove = true;
414
415 SetSynchDirty();
416 SetTakeable(true);
418 }

References m_RoofAbove, and SetTakeable().

◆ ContactEvent()

void FireplaceBase::ContactEvent ( IEntity other,
vector position )
inlineprivate

Definition at line 34 of file Fireplace.c.

35 {
36 if (GetGame().IsServer() && !m_ContactEventProcessing && dBodyIsActive(this) && !IsSetForDeletion())
37 {
39 MiscGameplayFunctions.ThrowAllItemsInInventory(this, 0);
40 CheckForDestroy();
42 }
43 }
bool m_ContactEventProcessing
Definition Fireplace.c:3
proto native bool dBodyIsActive(notnull IEntity ent)

References dBodyIsActive(), and GetGame().

Referenced by EOnContact(), and EOnTouch().

◆ CreateAreaDamage()

override void FireplaceBase::CreateAreaDamage ( )
inlineprotected

Definition at line 42 of file BarrelHoles_ColorBase.c.

43 {
45
47 m_AreaDamage.SetDamageComponentType(AreaDamageComponentTypes.HITZONE);
48 m_AreaDamage.SetExtents("-0.15 0 -0.15", "0.15 0.75 0.15");
49 m_AreaDamage.SetLoopInterval(0.5);
50 m_AreaDamage.SetDeferDuration(0.5);
51 m_AreaDamage.SetHitZones({"Head", "Torso", "LeftHand", "LeftLeg", "LeftFoot", "RightHand", "RightLeg", "RightFoot"});
52 m_AreaDamage.SetAmmoName("FireDamage");
53 m_AreaDamage.Spawn();
54 }
ref AreaDamageManager m_AreaDamage
void DestroyAreaDamage()
Deferred version of AreaDamageLooped.

References DestroyAreaDamage(), AreaDamageComponentTypes::HITZONE, and m_AreaDamage.

Referenced by OnVariablesSynchronized(), and StartHeating().

◆ DestroyClutterCutter() [1/2]

void FireplaceBase::DestroyClutterCutter ( Object clutter_cutter)
inlineprotected

Definition at line 508 of file BarrelHoles_ColorBase.c.

509 {
510 GetGame().ObjectDelete(clutter_cutter);
511 }

References GetGame().

◆ DestroyClutterCutter() [2/2]

void FireplaceBase::DestroyClutterCutter ( Object clutter_cutter)
inlineprivate

Definition at line 443 of file Fireplace.c.

444 {
445 GetGame().ObjectDelete(clutter_cutter);
446 }

References GetGame().

◆ EEItemAttached() [1/4]

override void FireplaceBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 172 of file BarrelHoles_ColorBase.c.

173 {
174 super.EEItemAttached(item, slot_name);
175
177
180
181 // direct cooking/smoking slots
182 bool edible_base_attached = false;
183 switch (slot_name)
184 {
185 case "DirectCookingA":
188 break;
189 case "DirectCookingB":
192 break;
193 case "DirectCookingC":
196 break;
197
198 case "SmokingA":
201 break;
202 case "SmokingB":
205 break;
206 case "SmokingC":
209 break;
210 case "SmokingD":
213 break;
214 }
215
216 // reset cooking time (to prevent the cooking exploit)
217 if (GetGame().IsServer() && edible_base_attached)
218 {
220 if (edBase)
221 {
222 if (edBase.GetFoodStage())
223 edBase.SetCookingTime(0);
224 }
225 }
226
228 }
void RefreshFireplaceVisuals()
void AddToFireConsumables(ItemBase item)
ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]

References AddToFireConsumables(), GetGame(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, and RefreshFireplaceVisuals().

◆ EEItemAttached() [2/4]

override void FireplaceBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 173 of file Fireplace.c.

174 {
175 super.EEItemAttached(item, slot_name);
176
178
181
182 //cookware
183 if (item_base.Type() == ATTACHMENT_COOKING_POT)
184 {
186
187 //rotate handle (if not in 'Oven' stage)
188 if (GetGame().IsServer() && !IsOven())
189 item_base.SetAnimationPhase(ANIMATION_COOKWARE_HANDLE, 0);
190 }
191 if (item.Type() == ATTACHMENT_CAULDRON)
192 {
194
195 //rotate handle (if not in 'Oven' stage)
196 if (GetGame().IsServer() && !IsOven())
197 item_base.SetAnimationPhase(ANIMATION_CAULDRON_HANDLE, 0);
198 }
199
200 // direct cooking/smoking slots
201 bool edible_base_attached = false;
202 switch (slot_name)
203 {
204 case "DirectCookingA":
207 break;
208 case "DirectCookingB":
211 break;
212 case "DirectCookingC":
215 break;
216
217 case "SmokingA":
220 break;
221 case "SmokingB":
224 break;
225 case "SmokingC":
228 break;
229 case "SmokingD":
232 break;
233 }
234
235 // reset cooking time (to prevent the cooking exploit)
236 if (GetGame().IsServer() && edible_base_attached)
237 {
239 if (edBase)
240 {
241 if (edBase.GetFoodStage())
242 edBase.SetCookingTime(0);
243 }
244 }
245
246 //TODO
247 //add SetViewIndex when attaching various attachments
248
250 }
const string ANIMATION_CAULDRON_HANDLE
const string ANIMATION_COOKWARE_HANDLE
override void SetCookingEquipment(ItemBase equipment)
Definition Fireplace.c:328

References AddToFireConsumables(), ANIMATION_CAULDRON_HANDLE, ANIMATION_COOKWARE_HANDLE, ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, GetGame(), IsFuel(), IsKindling(), IsOven(), m_DirectCookingSlots, m_SmokingSlots, RefreshFireplaceVisuals(), and SetCookingEquipment().

◆ EEItemAttached() [3/4]

override void FireplaceBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 158 of file FireplaceIndoor.c.

159 {
160 super.EEItemAttached(item, slot_name);
161
165
166 // direct cooking slots, smoking slots
167 bool edible_base_attached = false;
168 switch (slot_name)
169 {
170 case "DirectCookingA":
173 break;
174 case "DirectCookingB":
177 break;
178 case "DirectCookingC":
181 break;
182
183 case "SmokingA":
186 break;
187 case "SmokingB":
190 break;
191 case "SmokingC":
194 break;
195 case "SmokingD":
198 break;
199 }
200
201 // reset cooking time (to prevent the cooking exploit)
202 if (GetGame().IsServer() && edible_base_attached)
203 {
205 if (edBase)
206 {
207 if (edBase.GetFoodStage())
208 edBase.SetCookingTime(0);
209 }
210 }
211
213 }

References AddToFireConsumables(), GetGame(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, and RefreshFireplaceVisuals().

◆ EEItemAttached() [4/4]

override void FireplaceBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 170 of file OvenIndoor.c.

171 {
172 super.EEItemAttached(item, slot_name);
173
175
178
179 // direct cooking/smoking slots
180 bool edible_base_attached = false;
181 switch (slot_name)
182 {
183 case "DirectCookingA":
186 break;
187 case "SmokingA":
190 break;
191 case "SmokingB":
194 break;
195 }
196
197 // reset cooking time (to prevent the cooking exploit)
198 if (GetGame().IsServer() && edible_base_attached)
199 {
201 if (edBase)
202 {
203 if (edBase.GetFoodStage())
204 edBase.SetCookingTime(0);
205 }
206 }
207
209 }

References AddToFireConsumables(), GetGame(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, and RefreshFireplaceVisuals().

◆ EEItemDetached() [1/4]

override void FireplaceBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 235 of file BarrelHoles_ColorBase.c.

236 {
237 super.EEItemDetached(item, slot_name);
238
242
243 // direct cooking / smoking slots
244 switch (slot_name)
245 {
246 case "DirectCookingA":
248 break;
249 case "DirectCookingB":
251 break;
252 case "DirectCookingC":
254 break;
255
256 case "SmokingA":
257 m_SmokingSlots[0] = null;
258 break;
259 case "SmokingB":
260 m_SmokingSlots[1] = null;
261 break;
262 case "SmokingC":
263 m_SmokingSlots[2] = null;
264 break;
265 case "SmokingD":
266 m_SmokingSlots[3] = null;
267 break;
268 }
269
270 // cookware-specifics (remove audio visuals)
272 {
275 cooking_pot.RemoveAudioVisualsOnClient();
276 }
277 if (item_base.Type() == ATTACHMENT_FRYING_PAN)
278 {
280 FryingPan frying_pan = FryingPan.Cast(item);
281 frying_pan.RemoveAudioVisualsOnClient();
282 }
283
285 }
void RemoveFromFireConsumables(FireConsumable fire_consumable)
void ClearCookingEquipment()
DEPRECATED.
FireConsumable GetFireConsumableByItem(ItemBase item)

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, ClearCookingEquipment(), GetFireConsumableByItem(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, RefreshFireplaceVisuals(), and RemoveFromFireConsumables().

◆ EEItemDetached() [2/4]

override void FireplaceBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 252 of file Fireplace.c.

253 {
254 super.EEItemDetached(item, slot_name);
255
257
260
261 //cookware
262 if (item_base.Type() == ATTACHMENT_COOKING_POT)
263 {
265
266 //rotate handle
267 if (GetGame().IsServer())
268 item_base.SetAnimationPhase(ANIMATION_COOKWARE_HANDLE, 1);
269
270 //remove audio visuals
272 cooking_pot.RemoveAudioVisualsOnClient();
273 }
274 if (item_base.Type() == ATTACHMENT_CAULDRON)
275 {
277
278 //rotate handle
279 if (GetGame().IsServer())
280 item_base.SetAnimationPhase(ANIMATION_CAULDRON_HANDLE, 1);
281
282 //remove audio visuals
284 cauldron.RemoveAudioVisualsOnClient();
285 }
286 if (item_base.Type() == ATTACHMENT_FRYING_PAN)
287 {
289
290 //remove audio visuals
291 FryingPan frying_pan = FryingPan.Cast(item);
292 frying_pan.RemoveAudioVisualsOnClient();
293 }
294
295 // direct cooking/smoking slots
296 switch (slot_name)
297 {
298 case "DirectCookingA":
300 break;
301 case "DirectCookingB":
303 break;
304 case "DirectCookingC":
306 break;
307
308 case "SmokingA":
309 m_SmokingSlots[0] = null;
310 break;
311 case "SmokingB":
312 m_SmokingSlots[1] = null;
313 break;
314 case "SmokingC":
315 m_SmokingSlots[2] = null;
316 break;
317 case "SmokingD":
318 m_SmokingSlots[3] = null;
319 break;
320 }
321
322 //no attachments left, no cargo items & no ashes are present
323 CheckForDestroy();
325 }

References ANIMATION_CAULDRON_HANDLE, ANIMATION_COOKWARE_HANDLE, ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, ClearCookingEquipment(), GetFireConsumableByItem(), GetGame(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, RefreshFireplaceVisuals(), and RemoveFromFireConsumables().

◆ EEItemDetached() [3/4]

override void FireplaceBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 215 of file FireplaceIndoor.c.

216 {
217 super.EEItemDetached(item, slot_name);
218
220
223
224 CheckForDestroy();
225
226 // direct cooking/smoking slots
227 switch (slot_name)
228 {
229 case "DirectCookingA":
231 break;
232 case "DirectCookingB":
234 break;
235 case "DirectCookingC":
237 break;
238
239 case "SmokingA":
240 m_SmokingSlots[0] = null;
241 break;
242 case "SmokingB":
243 m_SmokingSlots[1] = null;
244 break;
245 case "SmokingC":
246 m_SmokingSlots[2] = null;
247 break;
248 case "SmokingD":
249 m_SmokingSlots[3] = null;
250 break;
251 }
252
253 // cookware-specifics (remove audio visuals)
254 if (item_base.Type() == ATTACHMENT_COOKING_POT)
255 {
258 cooking_pot.RemoveAudioVisualsOnClient();
259 }
260 if (item_base.Type() == ATTACHMENT_CAULDRON)
261 {
264 cauldron.RemoveAudioVisualsOnClient();
265 }
266 if (item_base.Type() == ATTACHMENT_FRYING_PAN)
267 {
269 FryingPan frying_pan = FryingPan.Cast(item);
270 frying_pan.RemoveAudioVisualsOnClient();
271 }
272
274 }

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, ClearCookingEquipment(), GetFireConsumableByItem(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, RefreshFireplaceVisuals(), and RemoveFromFireConsumables().

◆ EEItemDetached() [4/4]

override void FireplaceBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 211 of file OvenIndoor.c.

212 {
213 super.EEItemDetached(item, slot_name);
214
216
219
220 CheckForDestroy();
221
222 // direct cooking/smoking slots
223 switch (slot_name)
224 {
225 case "DirectCookingA":
227 break;
228 case "SmokingA":
229 m_SmokingSlots[0] = null;
230 break;
231
232 case "SmokingB":
233 m_SmokingSlots[1] = null;
234 break;
235 }
236
237 // cookware-specifics (remove audio visuals)
238 if (item_base.Type() == ATTACHMENT_COOKING_POT)
239 {
242 cooking_pot.RemoveAudioVisualsOnClient();
243 }
244 if (item_base.Type() == ATTACHMENT_CAULDRON)
245 {
248 cauldron.RemoveAudioVisualsOnClient();
249 }
250 if (item_base.Type() == ATTACHMENT_FRYING_PAN)
251 {
253 FryingPan frying_pan = FryingPan.Cast(item);
254 frying_pan.RemoveAudioVisualsOnClient();
255 }
256
258 }

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, ClearCookingEquipment(), GetFireConsumableByItem(), IsFuel(), IsKindling(), m_DirectCookingSlots, m_SmokingSlots, RefreshFireplaceVisuals(), and RemoveFromFireConsumables().

◆ EOnContact()

override void FireplaceBase::EOnContact ( IEntity other,
Contact extra )
inlineprivate

Definition at line 29 of file Fireplace.c.

30 {
31 ContactEvent(other, extra.Position);
32 }
void ContactEvent(IEntity other, vector position)
Definition Fireplace.c:34

References ContactEvent().

◆ EOnTouch()

override void FireplaceBase::EOnTouch ( IEntity other,
int extra )
inlineprivate

Definition at line 24 of file Fireplace.c.

25 {
27 }

References ContactEvent(), and GetPosition.

◆ Fireplace()

void FireplaceBase::Fireplace ( )
inlineprivate

Definition at line 5 of file Fireplace.c.

6 {
7 //Particles - default for FireplaceBase
15
16 SetEventMask(EntityEvent.CONTACT | EntityEvent.TOUCH);
17 }
static const int CAMP_SMALL_SMOKE
static const int CAMP_FIRE_START
static const int CAMP_NORMAL_SMOKE
static const int CAMP_STEAM_2END
static const int CAMP_SMALL_FIRE
static const int CAMP_FIRE_END
static const int CAMP_NORMAL_FIRE
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:44

References ParticleList::CAMP_FIRE_END, ParticleList::CAMP_FIRE_START, ParticleList::CAMP_NORMAL_FIRE, ParticleList::CAMP_NORMAL_SMOKE, ParticleList::CAMP_SMALL_FIRE, ParticleList::CAMP_SMALL_SMOKE, ParticleList::CAMP_STEAM_2END, PARTICLE_FIRE_END, PARTICLE_FIRE_START, PARTICLE_NORMAL_FIRE, PARTICLE_NORMAL_SMOKE, PARTICLE_SMALL_FIRE, PARTICLE_SMALL_SMOKE, and PARTICLE_STEAM_END.

◆ FireplaceIndoor()

void FireplaceBase::FireplaceIndoor ( )
inlineprotected

Definition at line 13 of file FireplaceIndoor.c.

14 {
15 //Particles - default for FireplaceBase
23
24 //register sync variables
25 RegisterNetSyncVariableFloat("m_SmokePosX", 0, 0, 2);
26 RegisterNetSyncVariableFloat("m_SmokePosY", 0, 0, 2);
27 RegisterNetSyncVariableFloat("m_SmokePosZ", 0, 0, 2);
28 RegisterNetSyncVariableInt("m_FirePointIndex", 0, 9);
29
30 m_LightDistance = 50;
31 m_RoofAbove = true;
32 }
static const int HOUSE_NORMAL_FIRE
static const int HOUSE_FIRE_STEAM_2END
static const int HOUSE_NORMAL_SMOKE
static const int HOUSE_SMALL_FIRE
static const int HOUSE_FIRE_END
static const int HOUSE_FIRE_START
static const int HOUSE_SMALL_SMOKE

References ParticleList::HOUSE_FIRE_END, ParticleList::HOUSE_FIRE_START, ParticleList::HOUSE_FIRE_STEAM_2END, ParticleList::HOUSE_NORMAL_FIRE, ParticleList::HOUSE_NORMAL_SMOKE, ParticleList::HOUSE_SMALL_FIRE, ParticleList::HOUSE_SMALL_SMOKE, m_LightDistance, m_RoofAbove, PARTICLE_FIRE_END, PARTICLE_FIRE_START, PARTICLE_NORMAL_FIRE, PARTICLE_NORMAL_SMOKE, PARTICLE_SMALL_FIRE, PARTICLE_SMALL_SMOKE, and PARTICLE_STEAM_END.

◆ GetDamageSystemVersionChange()

override int FireplaceBase::GetDamageSystemVersionChange ( )
inlineprotected

Definition at line 56 of file BarrelHoles_ColorBase.c.

57 {
58 return 110;
59 }

◆ GetFirePointIndex() [1/2]

static int FireplaceBase::GetFirePointIndex ( string action_selection)
inlinestaticprotected

Definition at line 88 of file FireplaceIndoor.c.

89 {
90 int index_location = action_selection.Length() - 1;
91 return action_selection.Substring(index_location, 1).ToInt();
92 }

◆ GetFirePointIndex() [2/2]

static int FireplaceBase::GetFirePointIndex ( string action_selection)
inlinestaticprotected

Definition at line 88 of file OvenIndoor.c.

89 {
90 int index_location = action_selection.Length() - 1;
91 return action_selection.Substring(index_location, 1).ToInt();
92 }

◆ GetInvulnerabilityTypeString()

override string FireplaceBase::GetInvulnerabilityTypeString ( )
inlineprotected

Definition at line 61 of file BarrelHoles_ColorBase.c.

62 {
63 return "disableContainerDamage";
64 }

◆ GetPlaceSoundset() [1/2]

override string FireplaceBase::GetPlaceSoundset ( )
inlineprotected

Definition at line 530 of file BarrelHoles_ColorBase.c.

531 {
532 return "placeBarrel_SoundSet";
533 }

◆ GetPlaceSoundset() [2/2]

override string FireplaceBase::GetPlaceSoundset ( )
inlineprivate

Definition at line 700 of file Fireplace.c.

701 {
702 return "placeFireplace_SoundSet";
703 }

◆ GetSmokeEffectPosition() [1/2]

vector FireplaceBase::GetSmokeEffectPosition ( )
inlineprotected

Definition at line 133 of file FireplaceIndoor.c.

134 {
136 }
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References Vector().

Referenced by ParticleNormalSmokeStart(), ParticleNormalSmokeStart(), ParticleSmallSmokeStart(), and ParticleSmallSmokeStart().

◆ GetSmokeEffectPosition() [2/2]

vector FireplaceBase::GetSmokeEffectPosition ( )
inlineprotected

Definition at line 133 of file OvenIndoor.c.

134 {
136 }

References Vector().

◆ HasFlammableMaterial() [1/4]

override bool FireplaceBase::HasFlammableMaterial ( )
inlineprotected

Definition at line 455 of file BarrelHoles_ColorBase.c.

456 {
457 return true;
458 }

◆ HasFlammableMaterial() [2/4]

override bool FireplaceBase::HasFlammableMaterial ( )
inlineprivate

Definition at line 533 of file Fireplace.c.

534 {
535 return true;
536 }

◆ HasFlammableMaterial() [3/4]

override bool FireplaceBase::HasFlammableMaterial ( )
inlineprotected

Definition at line 308 of file FireplaceIndoor.c.

309 {
310 return true;
311 }

◆ HasFlammableMaterial() [4/4]

override bool FireplaceBase::HasFlammableMaterial ( )
inlineprotected

Definition at line 286 of file OvenIndoor.c.

287 {
288 return true;
289 }

◆ HeightStartCheckOverride()

override float FireplaceBase::HeightStartCheckOverride ( )
inlineprivate

Definition at line 431 of file Fireplace.c.

432 {
433 return 0.32;
434 }

◆ IgniteEntityAsFireplace()

static Fireplace FireplaceBase::IgniteEntityAsFireplace ( notnull EntityAI entity,
notnull EntityAI fire_source )
inlinestaticprivate

Definition at line 648 of file Fireplace.c.

649 {
650 //get player
651 PlayerBase player = PlayerBase.Cast(fire_source.GetHierarchyRootPlayer());
652
653 //create fireplace
654 Fireplace fireplace = Fireplace.Cast(GetGame().CreateObjectEx("Fireplace", entity.GetPosition(), ECE_PLACE_ON_SURFACE));
655
656 //attach
657 if (!GetGame().IsMultiplayer()) //clear inventory reservation (single player)
658 {
660 entity.GetInventory().GetCurrentInventoryLocation(loc);
661 player.GetInventory().ClearInventoryReservationEx(entity, loc);
662 }
663
664 if (GetGame().IsServer() && GetGame().IsMultiplayer())
665 {
666 player.ServerTakeEntityToTargetAttachment(fireplace, entity); // multiplayer server side
667 }
668 else
669 {
670 player.LocalTakeEntityToTargetAttachment(fireplace, entity); // single player or multiplayer client side
671 }
672
673 //start fire
674 fireplace.StartFire();
675 fireplace.OnIgnitedThis(fire_source);
676
677 return fireplace;
678 }
void Fireplace()
Definition Fireplace.c:5
InventoryLocation.

References ECE_PLACE_ON_SURFACE, and GetGame().

◆ IsBarrelWithHoles()

override bool FireplaceBase::IsBarrelWithHoles ( )
inlineprotected

Definition at line 110 of file BarrelHoles_ColorBase.c.

111 {
112 return true;
113 }

Referenced by RefreshFireplaceVisuals(), and StartHeating().

◆ IsBaseFireplace() [1/2]

override bool FireplaceBase::IsBaseFireplace ( )
inlineprotected

Definition at line 37 of file BarrelHoles_ColorBase.c.

38 {
39 return true;
40 }

Referenced by OnVariablesSynchronized(), and StartHeating().

◆ IsBaseFireplace() [2/2]

override bool FireplaceBase::IsBaseFireplace ( )
inlineprivate

Definition at line 19 of file Fireplace.c.

20 {
21 return true;
22 }

◆ IsFireplaceIndoor()

override bool FireplaceBase::IsFireplaceIndoor ( )
inlineprotected

Definition at line 153 of file FireplaceIndoor.c.

154 {
155 return true;
156 }

Referenced by RefreshFireplaceVisuals(), StartFire(), StartHeating(), and StopFire().

◆ IsIgnited() [1/4]

override bool FireplaceBase::IsIgnited ( )
inlineprotected

Definition at line 476 of file BarrelHoles_ColorBase.c.

477 {
478 return IsBurning();
479 }

References IsBurning().

◆ IsIgnited() [2/4]

override bool FireplaceBase::IsIgnited ( )
inlineprivate

Definition at line 548 of file Fireplace.c.

549 {
550 return IsBurning();
551 }

References IsBurning().

◆ IsIgnited() [3/4]

override bool FireplaceBase::IsIgnited ( )
inlineprotected

Definition at line 329 of file FireplaceIndoor.c.

330 {
331 return IsBurning();
332 }

References IsBurning().

◆ IsIgnited() [4/4]

override bool FireplaceBase::IsIgnited ( )
inlineprotected

Definition at line 307 of file OvenIndoor.c.

308 {
309 return IsBurning();
310 }

References IsBurning().

◆ IsIndoorOven()

override bool FireplaceBase::IsIndoorOven ( )
inlineprotected

Definition at line 153 of file OvenIndoor.c.

154 {
155 return true;
156 }

Referenced by RefreshFireplaceVisuals().

◆ IsOpen()

override bool FireplaceBase::IsOpen ( )
inlineprotected

Definition at line 420 of file BarrelHoles_ColorBase.c.

421 {
422 return m_Openable.IsOpened();
423 }

◆ IsPrepareToDelete() [1/2]

override bool FireplaceBase::IsPrepareToDelete ( )
inlineprotected

Definition at line 230 of file BarrelHoles_ColorBase.c.

231 {
232 return false;
233 }

◆ IsPrepareToDelete() [2/2]

override bool FireplaceBase::IsPrepareToDelete ( )
inlineprivate

Definition at line 349 of file Fireplace.c.

350 {
351 return GetInventory().AttachmentCount() == 0 && !IsBurning() && !HasAshes();
352 }

References HasAshes(), and IsBurning().

◆ IsThisIgnitionSuccessful() [1/4]

override bool FireplaceBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprotected

Definition at line 513 of file BarrelHoles_ColorBase.c.

514 {
515 //check kindling
516 if (!HasAnyKindling() && IsOpen())
517 return false;
518
519 //check surface
520 if (IsOnWaterSurface())
521 return false;
522
523 return true;
524 }
bool IsOnWaterSurface()

References HasAnyKindling(), IsOnWaterSurface(), and IsOpen().

◆ IsThisIgnitionSuccessful() [2/4]

override bool FireplaceBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprivate

Definition at line 588 of file Fireplace.c.

589 {
590 SetIgniteFailure(false);
592
593 //check kindling
594 if (!HasAnyKindling())
595 return false;
596
597 //check roof
598 if (!IsOven())
599 {
601 return false;
602 }
603
604 //check surface
605 if (IsOnWaterSurface())
606 return false;
607
608 //check wetness
609 if (IsWet())
610 {
611 SetIgniteFailure(true);
612
614 GetGame().RPCSingleParam(this, FirePlaceFailure.WET, failure, true);
615 return false;
616 }
617
618 // check if the fireplace isnt below a roof
619 // excluding this check whein oven stage
620 if (!IsOven() && !MiscGameplayFunctions.IsUnderRoof(this))
621 {
622 // if not, check if there is strong rain or wind
623 if (IsRainingAbove())
624 {
625 SetIgniteFailure(true);
626
628 GetGame().RPCSingleParam(this, FirePlaceFailure.WET, failure, true);
629 return false;
630 }
631
632 if (IsWindy())
633 {
634 SetIgniteFailure(true);
635
637 GetGame().RPCSingleParam(this, FirePlaceFailure.WIND, failure, true);
638 return false;
639 }
640 }
641
642 return true;
643 }
bool IsCeilingHighEnoughForSmoke()
bool IsRainingAbove()
static bool IsWindy()
bool GetIgniteFailure()
bool IsOnInteriorSurface()
bool IsWet()
void SetIgniteFailure(bool failure)

References GetGame(), GetIgniteFailure(), HasAnyKindling(), IsCeilingHighEnoughForSmoke(), IsOnInteriorSurface(), IsOnWaterSurface(), IsOven(), IsRainingAbove(), IsWet(), IsWindy(), and SetIgniteFailure().

◆ IsThisIgnitionSuccessful() [3/4]

override bool FireplaceBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprotected

Definition at line 344 of file FireplaceIndoor.c.

345 {
346 SetIgniteFailure(false);
348
349 //check kindling
350 if (!HasAnyKindling())
351 return false;
352
353 //check wetness
354 if (IsWet())
355 {
356 SetIgniteFailure(true);
357
359 GetGame().RPCSingleParam(this, FirePlaceFailure.WET, failure, true);
360 return false;
361 }
362
363 return true;
364 }

References GetGame(), GetIgniteFailure(), HasAnyKindling(), IsWet(), and SetIgniteFailure().

◆ IsThisIgnitionSuccessful() [4/4]

override bool FireplaceBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprotected

Definition at line 322 of file OvenIndoor.c.

323 {
324 //check kindling
325 if (!HasAnyKindling())
326 return false;
327
328 //check wetness
329 if (IsWet())
330 return false;
331
332 return true;
333 }

References HasAnyKindling(), and IsWet().

◆ OnBeforeTryDelete()

override void FireplaceBase::OnBeforeTryDelete ( )
inlineprivate

Definition at line 342 of file Fireplace.c.

343 {
344 super.OnBeforeTryDelete();
345
346 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
347 }
Container_Base m_HalfExtents

References m_HalfExtents.

◆ OnDebugSpawn()

override void FireplaceBase::OnDebugSpawn ( )
inlineprotected

Definition at line 546 of file BarrelHoles_ColorBase.c.

547 {
548 m_Openable.Open();
549 super.OnDebugSpawn();
550 m_Openable.Close();
551 }

◆ OnIgnitedTarget() [1/4]

override void FireplaceBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprotected

Definition at line 481 of file BarrelHoles_ColorBase.c.

482 {
483 }

◆ OnIgnitedTarget() [2/4]

override void FireplaceBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 553 of file Fireplace.c.

554 {
555 }

◆ OnIgnitedTarget() [3/4]

override void FireplaceBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprotected

Definition at line 334 of file FireplaceIndoor.c.

335 {
336 }

◆ OnIgnitedTarget() [4/4]

override void FireplaceBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprotected

Definition at line 312 of file OvenIndoor.c.

313 {
314 }

◆ OnIgnitedThis() [1/4]

override void FireplaceBase::OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Definition at line 485 of file BarrelHoles_ColorBase.c.

486 {
487 //remove grass
489 cc_object.SetOrientation(GetOrientation());
490 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(DestroyClutterCutter, 0.2, false, cc_object);
491
492 //start fire
493 StartFire();
494 }
void StartFire(bool force_start=false)
void DestroyClutterCutter(Object clutter_cutter)
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

References CALL_CATEGORY_GAMEPLAY, ECE_PLACE_ON_SURFACE, GetGame(), GetOrientation(), GetPosition, OBJECT_CLUTTER_CUTTER, and StartFire().

Referenced by OnAction().

◆ OnIgnitedThis() [2/4]

override void FireplaceBase::OnIgnitedThis ( EntityAI fire_source)
inlineprivate

Definition at line 557 of file Fireplace.c.

558 {
559 //remove grass
561 cc_object.SetOrientation(GetOrientation());
562 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(DestroyClutterCutter, 200, false, cc_object);
563
564 //start fire
565 StartFire();
566
567 if (fire_source)
568 {
569 Man player = fire_source.GetHierarchyRootPlayer();
570
571 if (player)
572 {
574
575 if (fire_source.ClassName() == "Matchbox")
576 ignate_type = EFireIgniteType.Matchbox;
577 else if (fire_source.ClassName() == "Roadflare")
578 ignate_type = EFireIgniteType.Roadflare;
579 else if (fire_source.ClassName() == "HandDrillKit")
580 ignate_type = EFireIgniteType.HandDrill;
581
582
584 }
585 }
586 }
EFireIgniteType
static void SendPlayerIgnatedFireplace(Man player, EFireIgniteType ignite_type)
Definition SyncEvents.c:77

References CALL_CATEGORY_GAMEPLAY, ECE_PLACE_ON_SURFACE, GetGame(), GetOrientation(), GetPosition, OBJECT_CLUTTER_CUTTER, SyncEvents::SendPlayerIgnatedFireplace(), and StartFire().

◆ OnIgnitedThis() [3/4]

override void FireplaceBase::OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Definition at line 338 of file FireplaceIndoor.c.

339 {
340 //start fire
341 StartFire();
342 }

References StartFire().

◆ OnIgnitedThis() [4/4]

override void FireplaceBase::OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Definition at line 316 of file OvenIndoor.c.

317 {
318 //start fire
319 StartFire();
320 }

References StartFire().

◆ OnStoreLoad() [1/4]

override bool FireplaceBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 93 of file BarrelHoles_ColorBase.c.

94 {
95 if (!super.OnStoreLoad(ctx, version))
96 return false;
97
98 bool opened;
99 if (version >= 110 && !ctx.Read(opened))
100 return false;
101
102 if (opened)
103 OpenLoad();
104 else
105 CloseLoad();
106
107 return true;
108 }

◆ OnStoreLoad() [2/4]

override bool FireplaceBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 491 of file Fireplace.c.

492 {
493 if (!super.OnStoreLoad(ctx, version))
494 return false;
495
496 if (version >= 110)
497 {
498 // read stone circle state
499 if (!ctx.Read(m_HasStoneCircle))
500 {
501 m_HasStoneCircle = false;
502 return false;
503 }
504 // read stone oven state
505 if (!ctx.Read(m_IsOven))
506 {
507 m_IsOven = false;
508 return false;
509 }
510 }
511 return true;
512 }
bool m_HasStoneCircle
bool m_IsOven

References m_HasStoneCircle, and m_IsOven.

◆ OnStoreLoad() [3/4]

override bool FireplaceBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 50 of file FireplaceIndoor.c.

51 {
52 if (!super.OnStoreLoad(ctx, version))
53 return false;
54
55 //--- Fireplace Indoor data ---
56 //fire point name
57 if (!ctx.Read(m_FirePointIndex))
58 {
59 m_FirePointIndex = 1; //set default
60 return false;
61 }
62
63 //smoke position
64 if (!ctx.Read(m_SmokePosX))
65 {
66 m_SmokePosX = 0; //set default
67 return false;
68 }
69 if (!ctx.Read(m_SmokePosY))
70 {
71 m_SmokePosY = 0; //set default
72 return false;
73 }
74 if (!ctx.Read(m_SmokePosZ))
75 {
76 m_SmokePosZ = 0; //set default
77 return false;
78 }
79 //---
80
81 return true;
82 }

References m_FirePointIndex.

◆ OnStoreLoad() [4/4]

override bool FireplaceBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 50 of file OvenIndoor.c.

51 {
52 if (!super.OnStoreLoad(ctx, version))
53 return false;
54
55 //--- Fireplace Indoor data ---
56 //fire point name
57 if (!ctx.Read(m_FirePointIndex))
58 {
59 m_FirePointIndex = 1; //set default
60 return false;
61 }
62
63 //smoke position
64 if (!ctx.Read(m_SmokePosX))
65 {
66 m_SmokePosX = 0; //set default
67 return false;
68 }
69 if (!ctx.Read(m_SmokePosY))
70 {
71 m_SmokePosY = 0; //set default
72 return false;
73 }
74 if (!ctx.Read(m_SmokePosZ))
75 {
76 m_SmokePosZ = 0; //set default
77 return false;
78 }
79 //---
80
81 return true;
82 }

References m_FirePointIndex.

◆ OnStoreSave() [1/4]

override void FireplaceBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 86 of file BarrelHoles_ColorBase.c.

87 {
88 super.OnStoreSave(ctx);
89
90 ctx.Write(m_Openable.IsOpened());
91 }

◆ OnStoreSave() [2/4]

override void FireplaceBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprivate

Definition at line 477 of file Fireplace.c.

478 {
479 super.OnStoreSave(ctx);
480
481 if (GetGame().SaveVersion() >= 110)
482 {
483 // save stone circle state
484 ctx.Write(m_HasStoneCircle);
485
486 // save stone oven state
487 ctx.Write(m_IsOven);
488 }
489 }

References GetGame(), m_HasStoneCircle, and m_IsOven.

◆ OnStoreSave() [3/4]

override void FireplaceBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 37 of file FireplaceIndoor.c.

38 {
39 super.OnStoreSave(ctx);
40
41 //fire point name
42 ctx.Write(m_FirePointIndex);
43
44 //smoke position
45 ctx.Write(m_SmokePosX);
46 ctx.Write(m_SmokePosY);
47 ctx.Write(m_SmokePosZ);
48 }

References m_FirePointIndex.

◆ OnStoreSave() [4/4]

override void FireplaceBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 37 of file OvenIndoor.c.

38 {
39 super.OnStoreSave(ctx);
40
41 //fire point name
42 ctx.Write(m_FirePointIndex);
43
44 //smoke position
45 ctx.Write(m_SmokePosX);
46 ctx.Write(m_SmokePosY);
47 ctx.Write(m_SmokePosZ);
48 }

References m_FirePointIndex.

◆ OnVariablesSynchronized()

override void FireplaceBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 115 of file BarrelHoles_ColorBase.c.

116 {
117 super.OnVariablesSynchronized();
118
119 if (!IsBeingPlaced())
120 {
121 //Refresh particles and sounds
123
124 //sound sync
126 {
127 if (IsOpen())
129
130 if (!IsOpen())
132 }
133
134 }
135
137 }
void RefreshFireParticlesAndSounds(bool force_refresh)
override bool IsBeingPlaced()
Definition ItemBase.c:5625
bool IsSoundSynchRemote()
Definition ItemBase.c:8952
bool m_Initialized

References IsBeingPlaced(), IsOpen(), IsSoundSynchRemote(), m_Initialized, and RefreshFireParticlesAndSounds().

◆ OnWasAttached()

override void FireplaceBase::OnWasAttached ( EntityAI parent,
int slot_id )
inlineprotected

Definition at line 66 of file BarrelHoles_ColorBase.c.

67 {
68 super.OnWasAttached(parent, slot_id);
69
70 Open();
71 }
override void Open()

References Open().

◆ OnWasDetached()

override void FireplaceBase::OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected

Definition at line 73 of file BarrelHoles_ColorBase.c.

74 {
75 super.OnWasDetached(parent, slot_id);
76
77 Close();
78 }
override void Close()

References Close().

◆ Open()

override void FireplaceBase::Open ( )
inlineprotected

Definition at line 379 of file BarrelHoles_ColorBase.c.

380 {
381 m_Openable.Open();
382
383 m_RoofAbove = false;
384
386 SetTakeable(false);
388 }

References m_RoofAbove, SetTakeable(), and SoundSynchRemote().

◆ OpenLoad()

void FireplaceBase::OpenLoad ( )
inlineprotected

Definition at line 390 of file BarrelHoles_ColorBase.c.

391 {
392 m_Openable.Open();
393 m_RoofAbove = false;
394
395 SetSynchDirty();
396 SetTakeable(false);
398 }

References m_RoofAbove, and SetTakeable().

◆ OvenIndoor()

void FireplaceBase::OvenIndoor ( )
inlineprotected

Definition at line 13 of file OvenIndoor.c.

14 {
15 //Particles - default for FireplaceBase
23
24 //register sync variables
25 RegisterNetSyncVariableFloat("m_SmokePosX", 0, 0, 2);
26 RegisterNetSyncVariableFloat("m_SmokePosY", 0, 0, 2);
27 RegisterNetSyncVariableFloat("m_SmokePosZ", 0, 0, 2);
28 RegisterNetSyncVariableInt("m_FirePointIndex", 0, 9);
29
30 m_LightDistance = 50;
31 m_RoofAbove = true;
32 }
static const int OVEN_NORMAL_FIRE
static const int OVEN_SMALL_FIRE
static const int OVEN_FIRE_START
static const int OVEN_FIRE_END

References ParticleList::BARREL_FIRE_STEAM_2END, ParticleList::HOUSE_NORMAL_SMOKE, ParticleList::HOUSE_SMALL_SMOKE, m_LightDistance, m_RoofAbove, ParticleList::OVEN_FIRE_END, ParticleList::OVEN_FIRE_START, ParticleList::OVEN_NORMAL_FIRE, ParticleList::OVEN_SMALL_FIRE, PARTICLE_FIRE_END, PARTICLE_FIRE_START, PARTICLE_NORMAL_FIRE, PARTICLE_NORMAL_SMOKE, PARTICLE_SMALL_FIRE, PARTICLE_SMALL_SMOKE, and PARTICLE_STEAM_END.

◆ ParticleNormalSmokeStart() [1/2]

override void FireplaceBase::ParticleNormalSmokeStart ( )
inlineprotected

Definition at line 145 of file FireplaceIndoor.c.

146 {
148 }
Particle m_ParticleNormalSmoke
void PlayParticle(int particle_id=-1)
Method to tell the particle to start playing.
vector GetSmokeEffectPosition()

References GetSmokeEffectPosition(), m_ParticleNormalSmoke, PARTICLE_NORMAL_SMOKE, and PlayParticle().

Referenced by RefreshFireParticlesAndSounds().

◆ ParticleNormalSmokeStart() [2/2]

override void FireplaceBase::ParticleNormalSmokeStart ( )
inlineprotected

◆ ParticleSmallSmokeStart() [1/2]

override void FireplaceBase::ParticleSmallSmokeStart ( )
inlineprotected

◆ ParticleSmallSmokeStart() [2/2]

override void FireplaceBase::ParticleSmallSmokeStart ( )
inlineprotected

◆ RefreshFireplacePhysics()

override void FireplaceBase::RefreshFireplacePhysics ( )
inlineprivate

Definition at line 471 of file Fireplace.c.

472 {
474 }
override void RefreshPhysics()
Definition Fireplace.c:448

References RefreshPhysics().

Referenced by OnItemLocationChanged(), and RefreshFireplaceVisuals().

◆ RefreshPhysics()

override void FireplaceBase::RefreshPhysics ( )
inlineprivate

Definition at line 448 of file Fireplace.c.

449 {
450 super.RefreshPhysics();
451
452 //Oven
453 if (IsOven())
454 {
455 RemoveProxyPhysics(ANIMATION_OVEN);
456 AddProxyPhysics(ANIMATION_OVEN);
457 }
458 else
459 RemoveProxyPhysics(ANIMATION_OVEN);
460
461 //Tripod
463 {
464 RemoveProxyPhysics(ANIMATION_TRIPOD);
465 AddProxyPhysics(ANIMATION_TRIPOD);
466 }
467 else
468 RemoveProxyPhysics(ANIMATION_TRIPOD);
469 }
const string ANIMATION_OVEN
const string ANIMATION_TRIPOD
bool IsItemTypeAttached(typename item_type)

References ANIMATION_OVEN, ANIMATION_TRIPOD, ATTACHMENT_TRIPOD, IsItemTypeAttached(), and IsOven().

Referenced by RefreshFireplacePhysics().

◆ SetActions() [1/2]

◆ SetActions() [2/2]

override void FireplaceBase::SetActions ( )
inlineprivate

Definition at line 705 of file Fireplace.c.

706 {
707 super.SetActions();
708
718 }
ActionBuildOvenCB ActionContinuousBaseCB ActionBuildOven()
ActionBuildStoneCircleCB ActionContinuousBaseCB ActionBuildStoneCircle()
ActionDismantleOvenCB ActionContinuousBaseCB ActionDismantleOven()
ActionDismantleStoneCircleCB ActionContinuousBaseCB ActionDismantleStoneCircle()

References ActionBuildOven(), ActionBuildStoneCircle(), ActionDismantleOven(), ActionDismantleStoneCircle(), and AddAction().

◆ SetCookingEquipment()

override void FireplaceBase::SetCookingEquipment ( ItemBase equipment)
inlineprivate

Definition at line 328 of file Fireplace.c.

329 {
330 super.SetCookingEquipment(equipment);
331
332 TripodBase stand = TripodBase.Cast(FindAttachmentBySlotName("CookingTripod"));
333 if (stand)
334 {
335 if (equipment)
336 stand.LockToParent();
337 else
338 stand.UnlockFromParent();
339 }
340 }

Referenced by ClearCookingEquipment(), ClearCookingEquipment(), EEItemAttached(), and EEItemAttached().

◆ SetFirePointIndex() [1/2]

void FireplaceBase::SetFirePointIndex ( int fire_point_index)
inlineprotected

Definition at line 94 of file FireplaceIndoor.c.

References m_FirePointIndex.

◆ SetFirePointIndex() [2/2]

void FireplaceBase::SetFirePointIndex ( int fire_point_index)
inlineprotected

Definition at line 94 of file OvenIndoor.c.

References m_FirePointIndex.

◆ SetSmokePointPosition() [1/2]

void FireplaceBase::SetSmokePointPosition ( vector smoke_point_pos)
inlineprotected

Definition at line 123 of file FireplaceIndoor.c.

◆ SetSmokePointPosition() [2/2]

void FireplaceBase::SetSmokePointPosition ( vector smoke_point_pos)
inlineprotected

Definition at line 123 of file OvenIndoor.c.

◆ SoundBarrelClosePlay()

void FireplaceBase::SoundBarrelClosePlay ( )
inlineprotected

Definition at line 502 of file BarrelHoles_ColorBase.c.

503 {
504 EffectSound sound = SEffectManager.PlaySound("barrel_close_SoundSet", GetPosition());
505 sound.SetAutodestroy(true);
506 }
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
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.

References GetPosition, and SEffectManager::PlaySound().

◆ SoundBarrelOpenPlay()

void FireplaceBase::SoundBarrelOpenPlay ( )
inlineprotected

Definition at line 496 of file BarrelHoles_ColorBase.c.

497 {
498 EffectSound sound = SEffectManager.PlaySound("barrel_open_SoundSet", GetPosition());
499 sound.SetAutodestroy(true);
500 }

References GetPosition, and SEffectManager::PlaySound().

◆ UpdateVisualState()

void FireplaceBase::UpdateVisualState ( )
inlineprotected

Definition at line 425 of file BarrelHoles_ColorBase.c.

426 {
427 if (IsOpen())
428 {
429 SetAnimationPhase(ANIMATION_OPENED, 0);
430 SetAnimationPhase(ANIMATION_CLOSED, 1);
431 }
432 else
433 {
434 SetAnimationPhase(ANIMATION_OPENED, 1);
435 SetAnimationPhase(ANIMATION_CLOSED, 0);
436 }
437 }
const string ANIMATION_CLOSED
const string ANIMATION_OPENED

References IsOpen().

Member Data Documentation

◆ ANIMATION_CLOSED

const string FireplaceBase::ANIMATION_CLOSED = "LidOn"
private

Definition at line 5 of file BarrelHoles_ColorBase.c.

◆ ANIMATION_OPENED

const string FireplaceBase::ANIMATION_OPENED = "LidOff"
private

Definition at line 4 of file BarrelHoles_ColorBase.c.

◆ FIREPOINT_ACTION_SELECTION

const string FireplaceBase::FIREPOINT_ACTION_SELECTION = "fireplace_action"
staticprotected

Definition at line 8 of file FireplaceIndoor.c.

◆ FIREPOINT_FIRE_POSITION

const string FireplaceBase::FIREPOINT_FIRE_POSITION = "fireplace_point"
staticprotected

Definition at line 9 of file FireplaceIndoor.c.

◆ FIREPOINT_PLACE_ROT

const string FireplaceBase::FIREPOINT_PLACE_ROT = "fireplace_rot"
staticprotected

Definition at line 10 of file FireplaceIndoor.c.

◆ FIREPOINT_SMOKE_POSITION

const string FireplaceBase::FIREPOINT_SMOKE_POSITION = "fireplace_smoke"
staticprotected

Definition at line 11 of file FireplaceIndoor.c.

◆ m_ContactEventProcessing

bool FireplaceBase::m_ContactEventProcessing
private

Definition at line 3 of file Fireplace.c.

◆ m_FirePointIndex

int FireplaceBase::m_FirePointIndex = 1
protected

Definition at line 6 of file FireplaceIndoor.c.

◆ m_IsOpenedClient

bool FireplaceBase::m_IsOpenedClient = false
protected

Definition at line 7 of file BarrelHoles_ColorBase.c.

◆ m_Openable

ref OpenableBehaviour FireplaceBase::m_Openable
protected

Definition at line 9 of file BarrelHoles_ColorBase.c.

◆ m_SmokePosX

float FireplaceBase::m_SmokePosX
protected

Definition at line 3 of file FireplaceIndoor.c.

◆ m_SmokePosY

float FireplaceBase::m_SmokePosY
protected

Definition at line 4 of file FireplaceIndoor.c.

◆ m_SmokePosZ

float FireplaceBase::m_SmokePosZ
protected

Definition at line 5 of file FireplaceIndoor.c.

◆ OVENPOINT_ACTION_SELECTION

const string FireplaceBase::OVENPOINT_ACTION_SELECTION = "oven_action"
staticprotected

Definition at line 8 of file OvenIndoor.c.

◆ OVENPOINT_FIRE_POSITION

const string FireplaceBase::OVENPOINT_FIRE_POSITION = "oven_point"
staticprotected

Definition at line 9 of file OvenIndoor.c.

◆ OVENPOINT_PLACE_ROT

const string FireplaceBase::OVENPOINT_PLACE_ROT = "oven_rot"
staticprotected

Definition at line 10 of file OvenIndoor.c.

◆ OVENPOINT_SMOKE_POSITION

const string FireplaceBase::OVENPOINT_SMOKE_POSITION = "oven_smoke"
staticprotected

Definition at line 11 of file OvenIndoor.c.


The documentation for this class was generated from the following files: