Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
tripod.c
Go to the documentation of this file.
1 class TripodBase : ItemBase
2 {
3  override bool HasProxyParts()
4  {
5  return true;
6  }
7 
8  override bool CanDetachAttachment( EntityAI parent )
9  {
10  FireplaceBase fireplace = FireplaceBase.Cast(parent);
11  if(fireplace)
12  {
13  if ( fireplace.GetCookingEquipment() != null )
14  {
15  return false;
16  }
17  }
18  return true;
19  }
20 
21  override bool CanSwapEntities(EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
22  {
23  if (GetHierarchyParent() && GetHierarchyParent().IsFireplace() && otherItem)
24  {
25  if (otherItem.IsInherited(Pot) || otherItem.IsInherited(Cauldron))
26  {
27  return false;
28  }
29  }
30  return true;
31  }
32 
33 
34  override void OnDebugSpawn()
35  {
36  HideAllSelections();
37  ShowSelection( "Deployed" );
38  }
39 
40  override void SetActions()
41  {
42  super.SetActions();
43 
46  }
47 
48  override void OnWasAttached( EntityAI parent, int slot_id )
49  {
50  super.OnWasAttached(parent, slot_id);
51  if (parent.IsFireplace())
52  {
53  HideAllSelections();
54  ShowSelection( "Deployed" );
55  }
56  }
57 
58  override void OnWasDetached( EntityAI parent, int slot_id )
59  {
60  super.OnWasDetached(parent, slot_id);
61  if (parent.IsFireplace())
62  {
63  HideAllSelections();
64  ShowSelection( "Collapsed" );
65  }
66  }
67 }
68 
69 
70 class Tripod : TripodBase
71 {
72 
73 }
ItemBase
Definition: inventoryitem.c:730
IsFireplace
override bool IsFireplace()
Definition: fireplacebase.c:504
ActionDetach
void ActionDetach()
Definition: actiondetach.c:10
InventoryLocation
InventoryLocation.
Definition: inventorylocation.c:27
TripodBase
Definition: cookingstand.c:1
FireplaceBase
Definition: barrelholes_colorbase.c:1
AddAction
void AddAction(typename actionName)
Definition: advancedcommunication.c:86
ActionAttach
ActionAttachWheels ActionAttach
EntityAI
Definition: building.c:5