DayZ 1.24
Loading...
Searching...
No Matches
KitBase Class Reference

Private Member Functions

override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool DoPlacingHeightCheck ()
 
override float HeightCheckOverride ()
 
override void DisassembleKit (ItemBase item)
 
override void OnDebugSpawn ()
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool DoPlacingHeightCheck ()
 
override float HeightCheckOverride ()
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override string GetDeployFinishSoundset ()
 
override void DisassembleKit (ItemBase item)
 
override void OnDebugSpawn ()
 
override bool PlacementCanBeRotated ()
 
override bool DoPlacingHeightCheck ()
 
override float HeightCheckOverride ()
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override void DisassembleKit (ItemBase item)
 
override void OnDebugSpawn ()
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool DoPlacingHeightCheck ()
 
override float HeightCheckOverride ()
 
override void DisassembleKit (ItemBase item)
 
override void OnDebugSpawn ()
 

Detailed Description

Definition at line 1 of file FenceKit.c.

Member Function Documentation

◆ CanReceiveAttachment() [1/4]

override bool KitBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate

Definition at line 3 of file FenceKit.c.

4 {
5 if (!super.CanReceiveAttachment(attachment, slotId))
6 return false;
7
8 ItemBase att = ItemBase.Cast(GetInventory().FindAttachment(slotId));
9 if (att)
10 return false;
11
12 return true;
13 }

◆ CanReceiveAttachment() [2/4]

override bool KitBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate

Definition at line 3 of file ShelterKit.c.

4 {
5 if (!super.CanReceiveAttachment(attachment, slotId))
6 return false;
7
8 ItemBase att = ItemBase.Cast(GetInventory().FindAttachment(slotId));
9 if (att)
10 return false;
11
12 return true;
13 }

◆ CanReceiveAttachment() [3/4]

override bool KitBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate

Definition at line 18 of file TotemKit.c.

19 {
20 if (!super.CanReceiveAttachment(attachment, slotId))
21 return false;
22
23 ItemBase att = ItemBase.Cast(GetInventory().FindAttachment(slotId));
24 if (att)
25 return false;
26
27 return true;
28 }

◆ CanReceiveAttachment() [4/4]

override bool KitBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate

Definition at line 3 of file WatchtowerKit.c.

4 {
5 ItemBase att = ItemBase.Cast(GetInventory().FindAttachment(slotId));
6 if (att)
7 return false;
8
9 return super.CanReceiveAttachment(attachment, slotId);
10 }

◆ DisassembleKit() [1/4]

override void KitBase::DisassembleKit ( ItemBase item)
inlineprivate

Definition at line 48 of file FenceKit.c.

49 {
50 if (!IsHologram())
51 {
52 ItemBase stick = ItemBase.Cast(GetGame().CreateObjectEx("WoodenStick", GetPosition(), ECE_PLACE_ON_SURFACE));
53 MiscGameplayFunctions.TransferItemProperties(this, stick);
54 stick.SetQuantity(2);
55 Rope rope = Rope.Cast(item);
56 CreateRope(rope);
57 }
58 }
const int ECE_PLACE_ON_SURFACE
override bool IsHologram()
Definition ItemBase.c:5641
class JsonUndergroundAreaTriggerData GetPosition
proto native CGame GetGame()

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and IsHologram().

Referenced by ItemBase::EEItemDetached().

◆ DisassembleKit() [2/4]

override void KitBase::DisassembleKit ( ItemBase item)
inlineprivate

Definition at line 61 of file ShelterKit.c.

