Toggle menu
15
236
70
27.5K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.


From https://kenshi.fandom.com/wiki/Module:Price


local p = {}

local price_data = mw.loadData( 'Module:Price/data' )

function p.main( frame )
    local name = frame.args[1]
    local grade = frame.args[2]
    
    if name == nil or grade == nil then
        return "Missing data"
    end
    
    local item = price_data[name]
    
    if item == nil then
    	return "Missing data"
    end
    
    return item[grade] or "Missing data"
end

return p