Fix emmylua warnings

This commit is contained in:
Van
2026-01-18 15:20:59 +03:00
parent 087a8eee86
commit 79111b3cbd
2 changed files with 7 additions and 1 deletions

View File

@@ -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

View File

@@ -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