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().CanSwitchOn() && m_flashlight.GetCompEM().CanWork() )
45 override void OnExecuteServer(
ActionData action_data )
47 if ( m_flashlight.HasEnergyManager() )
49 if ( m_flashlight.GetCompEM().CanWork() )
51 m_flashlight.GetCompEM().SwitchOn();
53 Weapon_Base.Cast(action_data.m_MainItem).FlashlightOn();