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

Go to the source code of this file.

Classes

class  VicinityObjects
 objects in vicinity - extended with secondary object which is parent of that Object More...
 
class  ActionTargets
 
class  ObjectGroup
 

Functions

class VicinityObjects ActionTarget (Object object, Object parent, int componentIndex, vector cursorHitPos, float utility)
 
void VicinityObjects ()
 
void StoreVicinityObject (Object object, Object parent=null)
 stores VicinityObject to Hashmap - for storing of parent/child relationship
 
void TransformToVicinityObjects (array< Object > objects)
 transform simple array of Objects to VicinityObjects hashmap
 
void ClearVicinityObjects ()
 
array< ObjectGetVicinityObjects ()
 return simple array of Objects in Vicinity
 
array< ObjectGetRawVicinityObjects ()
 return simple array of Objects in Vicinity
 
Object GetObject (int i)
 returns VicinityObjects Key
 
Object GetParent (int i)
 returns VicinityObjects Element
 
int Count ()
 
void Remove (Object object)
 
void Remove (array< Object > objects)
 
Object GetObject ()
 
Object GetParent ()
 Get parent of the Effect.
 
bool IsProxy ()
 
int GetComponentIndex ()
 
float GetUtility ()
 
vector GetCursorHitPos ()
 
void SetCursorHitPos (vector cursor_position)
 
void DbgPrintTargetDump ()
 
string DumpToString ()
 

Variables

ref map< Object, Objectm_VicinityObjects
 
Object m_Object
 
Object m_Parent
 
int m_ComponentIndex
 
vector m_CursorHitPos
 
float m_Utility
 
class ActionTargets ActionTarget
 

Function Documentation

◆ ActionTarget()

class VicinityObjects ActionTarget ( Object object,
Object parent,
int componentIndex,
vector cursorHitPos,
float utility )

Definition at line 1 of file ActionTargets.c.

110 {
112 m_Parent = parent;
116 }
Object m_Object
float m_Utility
int m_ComponentIndex
Object m_Parent
vector m_CursorHitPos

◆ ClearVicinityObjects()

void ActionTarget::ClearVicinityObjects ( )
private

Definition at line 152 of file ActionTargets.c.

152 {";
153 res = res + "m_Object: " + Object.GetDebugName(m_Object);
154 res = res + "; m_Parent: " + Object.GetDebugName(m_Parent);
155 res = res + "; m_ComponentIndex: " + m_ComponentIndex.ToString();

◆ Count()

int ActionTarget::Count ( )
private

Definition at line 196 of file ActionTargets.c.

◆ DbgPrintTargetDump()

void DbgPrintTargetDump ( )

Definition at line 145 of file ActionTargets.c.

146 {
148 }
string DumpToString()
proto void Print(void var)
Prints content of variable to console/log.

References DumpToString(), and Print().

◆ DumpToString()

string DumpToString ( )

Definition at line 150 of file ActionTargets.c.

151 {
152 string res = "ActionTarget dump = {";
153 res = res + "m_Object: " + Object.GetDebugName(m_Object);
154 res = res + "; m_Parent: " + Object.GetDebugName(m_Parent);
155 res = res + "; m_ComponentIndex: " + m_ComponentIndex.ToString();
156 res = res + "; m_CursorHitPos: " + m_CursorHitPos.ToString();
157 res = res + "; m_Utility: " + m_Utility.ToString();
158 res = res + "}";
159 return res;
160 }
proto string ToString()
proto string ToString(bool beautify=true)
Vector to string.

◆ GetComponentIndex()

int GetComponentIndex ( )

Definition at line 131 of file ActionTargets.c.

132 { return m_ComponentIndex; }

References m_ComponentIndex.

◆ GetCursorHitPos()

vector GetCursorHitPos ( )

Definition at line 137 of file ActionTargets.c.

138 { return m_CursorHitPos; }

References m_CursorHitPos.

◆ GetObject() [1/2]

◆ GetObject() [2/2]

Object ActionTarget::GetObject ( int i)
private

returns VicinityObjects Key

Definition at line 185 of file ActionTargets.c.

186 {
187 m_Targets.Clear();
188 }

◆ GetParent()

Object ActionTarget::GetParent ( int i)
private

returns VicinityObjects Element

Definition at line 191 of file ActionTargets.c.

191 {
192 int i;
193

References m_VicinityObjects.

◆ GetRawVicinityObjects()

array< Object > ActionTarget::GetRawVicinityObjects ( )
private

return simple array of Objects in Vicinity

Definition at line 175 of file ActionTargets.c.

181 {
182 return m_VicinityObjects.GetVicinityObjects();
ref map< Object, Object > m_VicinityObjects

◆ GetUtility()

float GetUtility ( )

Definition at line 134 of file ActionTargets.c.

135 { return m_Utility; }

References m_Utility.

◆ GetVicinityObjects()

array< Object > ActionTarget::GetVicinityObjects ( )
private

return simple array of Objects in Vicinity

filters out non-takeable items (won't be shown in vicinity)

Definition at line 158 of file ActionTargets.c.

◆ IsProxy()

bool IsProxy ( )

Definition at line 124 of file ActionTargets.c.

125 {
126 if (m_Parent)
127 return true;
128 return false;
129 }

References m_Parent.

◆ Remove() [1/2]

void ActionTarget::Remove ( array< Object > objects)
private

Definition at line 206 of file ActionTargets.c.

◆ Remove() [2/2]

◆ SetCursorHitPos()

void SetCursorHitPos ( vector cursor_position)

Definition at line 140 of file ActionTargets.c.

141 {
143 }

References m_CursorHitPos.

◆ StoreVicinityObject()

void ActionTarget::StoreVicinityObject ( Object object,
Object parent = null )
private

stores VicinityObject to Hashmap - for storing of parent/child relationship

completely remove items that are being placed or are holograms

ignores plain objects

init of VicinityObjects - object, parent(if exists)

Definition at line 118 of file ActionTargets.c.

119 { return m_Object; }
120
122 { return m_Parent; }
123
124 bool IsProxy()
125 {
126 if (m_Parent)
127 return true;
128 return false;
129 }
130
132 { return m_ComponentIndex; }
133
134 float GetUtility()
135 { return m_Utility; }
136
vector GetCursorHitPos()
float GetUtility()
int GetComponentIndex()
bool IsProxy()
Object GetParent()
Get parent of the Effect.

◆ TransformToVicinityObjects()

void ActionTarget::TransformToVicinityObjects ( array< Object > objects)
private

transform simple array of Objects to VicinityObjects hashmap

Definition at line 140 of file ActionTargets.c.

141 {
143 }
144
145 void DbgPrintTargetDump()
146 {
148 }
149
150 string DumpToString()
void DbgPrintTargetDump()

◆ VicinityObjects()

void ActionTarget::VicinityObjects ( )
private

Definition at line 112 of file ActionTargets.c.

Referenced by ActionTargets::ActionTargets().

Variable Documentation

◆ ActionTarget

◆ m_ComponentIndex

int m_ComponentIndex
private

Definition at line 164 of file ActionTargets.c.

◆ m_CursorHitPos

vector m_CursorHitPos
private

Definition at line 165 of file ActionTargets.c.

Referenced by GetCursorHitPos(), and SetCursorHitPos().

◆ m_Object

Object m_Object
private

Definition at line 162 of file ActionTargets.c.

Referenced by GetObject().

◆ m_Parent

Object m_Parent
private

Definition at line 163 of file ActionTargets.c.

◆ m_Utility

float m_Utility
private

Definition at line 166 of file ActionTargets.c.

Referenced by GetUtility().

◆ m_VicinityObjects