3 bool m_ContactEventProcessing;
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":
352 super.SetCookingEquipment(equipment);
358 stand.LockToParent();
360 stand.UnlockFromParent();
364 override void OnBeforeTryDelete()
366 super.OnBeforeTryDelete();
368 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(
this,
m_HalfExtents);
380 if (!super.CanPutInCargo(parent))
401 if ( GetHierarchyParent() )
404 return super.CanReceiveItemIntoCargo( item );
409 if (!super.CanLoadItemIntoCargo( item ))
412 if ( GetHierarchyParent() )
421 if (!super.CanPutIntoHands(parent))
436 if ( !super.CanDisplayAttachmentCategory( category_name ) )
441 if ( category_name ==
"CookingEquipment" )
443 if ( ( category_name ==
"DirectCooking" ) || ( category_name ==
"Smoking" ) )
448 if ( category_name ==
"CookingEquipment" )
450 if ( ( category_name ==
"DirectCooking" ) || ( category_name ==
"Smoking" ) )
456 override bool CanAssignAttachmentsToQuickbar()
461 override float HeightStartCheckOverride()
473 void DestroyClutterCutter(
Object clutter_cutter )
475 GetGame().ObjectDelete( clutter_cutter );
480 super.RefreshPhysics();
513 super.OnStoreSave(ctx);
515 if (
GetGame().SaveVersion() >= 110 )
527 if ( !super.OnStoreLoad(ctx, version) )
530 if ( version >= 110 )
550 super.AfterStoreLoad();
577 override bool CanIgniteItem(
EntityAI ignite_target = NULL)
582 override bool IsIgnited()
587 override void OnIgnitedTarget(
EntityAI ignited_item )
603 Man player = fire_source.GetHierarchyRootPlayer();
609 if ( fire_source.ClassName() ==
"Matchbox" )
613 else if ( fire_source.ClassName() ==
"Roadflare" )
617 else if ( fire_source.ClassName() ==
"HandDrillKit" )
623 SyncEvents.SendPlayerIgnatedFireplace( player, ignate_type );
628 override bool IsThisIgnitionSuccessful(
EntityAI item_source = NULL )
631 Param1<bool> failure;
660 GetGame().RPCSingleParam(
this, FirePlaceFailure.WET, failure,
true );
666 if ( !
IsOven() && !MiscGameplayFunctions.IsUnderRoof(
this ) )
674 GetGame().RPCSingleParam(
this, FirePlaceFailure.WET, failure,
true );
683 GetGame().RPCSingleParam(
this, FirePlaceFailure.WIND, failure,
true );
694 static Fireplace IgniteEntityAsFireplace( notnull
EntityAI entity, notnull
EntityAI fire_source )
703 if ( !
GetGame().IsMultiplayer() )
706 entity.GetInventory().GetCurrentInventoryLocation( loc );
707 player.GetInventory().ClearInventoryReservationEx( entity, loc );
712 player.ServerTakeEntityToTargetAttachment( fireplace, entity );
716 player.LocalTakeEntityToTargetAttachment( fireplace, entity );
720 fireplace.StartFire();
721 fireplace.OnIgnitedThis(fire_source);
726 static bool CanIgniteEntityAsFireplace(notnull
EntityAI entity)
729 if (MiscGameplayFunctions.IsUnderRoof(entity,
FireplaceBase.MIN_CEILING_HEIGHT) && IsEntityOnInteriorSurface(entity))
740 if (!MiscGameplayFunctions.IsUnderRoof(entity))
752 return "placeFireplace_SoundSet";