Jump to content

Module:Tips and tricks: Difference between revisions

m
no edit summary
imported>Ttv pedro270707
(Created page with "local p = {} -- It is possible to move this to Module:Tips and tricks/tips p.tips = { "Press R (default) to open the Guidebook.", "Portals can be as large (or small) as you want.", "Making a Nether portal requires obsidian edges.", "The trommel lets you turn useless dirt into valuable resources.", "Cherry trees bloom in spring.", "Leather boots keep your crops safe from trampling.", "Season change every 7 days.", "Items pass thro...")
imported>Ttv pedro270707
mNo edit summary
Line 30: Line 30:
end
end


function p.getTipList( amount )
function p.getTipList( f )
local args = f
if f == mw.getCurrentFrame() then
args = require( 'Module:ProcessArgs' ).merge( true )
else
f = mw.getCurrentFrame()
end
local list = mw.html.create( 'ul' )
local list = mw.html.create( 'ul' )
for i = 1, amount do
for i = 1, args.amount do
local tip = mw.html.create( 'li' )
local tip = mw.html.create( 'li' )
tip:wikitext( p.getRandomTip( i ) )
tip:wikitext( p.getRandomTip( i ) )