Updated config with new keys, changed control manager to use config

This commit is contained in:
Dan
2019-12-04 11:37:28 +00:00
parent 42e3498115
commit 3784f023a2
2 changed files with 15 additions and 20 deletions

View File

@@ -1083,27 +1083,18 @@ function RADAR:RunControlManager()
self.config.debug_mode = not self.config.debug_mode self.config.debug_mode = not self.config.debug_mode
end end
if ( IsDisabledControlJustPressed( 1, 166 ) ) then -- Opens the remote control
if ( IsDisabledControlJustPressed( 1, self.config.remote_control_key ) ) then
self:OpenRemote() self:OpenRemote()
end end
--[[ if ( IsDisabledControlJustPressed( 1, 117 ) ) then -- Locks speed from front antenna
self:TogglePower() if ( IsDisabledControlJustPressed( 1, self.config.front_lock_key ) ) then
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
self:LockAntennaSpeed( "front" ) self:LockAntennaSpeed( "front" )
end end
-- 'Num5' key, locks speed from rear antenna -- Locks speed from rear antenna
if ( IsDisabledControlJustPressed( 1, 112 ) ) then if ( IsDisabledControlJustPressed( 1, self.config.rear_lock_key ) ) then
self:LockAntennaSpeed( "rear" ) self:LockAntennaSpeed( "rear" )
end end
end end

View File

@@ -11,16 +11,20 @@ RADAR.config = {}
-- Radar Control Panel key -- Radar Control Panel key
-- The default key to open the radar control panel is 166 (F5 - INPUT_SELECT_CHARACTER_MICHAEL) -- 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 -- Radar front antenna lock/unlock Key
-- The default key to unlock/reset the radar is 244 (M - INPUT_INTERACTION_MENU) -- The default key to lock/unlock the front antenna is 111 (Numpad 8 - INPUT_VEH_FLY_PITCH_UP_ONLY)
RADAR.config.reset_key = 244 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 -- 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 -- 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 -- false = no blips
RADAR.config.fast_lock_blips = true -- RADAR.config.fast_lock_blips = true
-- Debug mode -- Debug mode
RADAR.config.debug_mode = false RADAR.config.debug_mode = false