AdminListUI: fix non-smc select items

This commit is contained in:
Van
2026-10-02 21:35:12 +03:00
parent 26a73117a9
commit 7ef96bd434

View File

@@ -48,7 +48,14 @@ local function getFormSpecString(self, playerName, isSelect)
if isSelect then if isSelect then
---@type ItemStackString ---@type ItemStackString
local item = self:getContex(playerName, 'select_item') local item = self:getContex(playerName, 'select_item')
local itemSettings = Smc.getItemDefinition(item).settings local itemDefinition = Smc.getItemDefinitionOrNil(item)
local itemSettings
if itemDefinition == nil then
itemSettings = core.registered_items[item]
else
itemSettings = itemDefinition.settings
end
listForm listForm
:itemImage(11, 0.5, 2, 2, item) :itemImage(11, 0.5, 2, 2, item)
:areaLabel(11, 4.5, 4, 1, 'Add to inventory:') :areaLabel(11, 4.5, 4, 1, 'Add to inventory:')