Jump to content

Editing Module:Neighbor Journey

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 77: Line 77:
local output = {
local output = {
"{| class=\"wikitable wikitable--stripe\"",
"{| class=\"wikitable wikitable--stripe\"",
"! width=155px | Node !! Quantity !! Title !! {{Item|Dough|notext=1}}"
"! Node !! Quantity !! Title !! {{Item|Dough|notext=1}}"
}
}


Line 96: Line 96:
-- Groups
-- Groups
----------------------------------------------------------------
----------------------------------------------------------------
local hasGroup = false


for _, group in ipairs(validGroups) do
for _, group in ipairs(validGroups) do
Line 106: Line 104:
-- Don't output groups that have no rewards.
-- Don't output groups that have no rewards.
if #rewards > 0 then
if #rewards > 0 then
-- Add a separator after Meet / between groups.
table.insert(output, "|-")
table.insert(output,
'! colspan="4" style="height:10px; min-height:5px; padding:0; border:0;" |'
)
hasGroup = true


-- Replace {name} with the neighbor's name.
-- Replace {name} with the neighbor's name.
Line 138: Line 128:
table.insert(output,
table.insert(output,
"| " .. first.quantity ..
"| " .. first.quantity ..
" || '''" .. first.title .. "''' || " ..
" || '''" .. first.title .. "''' " ..
first.dough
"|| " .. first.dough
)
)


Line 149: Line 139:
table.insert(output,
table.insert(output,
"| " .. reward.quantity ..
"| " .. reward.quantity ..
" || '''" .. reward.title .. "''' || " ..
" || '''" .. reward.title .. "''' " ..
reward.dough
"|| " .. reward.dough
)
)
end
end
Line 159: Line 149:
table.insert(output, "|}")
table.insert(output, "|}")


-- Process generated wikitext so that templates
return table.concat(output, "\n")
-- such as {{Icon/Journey}} and {{Item}} are evaluated.
local result = table.concat(output, "\n")
 
return frame:preprocess(result)
end
end


return p
return p
Please note that all contributions to The Petit Planet Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Petit Planet Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.
File Pages==Summary====Licensing=={{Fairuse}}{{File|}}
Dynamic Page List¦²«»²{¦}²«»«/»«!----»
Array in DPL¹^2{}^2^2{¹}^2
Parser Functions{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}
Markup{{}}|[][[]][[Category:]]#REDIRECT [[]] [[Category:Redirect Pages]]<code></code><includeonly></includeonly><noinclude></noinclude><nowiki></nowiki><!----><br>§
Notices{{Stub|}}{{Stub Dialogue}}{{Upcoming}}{{Under Construction}}{{Placeholder|}}
Magic Words{{!}}{{formatnum:}}{{lc:}}{{uc:}}{{PAGENAME}}{{FULLPAGENAME}}{{ROOTPAGENAME}}{{BASEPAGENAME}}{{SUBPAGENAME}}{{DISPLAYTITLE:|noreplace}}__TOC____NOTOC____EXPECTUNUSEDCATEGORY____HIDDENCAT__
HTML Entities&mdash;&nbsp;&comma;&shy;