Toggle menu
15
236
70
27.6K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 20:33, 26 May 2025 by Prd (talk | contribs) (Created page with "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 ")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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