From 991452cc4287c0b909350c7d45cd5aa269d81777 Mon Sep 17 00:00:00 2001 From: ChatDisabled <44729807+ChatDisabled@users.noreply.github.com> Date: Sun, 24 Dec 2023 19:00:38 +0100 Subject: [PATCH] fix: linter --- modules/hooks.lua | 1 + server/queue.lua | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/hooks.lua b/modules/hooks.lua index 98b3b8a71..78013e974 100644 --- a/modules/hooks.lua +++ b/modules/hooks.lua @@ -4,6 +4,7 @@ if not lib.checkDependency('ox_lib', '3.8.0', true) then error() return end local eventHooks = {} +-- luacheck: ignore local microtime = os.microtime local function triggerEventHooks(event, payload) diff --git a/server/queue.lua b/server/queue.lua index dbeff3947..14469cef9 100644 --- a/server/queue.lua +++ b/server/queue.lua @@ -52,6 +52,14 @@ end local joiningPlayers = {} local joiningPlayerCount = 0 +---@param license string +local function removePlayerJoining(license) + if joiningPlayers[license] then + joiningPlayerCount -= 1 + end + joiningPlayers[license] = nil +end + ---@param license string local function awaitPlayerJoinsOrDisconnects(license) local joiningData @@ -86,14 +94,6 @@ local function updatePlayerJoining(source, license) joiningPlayers[license] = { source = source, timestamp = os.time() } end ----@param license string -local function removePlayerJoining(license) - if joiningPlayers[license] then - joiningPlayerCount -= 1 - end - joiningPlayers[license] = nil -end - ---@type table local timingOut = {}