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
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

View File

@@ -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