From 3784f023a2930e7f85caf4dfb8cc4b54a4877101 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 4 Dec 2019 11:37:28 +0000 Subject: [PATCH] Updated config with new keys, changed control manager to use config --- cl_radar.lua | 21 ++++++--------------- config.lua | 14 +++++++++----- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/cl_radar.lua b/cl_radar.lua index fa3cd34..6503d9f 100644 --- a/cl_radar.lua +++ b/cl_radar.lua @@ -1083,27 +1083,18 @@ function RADAR:RunControlManager() self.config.debug_mode = not self.config.debug_mode end - if ( IsDisabledControlJustPressed( 1, 166 ) ) then + -- Opens the remote control + if ( IsDisabledControlJustPressed( 1, self.config.remote_control_key ) ) then self:OpenRemote() end - --[[ if ( IsDisabledControlJustPressed( 1, 117 ) ) then - self:TogglePower() - UTIL:Notify( "Radar power toggled." ) - end ]] - - --[[ if ( IsDisabledControlJustPressed( 1, 118 ) ) then - self:ToggleFastDisplay() - UTIL:Notify( "Fast display toggled." ) - end ]] - - -- 'Num8' key, locks speed from front antenna - if ( IsDisabledControlJustPressed( 1, 111 ) ) then + -- Locks speed from front antenna + if ( IsDisabledControlJustPressed( 1, self.config.front_lock_key ) ) then self:LockAntennaSpeed( "front" ) end - -- 'Num5' key, locks speed from rear antenna - if ( IsDisabledControlJustPressed( 1, 112 ) ) then + -- Locks speed from rear antenna + if ( IsDisabledControlJustPressed( 1, self.config.rear_lock_key ) ) then self:LockAntennaSpeed( "rear" ) end end diff --git a/config.lua b/config.lua index f05d07e..3cce50d 100644 --- a/config.lua +++ b/config.lua @@ -11,16 +11,20 @@ RADAR.config = {} -- Radar Control Panel key -- The default key to open the radar control panel is 166 (F5 - INPUT_SELECT_CHARACTER_MICHAEL) -RADAR.config.control_panel_key = 166 +RADAR.config.remote_control_key = 166 --- Radar Unlock/Reset Key --- The default key to unlock/reset the radar is 244 (M - INPUT_INTERACTION_MENU) -RADAR.config.reset_key = 244 +-- Radar front antenna lock/unlock Key +-- The default key to lock/unlock the front antenna is 111 (Numpad 8 - INPUT_VEH_FLY_PITCH_UP_ONLY) +RADAR.config.front_lock_key = 111 + +-- Radar rear antenna lock/unlock Key +-- The default key to lock/unlock the rear antenna is 112 (Numpad 5 - INPUT_VEH_FLY_PITCH_DOWN_ONLY) +RADAR.config.rear_lock_key = 112 -- Fast Lock Blip -- true = vehicles that go over the fast limit will have a blip added to the minimap for a short period of time -- false = no blips -RADAR.config.fast_lock_blips = true +-- RADAR.config.fast_lock_blips = true -- Debug mode RADAR.config.debug_mode = false \ No newline at end of file