Skip to content

Commit

Permalink
code adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbizu committed Jan 24, 2025
1 parent d283149 commit 15eb64b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/sounds/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*
!.gitignore
!README.md
!README.md
2 changes: 1 addition & 1 deletion data/things/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*
!.gitignore
!README.md
!README.md
4 changes: 2 additions & 2 deletions mods/game_bot/default_configs/vBot_4.8/vBot/alarms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ addAlarm("playerDetected", "Player Detected", false, 1, 1)
addAlarm("creatureName", "Creature Name:", "", 3, 1, "You can add a name or part of it, that if found in any visible creature name will trigger alert.\nYou can add many, just separate them by comma.")

local lastCall = now
function alarm(file, windowText)
local function alarm(file, windowText)
if now - lastCall < 2000 then return end -- 2s delay
lastCall = now

if not g_resources.fileExists(file) then
file = "../sounds/alarm.ogg"
file = "sounds/alarm.ogg"
lastCall = now + 4000 -- alarm.ogg length is 6s
end

Expand Down

0 comments on commit 15eb64b

Please sign in to comment.