From 79111b3cbdcff64a6f01673019847d302bea294a Mon Sep 17 00:00:00 2001 From: Vanic Date: Sun, 18 Jan 2026 15:20:59 +0300 Subject: [PATCH] Fix emmylua warnings --- mods/CORE/adminCommands/init.lua | 6 +++++- mods/SYSTEM/Table/init.lua | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/CORE/adminCommands/init.lua b/mods/CORE/adminCommands/init.lua index de712b6..b8b0cd0 100644 --- a/mods/CORE/adminCommands/init.lua +++ b/mods/CORE/adminCommands/init.lua @@ -55,9 +55,13 @@ core.register_on_player_receive_fields(function(player, formname, fields) for key, value in pairs(fields) do if string.ends_with(key, '::item_button') then - ---@type ItemStackString + ---@type ItemStackString? local stack = string.match(key, '(%S+)::item_button') + if stack == nil then + return + end + core.log(tostring(stack)) ---@type InvRef diff --git a/mods/SYSTEM/Table/init.lua b/mods/SYSTEM/Table/init.lua index 5f8c0f3..9411937 100644 --- a/mods/SYSTEM/Table/init.lua +++ b/mods/SYSTEM/Table/init.lua @@ -57,6 +57,8 @@ end --- @return boolean function table.contains(t, value) ensureArgType(t, 'table', 1, 'table.contains') + + ---@diagnostic disable-next-line: param-type-not-match return tableKeyOf(t, value) ~= nil end