Fix emmylua warnings
This commit is contained in:
@@ -55,9 +55,13 @@ core.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
|
|
||||||
for key, value in pairs(fields) do
|
for key, value in pairs(fields) do
|
||||||
if string.ends_with(key, '::item_button') then
|
if string.ends_with(key, '::item_button') then
|
||||||
---@type ItemStackString
|
---@type ItemStackString?
|
||||||
local stack = string.match(key, '(%S+)::item_button')
|
local stack = string.match(key, '(%S+)::item_button')
|
||||||
|
|
||||||
|
if stack == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
core.log(tostring(stack))
|
core.log(tostring(stack))
|
||||||
|
|
||||||
---@type InvRef
|
---@type InvRef
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ end
|
|||||||
--- @return boolean
|
--- @return boolean
|
||||||
function table.contains(t, value)
|
function table.contains(t, value)
|
||||||
ensureArgType(t, 'table', 1, 'table.contains')
|
ensureArgType(t, 'table', 1, 'table.contains')
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: param-type-not-match
|
||||||
return tableKeyOf(t, value) ~= nil
|
return tableKeyOf(t, value) ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user