Skip to content

Commit

Permalink
feat: disable key search if chance is 0.0 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Sep 10, 2024
1 parent 86f1cfa commit 8dfa392
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ local isSearchLocked = false
local isSearchAllowed = false
local function setSearchLabelState(isAllowed)
if isSearchLocked and isAllowed then return end
if isAllowed and cache.vehicle and sharedFunctions.getVehicleConfig(cache.vehicle).findKeysChance == 0.0 then
isSearchAllowed = false
return
end
local isOpen, text = lib.isTextUIOpen()
local newText = locale('info.search_keys_dispatch')
local isValidMessage = text and text == newText
Expand Down

0 comments on commit 8dfa392

Please sign in to comment.