Module:Sandbox

-- Generates random New Horizons item name; adopted from Temtem Wiki, licensed under CC BY-NC-SA, authors listed here: https://temtem.wiki.gg/wiki/Module:Daily_tem?action=history local p = {} local cargo = mw.ext.cargo

function p.main(frame) local tables = 'nh_furniture' local count = cargo.query( tables, 'COUNT(DISTINCT en_name)=n', {'no html'})[1]['n'] math.randomseed(os.date("%Y%m%d"))

local args = { limit = 1, offset = math.floor(math.random * count), }   local results = cargo.query( tables, 'en_name', args ) local name = results[1]['en_name'] return name end

return p