Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
building.c
Go to the documentation of this file.
1
class
BuildingBase
:
Building
2
{
3
static
ref
map<typename, ref TInputActionMap>
m_BuildingTypeActionsMap
=
new
map<typename, ref TInputActionMap>
;
4
TInputActionMap
m_InputActionMap
;
5
bool
m_ActionsInitialize
;
6
7
void
BuildingBase
()
8
{
9
m_ActionsInitialize
=
false
;
10
}
11
12
void
InitializeActions
()
13
{
14
m_InputActionMap
=
m_BuildingTypeActionsMap
.Get( this.
Type
() );
15
if
(!m_InputActionMap)
16
{
17
TInputActionMap
iam =
new
TInputActionMap
;
18
m_InputActionMap
= iam;
19
SetActions
();
20
m_BuildingTypeActionsMap
.Insert(this.
Type
(), m_InputActionMap);
21
}
22
}
23
24
override
void
GetActions
(
typename
action_input_type, out
array<ActionBase_Basic>
actions)
25
{
26
if
(!
m_ActionsInitialize
)
27
{
28
m_ActionsInitialize
=
true
;
29
InitializeActions
();
30
}
31
32
actions =
m_InputActionMap
.Get(action_input_type);
33
}
34
35
void
SetActions
()
36
{
37
//AddAction();
38
}
39
40
void
AddAction
(
typename
actionName)
41
{
42
ActionBase
action =
ActionManagerBase
.GetAction(actionName);
43
44
if
(!action)
45
{
46
Debug
.
LogError
(
"Action "
+ actionName +
" dosn't exist!"
);
47
return
;
48
}
49
50
typename
ai = action.
GetInputType
();
51
if
(!ai)
52
{
53
m_ActionsInitialize
=
false
;
54
return
;
55
}
56
ref
array<ActionBase_Basic>
action_array =
m_InputActionMap
.Get( ai );
57
58
if
(!action_array)
59
{
60
action_array =
new
array<ActionBase_Basic>
;
61
m_InputActionMap
.Insert(ai, action_array);
62
}
63
64
if
(
LogManager
.
IsActionLogEnable
() )
65
{
66
Debug
.
ActionLog
(action.ToString() +
" -> "
+ ai,
this
.ToString() ,
"n/a"
,
"Add action"
);
67
}
68
action_array.Insert(action);
69
}
70
71
void
RemoveAction
(
typename
actionName)
72
{
73
PlayerBase
player =
PlayerBase
.Cast(
g_Game
.GetPlayer());
74
ActionBase
action = player.GetActionManager().GetAction(actionName);
75
typename
ai = action.
GetInputType
();
76
ref
array<ActionBase_Basic>
action_array =
m_InputActionMap
.Get( ai );
77
78
if
(action_array)
79
{
80
action_array.RemoveItem(action);
81
}
82
}
83
};
84
85
class
House
:
BuildingBase
86
{
87
void
House
()
88
{
89
}
90
};
91
92
typedef
House
BuildingSuper
;
ActionManagerBase
void ActionManagerBase(PlayerBase player)
Definition
actionmanagerbase.c:63
TInputActionMap
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Definition
actionmanagerclient.c:1
ActionBase
Definition
actionbase.c:59
ActionBase::GetInputType
GetInputType()
Definition
actionbase.c:221
BuildingBase
Definition
building.c:2
BuildingBase::m_BuildingTypeActionsMap
static ref map< typename, ref TInputActionMap > m_BuildingTypeActionsMap
Definition
building.c:3
BuildingBase::BuildingBase
void BuildingBase()
Definition
building.c:7
BuildingBase::m_InputActionMap
TInputActionMap m_InputActionMap
Definition
building.c:4
BuildingBase::SetActions
void SetActions()
Definition
building.c:35
BuildingBase::AddAction
void AddAction(typename actionName)
Definition
building.c:40
BuildingBase::GetActions
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Definition
building.c:24
BuildingBase::m_ActionsInitialize
bool m_ActionsInitialize
Definition
building.c:5
BuildingBase::RemoveAction
void RemoveAction(typename actionName)
Definition
building.c:71
BuildingBase::InitializeActions
void InitializeActions()
Definition
building.c:12
Building::Building
void Building()
Definition
building.c:258
BuildingSuper
Definition
fuelstation.c:2
Debug
Definition
debug.c:2
Debug::ActionLog
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition
debug.c:187
Debug::LogError
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition
debug.c:305
House
Definition
crashbase.c:2
House::House
void House()
Definition
building.c:87
LogManager
Definition
debug.c:692
LogManager::IsActionLogEnable
static bool IsActionLogEnable()
Definition
debug.c:736
PlayerBase
Definition
playerbaseclient.c:2
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
map
Definition
cachedequipmentstorage.c:4
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Type
string Type
Definition
jsondatacontaminatedarea.c:11
Games
Dayz
scripts
4_world
entities
game
super
building.c
Generated by
1.17.0