DayZ 1.24
Loading...
Searching...
No Matches
Container_Base.c File Reference

Go to the source code of this file.

Classes

class  Container_Base
 

Functions

void DeployableContainer_Base ()
 
override string GetInvulnerabilityTypeString ()
 
override void SetActions ()
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanLoadAttachment (EntityAI attachment)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanLoadItemIntoCargo (EntityAI item)
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 

Variables

Container_Base m_HalfExtents
 

Function Documentation

◆ CanLoadAttachment()

override bool CanLoadAttachment ( EntityAI attachment)

Definition at line 64 of file Container_Base.c.

65 {
66 if (GetHealthLevel() == GameConstants.STATE_RUINED)
67 return false;
68
69 return super.CanLoadAttachment(attachment);
70 }
const int STATE_RUINED
Definition constants.c:757

References GameConstants::STATE_RUINED.

◆ CanLoadItemIntoCargo()

override bool CanLoadItemIntoCargo ( EntityAI item)

Definition at line 80 of file Container_Base.c.

81 {
82 if (!super.CanLoadItemIntoCargo(item))
83 return false;
84
85 if (GetHealthLevel() == GameConstants.STATE_RUINED)
86 return false;
87
88 return true;
89 }

References GameConstants::STATE_RUINED.

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )

Definition at line 56 of file Container_Base.c.

57 {
58 if (GetHealthLevel() == GameConstants.STATE_RUINED)
59 return false;
60
61 return super.CanReceiveAttachment(attachment, slotId);
62 }

References GameConstants::STATE_RUINED.

◆ CanReceiveItemIntoCargo()

override bool CanReceiveItemIntoCargo ( EntityAI item)

Definition at line 72 of file Container_Base.c.

73 {
74 if (GetHealthLevel() == GameConstants.STATE_RUINED)
75 return false;
76
77 return super.CanReceiveItemIntoCargo(item);
78 }

References GameConstants::STATE_RUINED.

◆ DeployableContainer_Base()

void DeployableContainer_Base ( )

Definition at line 36 of file Container_Base.c.

37 {
39
40 ProcessInvulnerabilityCheck(GetInvulnerabilityTypeString());
41 }
Container_Base m_HalfExtents
override string GetInvulnerabilityTypeString()
static const vector Zero
Definition EnConvert.c:110

References GetInvulnerabilityTypeString(), m_HalfExtents, and vector::Zero.

◆ EEHealthLevelChanged()

override void EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )

Definition at line 91 of file Container_Base.c.

92 {
93 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
94
95 if (newLevel == GameConstants.STATE_RUINED && !GetHierarchyParent())
96 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
97 }

References m_HalfExtents, and GameConstants::STATE_RUINED.

◆ GetInvulnerabilityTypeString()

override string GetInvulnerabilityTypeString ( )

Definition at line 43 of file Container_Base.c.

44 {
45 return "disableContainerDamage";
46 }

◆ SetActions()

override void SetActions ( )

Definition at line 48 of file Container_Base.c.

References AddAction().

Variable Documentation

◆ m_HalfExtents