DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
Fireplace.c
Go to the documentation of this file.
1class Fireplace extends FireplaceBase
2{
4
5 void Fireplace()
6 {
7 //Particles - default for FireplaceBase
15
16 SetEventMask( EntityEvent.CONTACT | EntityEvent.TOUCH );
17 }
18
19 override bool IsBaseFireplace()
20 {
21 return true;
22 }
23
24 override void EOnTouch( IEntity other, int extra )
25 {
26 ContactEvent( other, GetPosition() );
27 }
28
29 override void EOnContact( IEntity other, Contact extra )
30 {
31 ContactEvent( other, extra.Position );
32 }
33
34 void ContactEvent( IEntity other, vector position )
35 {
36 if ( GetGame().IsServer() && !m_ContactEventProcessing && dBodyIsActive(this) && !IsSetForDeletion() )
37 {
38 m_ContactEventProcessing = true;
39 MiscGameplayFunctions.ThrowAllItemsInInventory(this, 0);
40 CheckForDestroy();
41 m_ContactEventProcessing = false;
42 }
43 }
44
45 //attachments
46 override bool CanReceiveAttachment( EntityAI attachment, int slotId )
47 {
48 if ( !super.CanReceiveAttachment(attachment, slotId) )
49 return false;
50
51 ItemBase item = ItemBase.Cast( attachment );
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 }
93
94 override bool CanDisplayAttachmentSlot( int slot_id )
95 {
96 string slot_name = InventorySlots.GetSlotName(slot_id);
97 if ( super.CanDisplayAttachmentSlot(slot_id) )
98 {
99 if ( slot_name != "CookingEquipment" || FindAttachmentBySlotName( "CookingTripod" ) )
100 return true;
101 }
102
103 return false;
104 }
105
106 override bool CanLoadAttachment( EntityAI attachment )
107 {
108 if ( !super.CanLoadAttachment(attachment) )
109 return false;
110
111 ItemBase item = ItemBase.Cast( attachment );
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 }
149
150 override bool CanReleaseAttachment( EntityAI attachment )
151 {
152 if (!super.CanReleaseAttachment(attachment))
153 {
154 return false;
155 }
156
157 ItemBase item = ItemBase.Cast(attachment);
158 //stones
159 if (item.Type() == ATTACHMENT_STONES)
160 {
161 if (IsBurning())
162 {
163 return false;
164 }
165
166 int stone_quantity = item.GetQuantity();
167 if (HasStoneCircle() && stone_quantity <= 8)
168 {
169 return false;
170 }
171
172 if (IsOven())
173 {
174 return false;
175 }
176 }
177
178 return true;
179 }
180
181 override void EEItemAttached(EntityAI item, string slot_name)
182 {
183 super.EEItemAttached(item, slot_name);
184
185 ItemBase item_base = ItemBase.Cast(item);
186
187 if (IsKindling(item_base) || IsFuel(item_base))
188 {
189 AddToFireConsumables(item_base);
190 }
191
192 //cookware
193 if (item_base.Type() == ATTACHMENT_COOKING_POT)
194 {
195 SetCookingEquipment(item_base);
196
197 //rotate handle (if not in 'Oven' stage)
198 if (GetGame().IsServer() && !IsOven())
199 {
200 item_base.SetAnimationPhase(ANIMATION_COOKWARE_HANDLE, 0);
201 }
202 }
203 if (item.Type() == ATTACHMENT_CAULDRON)
204 {
205 SetCookingEquipment(item_base);
206
207 //rotate handle (if not in 'Oven' stage)
208 if (GetGame().IsServer() && !IsOven())
209 {
210 item_base.SetAnimationPhase(ANIMATION_CAULDRON_HANDLE, 0);
211 }
212 }
213
214 // direct cooking/smoking slots
215 bool edible_base_attached = false;
216 switch (slot_name)
217 {
218 case "DirectCookingA":
219 m_DirectCookingSlots[0] = item_base;
220 edible_base_attached = true;
221 break;
222 case "DirectCookingB":
223 m_DirectCookingSlots[1] = item_base;
224 edible_base_attached = true;
225 break;
226 case "DirectCookingC":
227 m_DirectCookingSlots[2] = item_base;
228 edible_base_attached = true;
229 break;
230
231 case "SmokingA":
232 m_SmokingSlots[0] = item_base;
233 edible_base_attached = true;
234 break;
235 case "SmokingB":
236 m_SmokingSlots[1] = item_base;
237 edible_base_attached = true;
238 break;
239 case "SmokingC":
240 m_SmokingSlots[2] = item_base;
241 edible_base_attached = true;
242 break;
243 case "SmokingD":
244 m_SmokingSlots[3] = item_base;
245 edible_base_attached = true;
246 break;
247 }
248
249 // reset cooking time (to prevent the cooking exploit)
250 if (GetGame().IsServer() && edible_base_attached)
251 {
252 Edible_Base edBase = Edible_Base.Cast(item_base);
253 if (edBase)
254 {
255 if (edBase.GetFoodStage())
256 {
257 edBase.SetCookingTime(0);
258 }
259 }
260 }
261
262 //TODO
263 //add SetViewIndex when attaching various attachments
264
266 }
267
268 override void EEItemDetached(EntityAI item, string slot_name)
269 {
270 super.EEItemDetached(item, slot_name);
271
272 ItemBase item_base = ItemBase.Cast(item);
273
274 if (IsKindling(item_base) || IsFuel(item_base))
275 {
277 }
278
279 //cookware
280 if (item_base.Type() == ATTACHMENT_COOKING_POT)
281 {
282 ClearCookingEquipment(item_base);
283
284 //rotate handle
285 if (GetGame().IsServer())
286 {
287 item_base.SetAnimationPhase(ANIMATION_COOKWARE_HANDLE, 1);
288 }
289
290 //remove audio visuals
291 Bottle_Base cooking_pot = Bottle_Base.Cast(item);
292 cooking_pot.RemoveAudioVisualsOnClient();
293 }
294 if (item_base.Type() == ATTACHMENT_CAULDRON)
295 {
296 ClearCookingEquipment(item_base);
297
298 //rotate handle
299 if (GetGame().IsServer())
300 {
301 item_base.SetAnimationPhase(ANIMATION_CAULDRON_HANDLE, 1);
302 }
303
304 //remove audio visuals
305 Bottle_Base cauldron = Bottle_Base.Cast( item );
306 cauldron.RemoveAudioVisualsOnClient();
307 }
308 if (item_base.Type() == ATTACHMENT_FRYING_PAN)
309 {
310 ClearCookingEquipment(item_base);
311
312 //remove audio visuals
313 FryingPan frying_pan = FryingPan.Cast(item);
314 frying_pan.RemoveAudioVisualsOnClient();
315 }
316
317 // direct cooking/smoking slots
318 switch (slot_name)
319 {
320 case "DirectCookingA":
321 m_DirectCookingSlots[0] = null;
322 break;
323 case "DirectCookingB":
324 m_DirectCookingSlots[1] = null;
325 break;
326 case "DirectCookingC":
327 m_DirectCookingSlots[2] = null;
328 break;
329
330 case "SmokingA":
331 m_SmokingSlots[0] = null;
332 break;
333 case "SmokingB":
334 m_SmokingSlots[1] = null;
335 break;
336 case "SmokingC":
337 m_SmokingSlots[2] = null;
338 break;
339 case "SmokingD":
340 m_SmokingSlots[3] = null;
341 break;
342 }
343
344 //no attachments left, no cargo items & no ashes are present
345 CheckForDestroy();
346
347 //TODO
348 //add SetViewIndex when detaching various attachments
349
351 }
352
353
354 override void SetCookingEquipment(ItemBase equipment)
355 {
356 super.SetCookingEquipment(equipment);
357
358 TripodBase stand = TripodBase.Cast(FindAttachmentBySlotName("CookingTripod"));
359 if (stand)
360 {
361 if (equipment)
362 {
363 stand.LockToParent();
364 }
365 else
366 {
367 stand.UnlockFromParent();
368 }
369 }
370 }
371
372
373 override void OnBeforeTryDelete()
374 {
375 super.OnBeforeTryDelete();
376 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
377 }
378
379 override bool IsPrepareToDelete()
380 {
381 return GetInventory().AttachmentCount() == 0 && !IsBurning() && !HasAshes();
382 }
383
384 //CONDITIONS
385 //this into/outo parent.Cargo
386 override bool CanPutInCargo(EntityAI parent)
387 {
388 if (!super.CanPutInCargo(parent))
389 {
390 return false;
391 }
392
393 if (HasAshes() || IsBurning() || HasStones() || HasStoneCircle() || IsOven() || !IsCargoEmpty() || HasCookingStand())
394 {
395 return false;
396 }
397
398 return true;
399 }
400
401 override bool CanRemoveFromCargo( EntityAI parent )
402 {
403 return true;
404 }
405
406 //cargo item into/outo this.Cargo
407 override bool CanReceiveItemIntoCargo( EntityAI item )
408 {
409 if ( GetHierarchyParent() )
410 return false;
411
412 return super.CanReceiveItemIntoCargo( item );
413 }
414
415 override bool CanLoadItemIntoCargo( EntityAI item )
416 {
417 if (!super.CanLoadItemIntoCargo( item ))
418 return false;
419
420 if ( GetHierarchyParent() )
421 return false;
422
423 return true;
424 }
425
426 //hands
427 override bool CanPutIntoHands(EntityAI parent)
428 {
429 if (!super.CanPutIntoHands(parent))
430 {
431 return false;
432 }
433
434 if (HasAshes() || IsBurning() || HasStones() || HasStoneCircle() || IsOven() || !IsCargoEmpty() || HasCookingStand())
435 {
436 return false;
437 }
438
439 return true;
440 }
441
442 override bool CanDisplayAttachmentCategory( string category_name )
443 {
444 if ( !super.CanDisplayAttachmentCategory( category_name ) )
445 return false;
446
447 if ( IsOven() )
448 {
449 if ( category_name == "CookingEquipment" )
450 return false;
451 if ( ( category_name == "DirectCooking" ) || ( category_name == "Smoking" ) )
452 return true;
453 }
454 else
455 {
456 if ( category_name == "CookingEquipment" )
457 return true;
458 if ( ( category_name == "DirectCooking" ) || ( category_name == "Smoking" ) )
459 return false;
460 }
461 return true;
462 }
463
465 {
466 return false;
467 }
468
470 {
471 return 0.32;
472 }
473
474 //particles
475 override bool CanShowSmoke()
476 {
477 return !IsOven();
478 }
479
480
481 void DestroyClutterCutter( Object clutter_cutter )
482 {
483 GetGame().ObjectDelete( clutter_cutter );
484 }
485
486 override void RefreshPhysics()
487 {
488 super.RefreshPhysics();
489
490 //Oven
491 if ( IsOven() )
492 {
493 RemoveProxyPhysics( ANIMATION_OVEN );
494 AddProxyPhysics( ANIMATION_OVEN );
495 }
496 else
497 {
498 RemoveProxyPhysics( ANIMATION_OVEN );
499 }
500
501 //Tripod
503 {
504 RemoveProxyPhysics( ANIMATION_TRIPOD );
505 AddProxyPhysics( ANIMATION_TRIPOD );
506 }
507 else
508 {
509 RemoveProxyPhysics( ANIMATION_TRIPOD );
510 }
511 }
512
514 {
516 }
517
518 //on store save/load
519 override void OnStoreSave( ParamsWriteContext ctx )
520 {
521 super.OnStoreSave(ctx);
522
523 if ( GetGame().SaveVersion() >= 110 )
524 {
525 // save stone circle state
526 ctx.Write( m_HasStoneCircle );
527
528 // save stone oven state
529 ctx.Write( m_IsOven );
530 }
531 }
532
533 override bool OnStoreLoad( ParamsReadContext ctx, int version )
534 {
535 if ( !super.OnStoreLoad(ctx, version) )
536 return false;
537
538 if ( version >= 110 )
539 {
540 // read stone circle state
541 if ( !ctx.Read( m_HasStoneCircle ) )
542 {
543 m_HasStoneCircle = false;
544 return false;
545 }
546 // read stone oven state
547 if ( !ctx.Read( m_IsOven ) )
548 {
549 m_IsOven = false;
550 return false;
551 }
552 }
553 return true;
554 }
555
556 override void AfterStoreLoad()
557 {
558 super.AfterStoreLoad();
559
560 if ( IsBurning() )
561 {
562 if ( !m_ClutterCutter )
563 {
565 m_ClutterCutter.SetOrientation( GetOrientation() );
566 }
567 }
568 }
569
570 //================================================================
571 // IGNITION ACTION
572 //================================================================
573
574 // Item-to-item fire distribution
575 override bool HasFlammableMaterial()
576 {
577 return true;
578 }
579
580 override bool CanBeIgnitedBy(EntityAI igniter = NULL)
581 {
582 return HasAnyKindling() && !IsBurning() && !GetHierarchyParent();
583 }
584
585 override bool CanIgniteItem(EntityAI ignite_target = NULL)
586 {
587 return IsBurning();
588 }
589
590 override bool IsIgnited()
591 {
592 return IsBurning();
593 }
594
595 override void OnIgnitedTarget( EntityAI ignited_item )
596 {
597 }
598
599 override void OnIgnitedThis( EntityAI fire_source )
600 {
601 //remove grass
603 cc_object.SetOrientation ( GetOrientation() );
604 GetGame().GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( DestroyClutterCutter, 200, false, cc_object );
605
606 //start fire
607 StartFire();
608
609 if ( fire_source )
610 {
611 Man player = fire_source.GetHierarchyRootPlayer();
612
613 if ( player )
614 {
615 EFireIgniteType ignate_type = EFireIgniteType.Unknow;
616
617 if ( fire_source.ClassName() == "Matchbox" )
618 {
619 ignate_type = EFireIgniteType.Matchbox;
620 }
621 else if ( fire_source.ClassName() == "Roadflare" )
622 {
623 ignate_type = EFireIgniteType.Roadflare;
624 }
625 else if ( fire_source.ClassName() == "HandDrillKit" )
626 {
627 ignate_type = EFireIgniteType.HandDrill;
628 }
629
630
631 SyncEvents.SendPlayerIgnatedFireplace( player, ignate_type );
632 }
633 }
634 }
635
636 override bool IsThisIgnitionSuccessful( EntityAI item_source = NULL )
637 {
638 SetIgniteFailure( false );
639 Param1<bool> failure;
640
641 //check kindling
642 if ( !HasAnyKindling() )
643 {
644 return false;
645 }
646
647 //check roof
648 if ( !IsOven() )
649 {
651 {
652 return false;
653 }
654 }
655
656 //check surface
657 if ( IsOnWaterSurface() )
658 {
659 return false;
660 }
661
662 //check wetness
663 if ( IsWet() )
664 {
665 SetIgniteFailure( true );
666
667 failure = new Param1<bool>( GetIgniteFailure() );
668 GetGame().RPCSingleParam( this, FirePlaceFailure.WET, failure, true );
669 return false;
670 }
671
672 // check if the fireplace isnt below a roof
673 // excluding this check whein oven stage
674 if ( !IsOven() && !MiscGameplayFunctions.IsUnderRoof( this ) )
675 {
676 // if not, check if there is strong rain or wind
677 if ( IsRainingAbove() )
678 {
679 SetIgniteFailure( true );
680
681 failure = new Param1<bool>( GetIgniteFailure() );
682 GetGame().RPCSingleParam( this, FirePlaceFailure.WET, failure, true );
683 return false;
684 }
685
686 if ( IsWindy() )
687 {
688 SetIgniteFailure( true );
689
690 failure = new Param1<bool>( GetIgniteFailure() );
691 GetGame().RPCSingleParam( this, FirePlaceFailure.WIND, failure, true );
692 return false;
693 }
694 }
695
696 return true;
697 }
698
699 //================================================================
700 // FIREPLACE ENTITY
701 //================================================================
702 static Fireplace IgniteEntityAsFireplace( notnull EntityAI entity, notnull EntityAI fire_source )
703 {
704 //get player
705 PlayerBase player = PlayerBase.Cast( fire_source.GetHierarchyRootPlayer() );
706
707 //create fireplace
708 Fireplace fireplace = Fireplace.Cast( GetGame().CreateObjectEx( "Fireplace" , entity.GetPosition(), ECE_PLACE_ON_SURFACE ) );
709
710 //attach
711 if ( !GetGame().IsMultiplayer() ) //clear inventory reservation (single player)
712 {
714 entity.GetInventory().GetCurrentInventoryLocation( loc );
715 player.GetInventory().ClearInventoryReservationEx( entity, loc );
716 }
717
718 if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
719 {
720 player.ServerTakeEntityToTargetAttachment( fireplace, entity ); // multiplayer server side
721 }
722 else
723 {
724 player.LocalTakeEntityToTargetAttachment( fireplace, entity ); // single player or multiplayer client side
725 }
726
727 //start fire
728 fireplace.StartFire();
729 fireplace.OnIgnitedThis(fire_source);
730
731 return fireplace;
732 }
733
734 static bool CanIgniteEntityAsFireplace(notnull EntityAI entity)
735 {
736 //check ceiling (enough space for smoke)
737 if (MiscGameplayFunctions.IsUnderRoof(entity, FireplaceBase.MIN_CEILING_HEIGHT) && IsEntityOnInteriorSurface(entity))
738 {
739 return false;
740 }
741
742 //check surface
743 if (FireplaceBase.IsEntityOnWaterSurface(entity))
744 {
745 return false;
746 }
747
748 if (!MiscGameplayFunctions.IsUnderRoof(entity))
749 return !FireplaceBase.IsRainingAboveEntity(entity);
750
751 return true;
752 }
753
754 //================================================================
755 // ADVANCED PLACEMENT
756 //================================================================
757
758 override string GetPlaceSoundset()
759 {
760 return "placeFireplace_SoundSet";
761 }
762
763 override void SetActions()
764 {
765 super.SetActions();
766
776 }
777}
ActionBuildOvenCB ActionContinuousBaseCB ActionBuildOven()
ActionBuildStoneCircleCB ActionContinuousBaseCB ActionBuildStoneCircle()
ActionDismantleOvenCB ActionContinuousBaseCB ActionDismantleOven()
ActionDismantleStoneCircleCB ActionContinuousBaseCB ActionDismantleStoneCircle()
void AddAction(typename actionName)
vector GetOrientation()
const int ECE_PLACE_ON_SURFACE
Container_Base m_HalfExtents
EFireIgniteType
void RefreshFireplaceVisuals()
static bool IsEntityOnInteriorSurface(notnull EntityAI entity_ai)
bool HasAnyKindling()
const string ANIMATION_OVEN
ATTACHMENT_FRYING_PAN
ATTACHMENT_CAULDRON
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.
bool HasCookingStand()
protected bool m_HasStoneCircle
bool IsOnWaterSurface()
const string OBJECT_CLUTTER_CUTTER
const string ANIMATION_CAULDRON_HANDLE
bool HasAshes()
bool IsRainingAbove()
protected int PARTICLE_FIRE_END
protected bool m_IsOven
const string ANIMATION_TRIPOD
protected int PARTICLE_SMALL_SMOKE
protected FireConsumable GetFireConsumableByItem(ItemBase item)
protected int PARTICLE_FIRE_START
static bool IsWindy()
bool HasStones()
protected int PARTICLE_NORMAL_FIRE
bool IsCargoEmpty()
bool GetIgniteFailure()
bool IsOnInteriorSurface()
protected void AddToFireConsumables(ItemBase item)
ATTACHMENT_STONES
ATTACHMENT_COOKING_POT
protected int PARTICLE_STEAM_END
bool IsBurning()
bool IsWet()
void StartFire(bool force_start=false)
void SetIgniteFailure(bool failure)
ATTACHMENT_TRIPOD
bool HasStoneCircle()
protected bool IsKindling(ItemBase item)
Returns if item attached to fireplace is kindling.
bool IsOven()
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)
Definition DayZGame.c:1153
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
Definition Game.c:882
override bool CanDisplayAttachmentCategory(string category_name)
Definition Fireplace.c:442
override float HeightStartCheckOverride()
Definition Fireplace.c:469
override void OnIgnitedTarget(EntityAI ignited_item)
Definition Fireplace.c:595
override bool IsBaseFireplace()
Definition Fireplace.c:19
override void RefreshFireplacePhysics()
Definition Fireplace.c:513
override void EOnContact(IEntity other, Contact extra)
Definition Fireplace.c:29
override void SetCookingEquipment(ItemBase equipment)
Definition Fireplace.c:354
override void OnStoreSave(ParamsWriteContext ctx)
Definition Fireplace.c:519
override bool CanReceiveItemIntoCargo(EntityAI item)
Definition Fireplace.c:407
bool m_ContactEventProcessing
Definition Fireplace.c:3
override void EOnTouch(IEntity other, int extra)
Definition Fireplace.c:24
override bool CanLoadItemIntoCargo(EntityAI item)
Definition Fireplace.c:415
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
Definition Fireplace.c:580
override void RefreshPhysics()
Definition Fireplace.c:486
override bool CanPutInCargo(EntityAI parent)
Definition Fireplace.c:386
static Fireplace IgniteEntityAsFireplace(notnull EntityAI entity, notnull EntityAI fire_source)
Definition Fireplace.c:702
override bool IsIgnited()
Definition Fireplace.c:590
override bool CanReleaseAttachment(EntityAI attachment)
Definition Fireplace.c:150
override bool CanDisplayAttachmentSlot(int slot_id)
Definition Fireplace.c:94
override void EEItemDetached(EntityAI item, string slot_name)
Definition Fireplace.c:268
override void OnIgnitedThis(EntityAI fire_source)
Definition Fireplace.c:599
override string GetPlaceSoundset()
Definition Fireplace.c:758
override bool CanIgniteItem(EntityAI ignite_target=NULL)
Definition Fireplace.c:585
override void AfterStoreLoad()
Definition Fireplace.c:556
override bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
Definition Fireplace.c:636
override void OnBeforeTryDelete()
Definition Fireplace.c:373
override bool CanPutIntoHands(EntityAI parent)
Definition Fireplace.c:427
override bool CanAssignAttachmentsToQuickbar()
Definition Fireplace.c:464
override bool CanRemoveFromCargo(EntityAI parent)
Definition Fireplace.c:401
override bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition Fireplace.c:533
override bool HasFlammableMaterial()
Definition Fireplace.c:575
override void EEItemAttached(EntityAI item, string slot_name)
Definition Fireplace.c:181
override bool IsPrepareToDelete()
Definition Fireplace.c:379
void DestroyClutterCutter(Object clutter_cutter)
Definition Fireplace.c:481
void ContactEvent(IEntity other, vector position)
Definition Fireplace.c:34
override bool CanShowSmoke()
Definition Fireplace.c:475
static bool CanIgniteEntityAsFireplace(notnull EntityAI entity)
Definition Fireplace.c:734
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
Definition Fireplace.c:46
override bool CanLoadAttachment(EntityAI attachment)
Definition Fireplace.c:106
override void SetActions()
Definition Fireplace.c:763
void Fireplace()
Definition Fireplace.c:5
InventoryLocation.
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:
Definition Serializer.c:56
proto bool Write(void value_out)
proto bool Read(void value_in)
static void SendPlayerIgnatedFireplace(Man player, EFireIgniteType ignite_type)
Definition SyncEvents.c:82
proto native CGame GetGame()
vector Position
Definition EnPhysics.c:319
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45
proto native bool dBodyIsActive(notnull IEntity ent)
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10