Skip to content

Commit

Permalink
Update infobox_item_custom.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanopedia authored Oct 21, 2024
1 parent 1a478ed commit 267e37e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/infobox/wikis/deadlock/infobox_item_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ local DEFAULT_ATTRIBUTE_DISPLAY_FUNCTION = '_positiveConcatedArgsForBase'
---@return Html
function CustomItem.run(frame)
local item = CustomItem(frame)
item.args.image = item.args.image or 'Deadlock_gameasset_Item ' .. item.args.itemname .. '.png'
item.args.image = item.args.image or 'Deadlock_gameasset_Item ' .. item.args.name .. '.png'
item.args.subheader = item:_getCostDisplay()
item.args.imagesize = 100
item:setWidgetInjector(CustomInjector(item))
Expand Down Expand Up @@ -144,7 +144,7 @@ end
---@param args table
---@return string?
function CustomItem.nameDisplay(args)
return args.itemname
return args.name
end

---@return string
Expand Down Expand Up @@ -206,15 +206,15 @@ end
function CustomItem:setLpdbData(args)
local lpdbData = {
type = 'item',
name = args.itemname or self.pagename,
name = args.name or self.pagename,
image = args.image,
extradata = mw.ext.LiquipediaDB.lpdb_create_json({
cost = args.itemcost,
category = args.category,
removed = tostring(Logic.readBool(args.removed)),
})
}
mw.ext.LiquipediaDB.lpdb_datapoint('item_' .. (args.itemname or self.pagename), lpdbData)
mw.ext.LiquipediaDB.lpdb_datapoint('item_' .. (args.name or self.pagename), lpdbData)
end

return CustomItem

0 comments on commit 267e37e

Please sign in to comment.