Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionturnvalveundergroundreservoir.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(2);
6  }
7 }
8 
10 {
11 
13  {
14  m_CallbackClass = ActionTurnValveUndergroundReservoirCB;
15  }
16 
17  override protected void CreateAndSetupActionCallback( ActionData action_data )
18  {
19  super.CreateAndSetupActionCallback(action_data);
20 
21  Land_Underground_WaterReservoir reservoir = Land_Underground_WaterReservoir.Cast(action_data.m_Target.GetObject());
22  if (reservoir)
23  {
24  if (action_data.m_Callback)
25  {
26  array<vector> data = reservoir.GetValveAligningPointsWS(reservoir.GetTurnableValveIndex(action_data.m_Target.GetComponentIndex()));
27  vector position = data[0];
28  vector direction = data[1] - data[0];
29 
30  action_data.m_Callback.SetAligning(position, direction.Normalized());
31  }
32  }
33  }
34 
35  override void OnStartAnimationLoopServer(ActionData action_data)
36  {
37  super.OnStartAnimationLoopServer(action_data);
38 
39  Land_Underground_WaterReservoir reservoir = Land_Underground_WaterReservoir.Cast(action_data.m_Target.GetObject());
40  if (reservoir)
41  {
42  reservoir.OnValveManipulationStart(reservoir.GetTurnableValveIndex(action_data.m_Target.GetComponentIndex()));
43  }
44  }
45 
46  override void OnEndAnimationLoop(ActionData action_data)
47  {
48  super.OnEndAnimationLoop(action_data);
49 
50  Land_Underground_WaterReservoir reservoir = Land_Underground_WaterReservoir.Cast(action_data.m_Target.GetObject());
51  if (reservoir)
52  {
53  reservoir.OnValveManipulationCanceled(reservoir.GetTurnableValveIndex(action_data.m_Target.GetComponentIndex()));
54  }
55  }
56 
57  override void OnFinishProgressServer(ActionData action_data)
58  {
59  super.OnFinishProgressServer(action_data);
60 
61  Land_Underground_WaterReservoir reservoir = Land_Underground_WaterReservoir.Cast(action_data.m_Target.GetObject());
62  if (reservoir)
63  {
64  reservoir.OnValveManipulationEnd(reservoir.GetTurnableValveIndex(action_data.m_Target.GetComponentIndex()));
65  }
66  }
67 }
CAContinuousTime
Definition: cacontinuoustime.c:1
CreateAndSetupActionCallback
override protected void CreateAndSetupActionCallback(ActionData action_data)
Definition: actionturnvalveundergroundreservoir.c:17
ActionTurnValveUndergroundReservoir
ActionTurnValveUndergroundReservoirCB ActionTurnValveCB ActionTurnValveUndergroundReservoir()
Definition: actionturnvalveundergroundreservoir.c:12
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actionturnvalveundergroundreservoir.c:57
ActionTurnValve
ActionTurnValveCB ActionContinuousBaseCB ActionTurnValve()
Definition: actionturnvalve.c:11
vector
Definition: enconvert.c:105
ActionData
Definition: actionbase.c:20
OnEndAnimationLoop
override void OnEndAnimationLoop(ActionData action_data)
Definition: actionturnvalveundergroundreservoir.c:46
ActionTurnValveCB
Definition: actionturnvalve.c:1
array< vector >
OnStartAnimationLoopServer
override void OnStartAnimationLoopServer(ActionData action_data)
Definition: actionturnvalveundergroundreservoir.c:35
Land_Underground_WaterReservoir
void Land_Underground_WaterReservoir()
Definition: land_underground_waterreservoir.c:153
ActionTurnValveUndergroundReservoirCB
Definition: actionturnvalveundergroundreservoir.c:1