36 if (
GetGame().IsServer() && !m_ContactEventProcessing &&
dBodyIsActive(
this) && !IsSetForDeletion() )
38 m_ContactEventProcessing =
true;
39 MiscGameplayFunctions.ThrowAllItemsInInventory(
this, 0);
41 m_ContactEventProcessing =
false;
48 if ( !super.CanReceiveAttachment(attachment, slotId) )
56 if ( FindAttachmentBySlotName(
"CookingTripod" ) ||
IsOven() )
68 if ( item.IsKindOf(
"Edible_Base" ) )
78 if (!
IsOven() && !GetHierarchyParent())
86 if ( !GetHierarchyParent() && !
IsBurning() )
97 if ( super.CanDisplayAttachmentSlot(slot_id) )
99 if ( slot_name !=
"CookingEquipment" || FindAttachmentBySlotName(
"CookingTripod" ) )
108 if ( !super.CanLoadAttachment(attachment) )
128 if ( item.IsKindOf(
"Edible_Base" ) )
134 if ( GetHierarchyParent() == NULL )
141 if ( GetHierarchyParent() )
152 if (!super.CanReleaseAttachment(attachment))
166 int stone_quantity = item.GetQuantity();
183 super.EEItemAttached(item, slot_name);
215 bool edible_base_attached =
false;
218 case "DirectCookingA":
220 edible_base_attached =
true;
222 case "DirectCookingB":
224 edible_base_attached =
true;
226 case "DirectCookingC":
228 edible_base_attached =
true;
233 edible_base_attached =
true;
237 edible_base_attached =
true;
241 edible_base_attached =
true;
245 edible_base_attached =
true;
250 if (
GetGame().IsServer() && edible_base_attached)
255 if (edBase.GetFoodStage())
257 edBase.SetCookingTime(0);
270 super.EEItemDetached(item, slot_name);
292 cooking_pot.RemoveAudioVisualsOnClient();
306 cauldron.RemoveAudioVisualsOnClient();
313 FryingPan frying_pan = FryingPan.Cast(item);
314 frying_pan.RemoveAudioVisualsOnClient();
320 case "DirectCookingA":
323 case "DirectCookingB":
326 case "DirectCookingC":
356 super.SetCookingEquipment(equipment);
363 stand.LockToParent();
367 stand.UnlockFromParent();
375 super.OnBeforeTryDelete();
376 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(
this,
m_HalfExtents);
388 if (!super.CanPutInCargo(parent))
409 if ( GetHierarchyParent() )
412 return super.CanReceiveItemIntoCargo( item );
417 if (!super.CanLoadItemIntoCargo( item ))
420 if ( GetHierarchyParent() )
429 if (!super.CanPutIntoHands(parent))
444 if ( !super.CanDisplayAttachmentCategory( category_name ) )
449 if ( category_name ==
"CookingEquipment" )
451 if ( ( category_name ==
"DirectCooking" ) || ( category_name ==
"Smoking" ) )
456 if ( category_name ==
"CookingEquipment" )
458 if ( ( category_name ==
"DirectCooking" ) || ( category_name ==
"Smoking" ) )
488 super.RefreshPhysics();
521 super.OnStoreSave(ctx);
523 if (
GetGame().SaveVersion() >= 110 )
535 if ( !super.OnStoreLoad(ctx, version) )
538 if ( version >= 110 )
558 super.AfterStoreLoad();
611 Man player = fire_source.GetHierarchyRootPlayer();
617 if ( fire_source.ClassName() ==
"Matchbox" )
621 else if ( fire_source.ClassName() ==
"Roadflare" )
625 else if ( fire_source.ClassName() ==
"HandDrillKit" )
639 Param1<bool> failure;
674 if ( !
IsOven() && !MiscGameplayFunctions.IsUnderRoof(
this ) )
711 if ( !
GetGame().IsMultiplayer() )
714 entity.GetInventory().GetCurrentInventoryLocation( loc );
715 player.GetInventory().ClearInventoryReservationEx( entity, loc );
720 player.ServerTakeEntityToTargetAttachment( fireplace, entity );
724 player.LocalTakeEntityToTargetAttachment( fireplace, entity );
728 fireplace.StartFire();
729 fireplace.OnIgnitedThis(fire_source);
748 if (!MiscGameplayFunctions.IsUnderRoof(entity))
760 return "placeFireplace_SoundSet";
ActionBuildOvenCB ActionContinuousBaseCB ActionBuildOven()
ActionBuildStoneCircleCB ActionContinuousBaseCB ActionBuildStoneCircle()
ActionDismantleOvenCB ActionContinuousBaseCB ActionDismantleOven()
ActionDismantleStoneCircleCB ActionContinuousBaseCB ActionDismantleStoneCircle()
void AddAction(typename actionName)
const int ECE_PLACE_ON_SURFACE
Container_Base m_HalfExtents
void RefreshFireplaceVisuals()
static bool IsEntityOnInteriorSurface(notnull EntityAI entity_ai)
const string ANIMATION_OVEN
protected int PARTICLE_SMALL_FIRE
protected ItemBase m_SmokingSlots[SMOKING_SLOT_COUNT]
bool IsCeilingHighEnoughForSmoke()
protected Object m_ClutterCutter
protected void RemoveFromFireConsumables(FireConsumable fire_consumable)
protected bool IsFuel(ItemBase item)
Returns if item attached to fireplace is fuel.
protected bool m_HasStoneCircle
const string OBJECT_CLUTTER_CUTTER
const string ANIMATION_CAULDRON_HANDLE
protected int PARTICLE_FIRE_END
const string ANIMATION_TRIPOD
protected int PARTICLE_SMALL_SMOKE
protected FireConsumable GetFireConsumableByItem(ItemBase item)
protected int PARTICLE_FIRE_START
protected int PARTICLE_NORMAL_FIRE
bool IsOnInteriorSurface()
protected void AddToFireConsumables(ItemBase item)
protected int PARTICLE_STEAM_END
void StartFire(bool force_start=false)
void SetIgniteFailure(bool failure)
protected bool IsKindling(ItemBase item)
Returns if item attached to fireplace is kindling.
const string ANIMATION_COOKWARE_HANDLE
protected int PARTICLE_NORMAL_SMOKE
void ClearCookingEquipment()
DEPRECATED.
bool IsItemTypeAttached(typename item_type)
protected ItemBase m_DirectCookingSlots[DIRECT_COOKING_SLOT_COUNT]
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)
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
override bool CanDisplayAttachmentCategory(string category_name)
override float HeightStartCheckOverride()
override void OnIgnitedTarget(EntityAI ignited_item)
override bool IsBaseFireplace()
override void RefreshFireplacePhysics()
override void EOnContact(IEntity other, Contact extra)
override void SetCookingEquipment(ItemBase equipment)
override void OnStoreSave(ParamsWriteContext ctx)
override bool CanReceiveItemIntoCargo(EntityAI item)
bool m_ContactEventProcessing
override void EOnTouch(IEntity other, int extra)
override bool CanLoadItemIntoCargo(EntityAI item)
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
override void RefreshPhysics()
override bool CanPutInCargo(EntityAI parent)
static Fireplace IgniteEntityAsFireplace(notnull EntityAI entity, notnull EntityAI fire_source)
override bool IsIgnited()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayAttachmentSlot(int slot_id)
override void EEItemDetached(EntityAI item, string slot_name)
override void OnIgnitedThis(EntityAI fire_source)
override string GetPlaceSoundset()
override bool CanIgniteItem(EntityAI ignite_target=NULL)
override void AfterStoreLoad()
override bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
override void OnBeforeTryDelete()
override bool CanPutIntoHands(EntityAI parent)
override bool CanAssignAttachmentsToQuickbar()
override bool CanRemoveFromCargo(EntityAI parent)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override bool HasFlammableMaterial()
override void EEItemAttached(EntityAI item, string slot_name)
override bool IsPrepareToDelete()
void DestroyClutterCutter(Object clutter_cutter)
void ContactEvent(IEntity other, vector position)
override bool CanShowSmoke()
static bool CanIgniteEntityAsFireplace(notnull EntityAI entity)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanLoadAttachment(EntityAI attachment)
override void SetActions()
provides access to slot configuration
static proto native owned string GetSlotName(int id)
converts slot_id to string
static const int CAMP_FIRE_START
static const int CAMP_FIRE_END
static const int CAMP_NORMAL_FIRE
static const int CAMP_NORMAL_SMOKE
static const int CAMP_SMALL_FIRE
static const int CAMP_STEAM_2END
static const int CAMP_SMALL_SMOKE
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)
static void SendPlayerIgnatedFireplace(Man player, EFireIgniteType ignite_type)
proto native CGame GetGame()
EntityEvent
Entity events for event-mask, or throwing event from code.
proto native bool dBodyIsActive(notnull IEntity ent)