11 override void CreateConditionComponents()
17 override bool HasTarget()
27 m_flashlight =
ItemBase.Cast(item.FindAttachmentBySlotName(
"weaponFlashlight"));
32 m_flashlight =
ItemBase.Cast(item.FindAttachmentBySlotName(
"pistolFlashlight"));
37 if ( m_flashlight && m_flashlight.HasEnergyManager() && m_flashlight.GetCompEM().CanSwitchOff() )
45 override void OnExecuteServer(
ActionData action_data )
47 if ( m_flashlight.HasEnergyManager() )
49 if ( m_flashlight.GetCompEM().IsSwitchedOn() )
51 m_flashlight.GetCompEM().SwitchOff();
53 Weapon_Base.Cast(action_data.m_MainItem).FlashlightOff();