1,131
edits
No edit summary |
No edit summary |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 27: | Line 27: | ||
{ name = 'description', func = 'has_content' }, | { name = 'description', func = 'has_content' }, | ||
{ name = 'members', func = 'yes_no' }, | { name = 'members', func = 'yes_no' }, | ||
{ name = 'donator', func = 'yes_no' }, | |||
{ name = 'level', func = 'number' }, | { name = 'level', func = 'number' }, | ||
{ name = 'cost', func = 'has_content' }, -- Todo: Unbuyable | { name = 'cost', func = 'has_content' }, -- Todo: Unbuyable | ||
| Line 34: | Line 35: | ||
{ name = 'tradeable', func = 'yes_no' }, | { name = 'tradeable', func = 'yes_no' }, | ||
{ name = 'craftable', func = 'yes_no' }, | |||
{ name = 'brewable', func = 'yes_no' }, | |||
{ name = 'quest', func = 'has_content' }, | { name = 'quest', func = 'has_content' }, | ||
| Line 64: | Line 67: | ||
{ name = 'damage', func = 'has_content' }, | { name = 'damage', func = 'has_content' }, | ||
{ name = 'weapon_effect', func = 'has_content' }, | |||
-- Tool Params -- | -- Tool Params -- | ||
| Line 76: | Line 80: | ||
{ name = 'mine_level', func = 'has_content' }, | { name = 'mine_level', func = 'has_content' }, | ||
{ name = 'fish_level', func = 'has_content' }, | { name = 'fish_level', func = 'has_content' }, | ||
{ name = 'chop_level', func = 'has_content' }, | |||
{ name = 'ring_effect', func = 'has_content' }, | |||
{ name = 'necklace_effect', func = 'has_content' }, | |||
} | } | ||
| Line 89: | Line 97: | ||
ret:defineLinks({ hide = true }) | ret:defineLinks({ hide = true }) | ||
ret:useSMWOne({ | |||
members = 'All Is members only', | |||
id_smw = 'All Item id', | |||
image_smw = 'All Image', | |||
}) | |||
ret:useSMWSubobject({ | |||
image = 'Image', | |||
release = 'Release date', | |||
id = 'Item ID', | |||
description = 'Description', | |||
members = 'Is members only', | |||
donator = 'Is donator item', | |||
level = 'Item Level', | |||
cost = 'Buyable for', | |||
sell = 'Sellable for', | |||
tradeable = 'Tradeable', | |||
craftable = 'Craftable', | |||
brewable = 'Brewabel', | |||
market_sp_limit = 'Market sell limits', | |||
market_bp_limit = 'Market buy limits', | |||
type = 'Item Type', | |||
potion_type = 'Potion type', | |||
potion_effect = 'Potion effect', | |||
book_author = 'Book author', | |||
rune_tp = 'Rune teleport', | |||
damage = 'Damage', | |||
weapon_effect = 'Weapon effect', | |||
tool_type = 'Tool type', | |||
skill_level = 'Tool skill level', | |||
tool_effect = 'Tool effect', | |||
forage_level = 'Forage level', | |||
mine_level = 'Mine level', | |||
fish_level = 'Fish level', | |||
chop_level = 'Chop level', | |||
ring_effect = 'Ring effect', | |||
necklace_effect = 'Necklace effect', | |||
}) | |||
ret:addButtonsCaption() | ret:addButtonsCaption() | ||
| Line 143: | Line 176: | ||
{ tag = 'th', content = '[[Members]]', colspan = '7' }, | { tag = 'th', content = '[[Members]]', colspan = '7' }, | ||
{ tag = 'argd', content = 'members', colspan = '13' }, | { tag = 'argd', content = 'members', colspan = '13' }, | ||
} | |||
:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Donator item', colspan = '7' }, | |||
{ tag = 'argd', content = 'donator', colspan = '13' }, | |||
} | } | ||
:pad(20) | :pad(20) | ||
| Line 172: | Line 210: | ||
{ tag = 'th', content = 'Tradeable', colspan = '7' }, | { tag = 'th', content = 'Tradeable', colspan = '7' }, | ||
{ tag = 'argd', content = 'tradeable', colspan = '13' }, | { tag = 'argd', content = 'tradeable', colspan = '13' }, | ||
} | |||
:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Craftable', colspan = '7' }, | |||
{ tag = 'argd', content = 'craftable', colspan = '13' }, | |||
} | |||
:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Brewable', colspan = '7' }, | |||
{ tag = 'argd', content = 'brewable', colspan = '13' }, | |||
} | } | ||
| Line 302: | Line 352: | ||
{ tag = 'argd', content = 'damage', colspan = '13' }, | { tag = 'argd', content = 'damage', colspan = '13' }, | ||
} | } | ||
if ret:paramDefined('weapon_effect') then | |||
ret:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Effect', colspan = '7' }, | |||
{ tag = 'argd', content = 'weapon_effect', colspan = '13' }, | |||
} | |||
end | |||
end | end | ||
| Line 309: | Line 367: | ||
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "fishing rod" then | if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "fishing rod" then | ||
addToolRows(ret, 'Fishing Rod') | |||
end | |||
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "pickaxe" then | |||
addToolRows(ret, 'Pickaxe') | |||
end | |||
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "axe" then | |||
addToolRows(ret, 'Axe') | |||
end | |||
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "shears" then | |||
addToolRows(ret, 'Shears') | |||
end | |||
--[[ | |||
Add rows for ring stuff | |||
]] | |||
if ret:paramDefined('ring_effect') then | |||
ret:pad(20) | ret:pad(20) | ||
:addRow{ | :addRow{ | ||
{ tag = 'th', content = ' | { tag = 'th', content = 'Ring', class = 'infobox-subheader', colspan = '20' }, | ||
} | } | ||
:pad(20) | :pad(20) | ||
:addRow{ | :addRow{ | ||
{ tag = 'th', content = ' | { tag = 'th', content = 'Effect', colspan = '7' }, | ||
{ tag = 'argd', content = ' | { tag = 'argd', content = 'ring_effect', colspan = '13' }, | ||
} | |||
end | |||
--[[ | |||
Add rows for necklace stuff | |||
]] | |||
if ret:paramDefined('necklace_effect') then | |||
ret:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Necklace', class = 'infobox-subheader', colspan = '20' }, | |||
} | } | ||
:pad(20) | :pad(20) | ||
:addRow{ | :addRow{ | ||
{ tag = 'th', content = ' | { tag = 'th', content = 'Effect', colspan = '7' }, | ||
{ tag = 'argd', content = ' | { tag = 'argd', content = 'necklace_effect', colspan = '13' }, | ||
} | } | ||
end | |||
--[[ | --[[ | ||
| Line 370: | Line 455: | ||
{ tag = 'th', content = 'Level', colspan = '7' }, | { tag = 'th', content = 'Level', colspan = '7' }, | ||
{ tag = 'argd', content = 'fish_level', colspan = '13' }, | { tag = 'argd', content = 'fish_level', colspan = '13' }, | ||
} | |||
end | |||
if ret:paramDefined('chop_level') then | |||
ret:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Chop', class = 'infobox-subheader', colspan = '20' }, | |||
} | |||
:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Level', colspan = '7' }, | |||
{ tag = 'argd', content = 'chop_level', colspan = '13' }, | |||
} | } | ||
end | end | ||
| Line 383: | Line 480: | ||
return ret:tostring() | return ret:tostring() | ||
end | |||
function addToolRows(ret, title) | |||
ret:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = title, class = 'infobox-subheader', colspan = '20' }, | |||
} | |||
:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Type', colspan = '7' }, | |||
{ tag = 'argd', content = 'tool_type', colspan = '13' }, | |||
} | |||
:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Skill Level', colspan = '7' }, | |||
{ tag = 'argd', content = 'skill_level', colspan = '13' }, | |||
} | |||
if ret:paramDefined('tool_effect') then | |||
ret:pad(20) | |||
:addRow{ | |||
{ tag = 'th', content = 'Tool Effect', colspan = '7' }, | |||
{ tag = 'argd', content = 'tool_effect', colspan = '13' }, | |||
} | |||
end | |||
end | end | ||
| Line 394: | Line 516: | ||
mine_level = 'Mineable Items', | mine_level = 'Mineable Items', | ||
fish_level = 'Fishable Items', | fish_level = 'Fishable Items', | ||
chop_level = 'Choppable Items', | |||
}, | }, | ||
-- Added if the parameter has no content | -- Added if the parameter has no content | ||
| Line 408: | Line 531: | ||
value = 'Items missing value', | value = 'Items missing value', | ||
quest = 'Items missing quest', | quest = 'Items missing quest', | ||
craftable = 'Needs craftable status', | |||
brewable = 'Needs brewable status', | |||
type = 'Needs Type', | |||
}, | }, | ||
-- Parameters that have text | -- Parameters that have text | ||
| Line 413: | Line 539: | ||
matches = { | matches = { | ||
members = { yes = 'Members\' items', no = 'Free-to-play items' }, | members = { yes = 'Members\' items', no = 'Free-to-play items' }, | ||
donator = { yes = 'Donator items' }, | |||
rune_tp = { yes = 'Runes'}, | rune_tp = { yes = 'Runes'}, | ||
tradeable = { yes = 'Tradeable items', no = 'Untradeable items' }, | tradeable = { yes = 'Tradeable items', no = 'Untradeable items' }, | ||
craftable = { yes = 'Craftable items', no = 'Uncraftable items' }, | |||
brewable = { yes = 'Brewable items' }, | |||
type = { | type = { | ||
['book'] = 'Books', | ['book'] = 'Books', | ||