10 m_WorkCheckTimer =
new Timer;
25 if (GetCompEM().CanWork() && m_IsLowered)
26 m_WorkCheckTimer.Run(0.1,
this,
"SwitchOnNVGCheck",
null,
true);
34 GetCompEM().SwitchOff();
53 if (m_Strap == parent &&
PlayerBase.CastTo(
player, parent.GetHierarchyRootPlayer()))
127 if (GetAnimationPhase(
"rotate") != m_IsLowered)
128 m_IsLowered = GetAnimationPhase(
"rotate");
134 SetAnimationPhase(
"rotate", !
state);
135 m_IsLowered = !
state;
141 player.SetNVGLowered(m_IsLowered);
145 if (!
state && GetCompEM().CanWork())
146 GetCompEM().SwitchOn();
148 GetCompEM().SwitchOff();
155 GetCompEM().SwitchOn();
156 if (GetCompEM().IsSwitchedOn())
157 m_WorkCheckTimer.Stop();
165 switch (m_CurrentOpticMode)
175 Error(
"Undefined optic mode of " +
this);
void AddAction(typename actionName)
void RemoveAction(typename actionName)
override void SetActions()
override void EEItemAttached(EntityAI item, string slot_name)
override void OnWasDetached(EntityAI parent, int slot_id)
override void EEItemDetached(EntityAI item, string slot_name)
override int GetCurrentNVType()
override void OnWasAttached(EntityAI parent, int slot_id)
void RotateGoggles(bool state)
ref Timer m_WorkCheckTimer
override void OnWorkStop()
override void OnWork(float consumed_energy)
override void OnWorkStart()
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.