Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionworldflagactionswitch.c
Go to the documentation of this file.
1
class
FlagTendencyActionReciveData
: ActionReciveData
2
{
3
bool
m_TendencyRecived
;
4
}
5
6
class
FlagTendencyActionData :
ActionData
7
{
8
bool
m_Tendency
;
9
};
10
12
class
ActionWorldFlagActionSwitch
:
ActionSingleUseBase
13
{
14
bool
m_switch_to
;
15
void
ActionWorldFlagActionSwitch
()
16
{
17
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
18
}
19
20
override
void
CreateConditionComponents
()
21
{
22
m_ConditionItem
=
new
CCINone
;
23
m_ConditionTarget
=
new
CCTCursor
;
24
}
25
26
/*override string GetText()
27
{
28
if (!m_switch_to)
29
return "#switch_to_flag_raise";
30
return "#switch_to_flag_lower";
31
}*/
32
33
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
34
{
35
TerritoryFlag
totem =
TerritoryFlag
.Cast( target.GetObject() );
36
if
(!totem)
37
return
false
;
38
39
float
state = totem.GetAnimationPhase(
"flag_mast"
);
40
41
if
( totem && totem.FindAttachmentBySlotName(
"Material_FPole_Flag"
) )
42
{
43
if
( player.GetFlagTendencyRaise() && state < 1 )
44
{
45
m_switch_to
=
true
;
46
return
true
;
47
}
48
else
if
( !player.GetFlagTendencyRaise() && state > 0 )
49
{
50
m_switch_to
=
false
;
51
return
true
;
52
}
53
}
54
return
false
;
55
}
56
57
override
void
Start
(
ActionData
action_data )
//Setup on start of action
58
{
59
super.Start( action_data );
60
61
bool
state = action_data.m_Player.GetFlagTendencyRaise();
62
action_data.m_Player.SetFlagTendencyRaise(!state);
63
}
64
65
override
bool
IsInstant
()
66
{
67
return
true
;
68
}
69
70
override
bool
RemoveForceTargetAfterUse
()
71
{
72
return
false
;
73
}
74
75
override
typename
GetInputType
()
76
{
77
return
InteractActionInput
;
78
}
79
80
void
SetFlagTendencyOnCurrentActionInvalid
(
bool
state)
81
{
82
83
}
84
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
m_Tendency
TransferLiquidActionReciveData m_Tendency
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
ActionWorldFlagActionSwitch::m_switch_to
bool m_switch_to
Definition
actionworldflagactionswitch.c:14
ActionWorldFlagActionSwitch::IsInstant
override bool IsInstant()
Definition
actionworldflagactionswitch.c:65
ActionWorldFlagActionSwitch::SetFlagTendencyOnCurrentActionInvalid
void SetFlagTendencyOnCurrentActionInvalid(bool state)
Definition
actionworldflagactionswitch.c:80
ActionWorldFlagActionSwitch::Start
override void Start(ActionData action_data)
Definition
actionworldflagactionswitch.c:57
ActionWorldFlagActionSwitch::ActionWorldFlagActionSwitch
void ActionWorldFlagActionSwitch()
Definition
actionworldflagactionswitch.c:15
ActionWorldFlagActionSwitch::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionworldflagactionswitch.c:20
ActionWorldFlagActionSwitch::RemoveForceTargetAfterUse
override bool RemoveForceTargetAfterUse()
Definition
actionworldflagactionswitch.c:70
ActionWorldFlagActionSwitch::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionworldflagactionswitch.c:33
ActionWorldFlagActionSwitch::GetInputType
override GetInputType()
Definition
actionworldflagactionswitch.c:75
CCINone
Definition
ccinone.c:2
CCTCursor
Definition
cctcursor.c:2
FlagTendencyActionReciveData
Definition
actionworldflagactionswitch.c:2
FlagTendencyActionReciveData::m_TendencyRecived
bool m_TendencyRecived
Definition
actionworldflagactionswitch.c:3
InteractActionInput
Definition
actioninput.c:536
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
TerritoryFlag
Definition
staticflagpole.c:28
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionworldflagactionswitch.c
Generated by
1.17.0