Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actionworldflagactionswitch.c
Go to the documentation of this file.
1class FlagTendencyActionReciveData : ActionReciveData
2{
3 bool m_TendencyRecived;
4}
5
6class FlagTendencyActionData : ActionData
7{
9};
10
13{
14 bool m_switch_to;
16 {
17 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
18 }
19
20 override void CreateConditionComponents()
21 {
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 {
78 }
79
80 void SetFlagTendencyOnCurrentActionInvalid(bool state)
81 {
82
83 }
84};
TransferLiquidActionReciveData m_Tendency
int m_StanceMask
Definition actionbase.c:62
ref CCIBase m_ConditionItem
Definition actionbase.c:64
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
void Start()
Plays all elements this effects consists of.
Definition effect.c:157