AdminListUI: fix non-smc select items
This commit is contained in:
@@ -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:')
|
||||||
|
|||||||
Reference in New Issue
Block a user