Skip to content

Commit

Permalink
refactor!: PascalCase exports (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Jun 2, 2024
1 parent db46592 commit e9ea422
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions client/dead.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local function playDeadAnimation()
end
end

exports('playDeadAnimation', playDeadAnimation)
exports('PlayDeadAnimation', playDeadAnimation)

---put player in death animation and make invincible
function OnDeath()
Expand All @@ -45,7 +45,7 @@ function OnDeath()
SetEntityHealth(cache.ped, GetEntityMaxHealth(cache.ped))
end

exports('killPlayer', OnDeath)
exports('KillPlayer', OnDeath)

local function respawn()
local success = lib.callback.await('qbx_medical:server:respawn')
Expand Down Expand Up @@ -80,9 +80,9 @@ function AllowRespawn()
end
end

exports('allowRespawn', AllowRespawn)
exports('AllowRespawn', AllowRespawn)

exports('disableRespawn', function()
exports('DisableRespawn', function()
allowRespawn = false
end)

Expand Down
14 changes: 7 additions & 7 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ RespawnHoldTime = 5
LastStandDict = 'combat@damage@writhe'
LastStandAnim = 'writhe_loop'

exports('isDead', function()
exports('IsDead', function()
return DeathState == sharedConfig.deathState.DEAD
end)

exports('getLaststand', function()
exports('GetLaststand', function()
return DeathState == sharedConfig.deathState.LAST_STAND
end)

exports('getDeathTime', function()
exports('GetDeathTime', function()
return DeathTime
end)

exports('getLaststandTime', function()
exports('GetLaststandTime', function()
return LaststandTime
end)

exports('getRespawnHoldTimeDeprecated', function()
exports('GetRespawnHoldTimeDeprecated', function()
return RespawnHoldTime
end)

Expand Down Expand Up @@ -119,7 +119,7 @@ function MakePedLimp()
end

--- TODO: this export should not check any conditions, but force the ped to limp instead.
exports('makePedLimp', MakePedLimp)
exports('MakePedLimp', MakePedLimp)

local function resetMinorInjuries()
for bodyPartKey, injury in pairs(Injuries) do
Expand Down Expand Up @@ -167,7 +167,7 @@ function SendBleedAlert()
exports.qbx_core:Notify(Lang:t('info.bleed_alert', {bleedstate = sharedConfig.bleedingStates[BleedLevel]}), 'inform')
end

exports('sendBleedAlert', SendBleedAlert)
exports('SendBleedAlert', SendBleedAlert)

---adds a bleed to the player and alerts them. Total bleed level maxes at 4.
---@param level 1|2|3|4 speed of the bleed
Expand Down
2 changes: 1 addition & 1 deletion client/setdownedstate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ local function playLastStandAnimation()
end
end

exports('playLastStandAnimationDeprecated', playLastStandAnimation)
exports('PlayLastStandAnimationDeprecated', playLastStandAnimation)

---@param bool boolean
---TODO: this event name should be changed within qb-policejob to be generic
Expand Down
6 changes: 3 additions & 3 deletions client/wounding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local function makePlayerBlackout()
DoScreenFadeIn(1000)
end

exports('makePlayerBlackout', makePlayerBlackout)
exports('MakePlayerBlackout', makePlayerBlackout)

local function makePlayerFadeOut()
DoScreenFadeOut(500)
Expand All @@ -53,7 +53,7 @@ local function makePlayerFadeOut()
DoScreenFadeIn(500)
end

exports('makePlayerFadeOut', makePlayerFadeOut)
exports('MakePlayerFadeOut', makePlayerFadeOut)

local function applyBleedEffects()
if not QBX.PlayerData then return end
Expand Down Expand Up @@ -88,7 +88,7 @@ local function removeBleed(level)
SendBleedAlert()
end

exports('removeBleed', removeBleed)
exports('RemoveBleed', removeBleed)

local function handleBleeding()
if DeathState ~= sharedConfig.deathState.ALIVE or BleedLevel <= 0 then return end
Expand Down

0 comments on commit e9ea422

Please sign in to comment.