Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
tripod.c
Go to the documentation of this file.
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
44 AddAction(ActionAttach);
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
70class Tripod : TripodBase
71{
72
73}
void ActionDetach()
void AddAction(typename actionName)
InventoryLocation.
Definition pot.c:2
override bool IsFireplace()