62 {
63 if (!IsHologram())
64 {
65 ItemBase stick = ItemBase.Cast(GetGame().CreateObjectEx("WoodenStick", GetPosition(), ECE_PLACE_ON_SURFACE));
66 MiscGameplayFunctions.TransferItemProperties(this, stick);
67 stick.SetQuantity(4);
68 Rope rope = Rope.Cast(item);
69 CreateRope(rope);
70 }
71 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and IsHologram().

◆ DisassembleKit() [3/4]

override void KitBase::DisassembleKit ( ItemBase item)
inlineprivate

Definition at line 52 of file TotemKit.c.

53 {
54 if (!IsHologram())
55 {
56 ItemBase stick = ItemBase.Cast(GetGame().CreateObjectEx("WoodenStick", GetPosition(), ECE_PLACE_ON_SURFACE));
57 MiscGameplayFunctions.TransferItemProperties(this, stick);
58 stick.SetQuantity(3);
59 Rope rope = Rope.Cast(item);
60 CreateRope(rope);
61 }
62 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and IsHologram().

◆ DisassembleKit() [4/4]

override void KitBase::DisassembleKit ( ItemBase item)
inlineprivate

Definition at line 44 of file WatchtowerKit.c.

45 {
46 if (!IsHologram())
47 {
48 ItemBase stick = ItemBase.Cast(GetGame().CreateObjectEx("WoodenStick", GetPosition(), ECE_PLACE_ON_SURFACE));
49 MiscGameplayFunctions.TransferItemProperties(this, stick);
50 stick.SetQuantity(4);
51 Rope rope = Rope.Cast(item);
52 CreateRope(rope);
53 }
54 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and IsHologram().

◆ DoPlacingHeightCheck() [1/4]

override bool KitBase::DoPlacingHeightCheck ( )
inlineprivate

Definition at line 38 of file FenceKit.c.

39 {
40 return true;
41 }

◆ DoPlacingHeightCheck() [2/4]

override bool KitBase::DoPlacingHeightCheck ( )
inlineprivate

Definition at line 36 of file ShelterKit.c.

37 {
38 return true;
39 }

◆ DoPlacingHeightCheck() [3/4]

override bool KitBase::DoPlacingHeightCheck ( )
inlineprivate

Definition at line 8 of file TotemKit.c.

9 {
10 return true;
11 }

◆ DoPlacingHeightCheck() [4/4]

override bool KitBase::DoPlacingHeightCheck ( )
inlineprivate

Definition at line 34 of file WatchtowerKit.c.

35 {
36 return true;
37 }

◆ GetDeployFinishSoundset()

override string KitBase::GetDeployFinishSoundset ( )
inlineprivate

Definition at line 56 of file ShelterKit.c.

57 {
58 return "Shelter_Site_Build_Finish_SoundSet";
59 }

◆ GetDeploySoundset()

override string KitBase::GetDeploySoundset ( )
inlineprivate

Definition at line 46 of file ShelterKit.c.

47 {
48 return "Shelter_Site_Build_Start_SoundSet";
49 }

◆ GetLoopDeploySoundset()

override string KitBase::GetLoopDeploySoundset ( )
inlineprivate

Definition at line 51 of file ShelterKit.c.

52 {
53 return "Shelter_Site_Build_Loop_SoundSet";
54 }

Referenced by ItemBase::PlayDeployLoopSound().

◆ HeightCheckOverride() [1/4]

override float KitBase::HeightCheckOverride ( )
inlineprivate

Definition at line 43 of file FenceKit.c.

44 {
45 return 2.54;
46 }

◆ HeightCheckOverride() [2/4]

override float KitBase::HeightCheckOverride ( )
inlineprivate

Definition at line 41 of file ShelterKit.c.

42 {
43 return 1.6;
44 }

◆ HeightCheckOverride() [3/4]

override float KitBase::HeightCheckOverride ( )
inlineprivate

Definition at line 13 of file TotemKit.c.

14 {
15 return 11.3;
16 }

◆ HeightCheckOverride() [4/4]

override float KitBase::HeightCheckOverride ( )
inlineprivate

Definition at line 39 of file WatchtowerKit.c.

40 {
41 return 2.83;//9.56;
42 }

◆ OnDebugSpawn() [1/4]

override void KitBase::OnDebugSpawn ( )
inlineprivate

Definition at line 61 of file FenceKit.c.

62 {
63 SpawnEntityOnGroundPos("Shovel", GetPosition());
64 SpawnEntityOnGroundPos("Hammer", GetPosition());
65 SpawnEntityOnGroundPos("Hammer", GetPosition());
66 SpawnEntityOnGroundPos("Pliers", GetPosition());
67
68 SpawnEntityOnGroundPos("WoodenLog", GetPosition());
69 SpawnEntityOnGroundPos("WoodenLog", GetPosition());
70 SpawnEntityOnGroundPos("Nail", GetPosition());
71 SpawnEntityOnGroundPos("CamoNet", GetPosition());
72 SpawnEntityOnGroundPos("BarbedWire", GetPosition());
73 SpawnEntityOnGroundPos("BarbedWire", GetPosition());
74 SpawnEntityOnGroundPos("MetalWire", GetPosition());
75 SpawnEntityOnGroundPos("CombinationLock", GetPosition());
76 SpawnEntityOnGroundPos("WoodenPlank", GetPosition());
77 SpawnEntityOnGroundPos("WoodenPlank", GetPosition());
78 SpawnEntityOnGroundPos("WoodenPlank", GetPosition());
79 SpawnEntityOnGroundPos("WoodenPlank", GetPosition());
80 }

References GetPosition.

◆ OnDebugSpawn() [2/4]

override void KitBase::OnDebugSpawn ( )
inlineprivate

Definition at line 74 of file ShelterKit.c.

75 {
76 SpawnEntityOnGroundPos("Shovel", GetPosition());
77 SpawnEntityOnGroundPos("Hammer", GetPosition());
78 SpawnEntityOnGroundPos("Pliers", GetPosition());
79
80 for (int i0 = 0; i0 < 4; ++i0)
81 SpawnEntityOnGroundPos("LongWoodenStick", GetPosition());
82
83 for (int i1 = 0; i1 < 8; ++i1)
84 SpawnEntityOnGroundPos("TannedLeather", GetPosition());
85
86 for (int i2 = 0; i2 < 4; ++i2)
87 SpawnEntityOnGroundPos("Fabric", GetPosition());
88
89 for (int i3 = 0; i3 < 50; ++i3)
90 SpawnEntityOnGroundPos("WoodenStick", GetPosition());
91 }

References GetPosition.

◆ OnDebugSpawn() [3/4]

override void KitBase::OnDebugSpawn ( )
inlineprivate

Definition at line 68 of file TotemKit.c.

69 {
70 SpawnEntityOnGroundPos("SledgeHammer", GetPosition());
71 SpawnEntityOnGroundPos("Hammer", GetPosition());
72 SpawnEntityOnGroundPos("Shovel", GetPosition());
73
74 Nail nails = Nail.Cast(SpawnEntityOnGroundPos("Nail", GetPosition()));
75 nails.SetQuantity(60);
76 SpawnEntityOnGroundPos("Rope", GetPosition());
77 SpawnEntityOnGroundPos("MetalWire", GetPosition());
78 SpawnEntityOnGroundPos("Flag_DayZ", GetPosition());
79
80 for (int i0 = 0; i0 < 32; i0++)
81 SpawnEntityOnGroundPos("Stone", GetPosition());
82
83 for (int i1 = 0; i1 < 10; i1++)
84 SpawnEntityOnGroundPos("WoodenLog", GetPosition());
85 }

References GetPosition.

◆ OnDebugSpawn() [4/4]

override void KitBase::OnDebugSpawn ( )
inlineprivate

Definition at line 57 of file WatchtowerKit.c.

58 {
59 SpawnEntityOnGroundPos("Shovel", GetPosition());
60 SpawnEntityOnGroundPos("Hammer", GetPosition());
61 SpawnEntityOnGroundPos("Hammer", GetPosition());
62 SpawnEntityOnGroundPos("Hammer", GetPosition());
63 SpawnEntityOnGroundPos("Hammer", GetPosition());
64 SpawnEntityOnGroundPos("Pliers", GetPosition());
65
66 for (int i0 = 0; i0 < 30; i0++)
67 SpawnEntityOnGroundPos("WoodenPlank", GetPosition());
68
69 for (int i1 = 0; i1 < 10; i1++)
70 SpawnEntityOnGroundPos("WoodenLog", GetPosition());
71
72 for (int i2 = 0; i2 < 15; i2++)
73 SpawnEntityOnGroundPos("Nail", GetPosition());
74
75 for (int i3 = 0; i3 < 9; i3++)
76 SpawnEntityOnGroundPos("CamoNet", GetPosition());
77
78 for (int i4 = 0; i4 < 6; i4++)
79 SpawnEntityOnGroundPos("BarbedWire", GetPosition());
80 }

References GetPosition.

◆ OnPlacementComplete() [1/4]

override void KitBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 19 of file FenceKit.c.

20 {
21 super.OnPlacementComplete(player, position, orientation);
22
23 if (GetGame().IsServer())
24 {
25 //Create fence
26
27 Fence fence = Fence.Cast(GetGame().CreateObjectEx("Fence", GetPosition(), ECE_PLACE_ON_SURFACE));
28 fence.SetPosition(position);
29 fence.SetOrientation(orientation);
30
31 //make the kit invisible, so it can be destroyed from deploy UA when action ends
32 HideAllSelections();
33
34 SetIsDeploySound(true);
35 }
36 }
void SetIsDeploySound(bool is_deploy_sound)
Definition ItemBase.c:8972

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and SetIsDeploySound().

◆ OnPlacementComplete() [2/4]

override void KitBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 18 of file ShelterKit.c.

19 {
20 super.OnPlacementComplete(player, position, orientation);
21
22 if (GetGame().IsServer())
23 {
24 //Create shelter site
25 ShelterSite site = ShelterSite.Cast(GetGame().CreateObjectEx("ShelterSite", GetPosition(), ECE_PLACE_ON_SURFACE));
26 site.SetPosition(position);
27 site.SetOrientation(orientation);
28
29 //make the kit invisible, so it can be destroyed from deploy UA when action ends
30 HideAllSelections();
31
32 SetIsDeploySound(true);
33 }
34 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and SetIsDeploySound().

◆ OnPlacementComplete() [3/4]

override void KitBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 34 of file TotemKit.c.

35 {
36 super.OnPlacementComplete(player, position, orientation);
37
38 if (GetGame().IsServer())
39 {
40 //Create TerritoryFlag
41 TerritoryFlag totem = TerritoryFlag.Cast(GetGame().CreateObjectEx("TerritoryFlag", GetPosition(), ECE_PLACE_ON_SURFACE));
42 totem.SetPosition(position);
43 totem.SetOrientation(orientation);
44
45 //make the kit invisible, so it can be destroyed from deploy UA when action ends
46 HideAllSelections();
47
48 SetIsDeploySound(true);
49 }
50 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and SetIsDeploySound().

◆ OnPlacementComplete() [4/4]

override void KitBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 16 of file WatchtowerKit.c.

17 {
18 super.OnPlacementComplete(player, position, orientation);
19
20 if (GetGame().IsServer())
21 {
22 //Create watchtower
23 Watchtower watchtower = Watchtower.Cast(GetGame().CreateObjectEx("Watchtower", GetPosition(), ECE_PLACE_ON_SURFACE));
24 watchtower.SetPosition(position);
25 watchtower.SetOrientation(orientation);
26
27 //make the kit invisible, so it can be destroyed from deploy UA when action ends
28 HideAllSelections();
29
30 SetIsDeploySound(true);
31 }
32 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and SetIsDeploySound().

◆ PlacementCanBeRotated()

override bool KitBase::PlacementCanBeRotated ( )
inlineprivate

Definition at line 3 of file TotemKit.c.

4 {
5 return false;
6 }

The documentation for this class was generated from the following files: