Skip to content

Commit 1773b11

Browse files
committed
Fix linter
1 parent 8d21823 commit 1773b11

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

[gameplay]/glue_new/logic/SVehicleAttach.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function performAttachDetachTasksForPlayer(playerElement, attachTo)
1818
end
1919

2020
local function processAttachData(attachData)
21-
local attachDataTable = type(attachData, "table")
21+
local attachDataTable = typeCheck(attachData, "table")
2222

2323
if (not attachDataTable) then
2424
return false
@@ -33,7 +33,7 @@ local function processAttachData(attachData)
3333

3434
for attachDataID = 1, attachDataSize do
3535
local attachDataValue = attachData[attachDataID]
36-
local attachDataNumber = type(attachDataValue, "number")
36+
local attachDataNumber = typeCheck(attachDataValue, "number")
3737

3838
if (not attachDataNumber) then
3939
return false
@@ -50,7 +50,7 @@ local function adjustPlayerWeaponSlot(clientElement, attachElement, playerWeapon
5050
return false
5151
end
5252

53-
local playerWeaponSlotNumber = type(playerWeaponSlot, "number")
53+
local playerWeaponSlotNumber = typeCheck(playerWeaponSlot, "number")
5454

5555
if (not playerWeaponSlotNumber) then
5656
return false

[gameplay]/glue_new/utility/ShUtility.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
-- ## Version: 1.3.1 ##
55
-- #######################################
66

7-
local _type = type
8-
9-
function type(pData, ...)
10-
local dataType = _type(pData)
7+
function typeCheck(pData, ...)
8+
local dataType = type(pData)
119

1210
if (not ...) then
1311
return dataType
@@ -35,7 +33,7 @@ function isElementType(pElement, ...)
3533
end
3634

3735
local elementType = getElementType(pElement)
38-
local elementsType = type(...)
36+
local elementsType = typeCheck(...)
3937
local elementTable = (elementsType == "table")
4038
local elementTypes = (elementTable and ... or {...})
4139

0 commit comments

Comments
 (0)