Module:LootChest: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 64: Line 64:
["enchant-with-levels-30"]    = "Enchantment probabilities are the same as a level-30 enchantment on an [[enchantment table]] that was able to apply [[treasure enchantment]]s (except [[Soul Speed]], and [[Swift Sneak]]), and where the chance of multiple enchantments is not reduced.",
["enchant-with-levels-30"]    = "Enchantment probabilities are the same as a level-30 enchantment on an [[enchantment table]] that was able to apply [[treasure enchantment]]s (except [[Soul Speed]], and [[Swift Sneak]]), and where the chance of multiple enchantments is not reduced.",
["enchant-with-levels-30-50"] = "Enchantment probabilities are the same as a level-30 to level-50 [[enchantment mechanics|enchantment]] would be on an [[enchantment table]] that had no cap at level 30, and that was able to apply [[treasure enchantment]]s (except [[Soul Speed]], and [[Swift Sneak]]), and where the chance of multiple enchantments is not reduced.",
["enchant-with-levels-30-50"] = "Enchantment probabilities are the same as a level-30 to level-50 [[enchantment mechanics|enchantment]] would be on an [[enchantment table]] that had no cap at level 30, and that was able to apply [[treasure enchantment]]s (except [[Soul Speed]], and [[Swift Sneak]]), and where the chance of multiple enchantments is not reduced.",
["damaged-0-0.01"] = "The item has between 0% and 1% of its total durability.",
["damaged-0-0.4"] = "The item has between 0% and 40% of its total durability.",
["damaged-0-0.5"] = "The item has between 0% and 50% of its total durability.",
["damaged-0.05-0.15"] = "The item has between 5% and 15% of its total durability.",
["damaged-0.05-0.15"] = "The item has between 5% and 15% of its total durability.",
["damaged-0.1-0.5"]  = "The item has between 10% and 50% of its total durability.",
["damaged-0.1-0.5"]  = "The item has between 10% and 50% of its total durability.",
Line 88: Line 91:
["random-effect-arrow"] = "The arrow has an ineffective hidden [[effect]] applied, including empty, water, mundane, thick, or awkward. As it is not a tipped arrow, this has no effect except make it unstackable with arrows that do not match the hidden effect. The effect applied can be seen with {{cmd|data get entity @s}}.",
["random-effect-arrow"] = "The arrow has an ineffective hidden [[effect]] applied, including empty, water, mundane, thick, or awkward. As it is not a tipped arrow, this has no effect except make it unstackable with arrows that do not match the hidden effect. The effect applied can be seen with {{cmd|data get entity @s}}.",
["enchant-randomly-multishot"] = "Any level between 1 and 12 of [[Multishot]] is equally probable.",
["enchant-randomly-multishot"] = "Any level between 1 and 12 of [[Multishot]] is equally probable.",
-- Custom Parallel notes --
["enchant-with-levels-39"] = "Enchantment probabilities are the same as a level-39 [[enchantment mechanics|enchantment]] would be on an [[enchantment table]] that had no cap at level 30, and that was able to apply [[treasure enchantment]]s (except [[Soul Speed]], and [[Swift Sneak]]), and where the chance of multiple enchantments is not reduced.",
["enchant-with-levels-50"] = "Enchantment probabilities are the same as a level-50 [[enchantment mechanics|enchantment]] would be on an [[enchantment table]] that had no cap at level 30, and that was able to apply [[treasure enchantment]]s (except [[Soul Speed]], and [[Swift Sneak]]), and where the chance of multiple enchantments is not reduced.",
},
},


Line 738: Line 745:
end
end


if p.items[itemname][1] == "item" then
s = sprite.link({name='ItemSprite', link, k ,id=m})
--s = p.current_frame:expandTemplate{ title = 'ItemLink', args = { link , k , id = m } }
elseif p.items[itemname][1] == "block" then
s = sprite.link({name='BlockSprite', link, k ,id=m})
--s = p.current_frame:expandTemplate{ title = 'BlockLink', args = { link , k , id = m } }
end
-- if p.items[itemname][1] == "item" then
-- if p.items[itemname][1] == "item" then
-- s = sprite.link({name='ItemSprite', link, k ,id=m})
-- s = sprite.link({name='InvSprite', link, k ,id=m})
-- --s = p.current_frame:expandTemplate{ title = 'ItemLink', args = { link , k , id = m } }
-- --s = p.current_frame:expandTemplate{ title = 'ItemLink', args = { link , k , id = m } }
-- elseif p.items[itemname][1] == "block" then
-- elseif p.items[itemname][1] == "block" then
-- s = sprite.link({name='BlockSprite', link, k ,id=m})
-- s = sprite.link({name='InvSprite', link, k ,id=m})
-- --s = p.current_frame:expandTemplate{ title = 'BlockLink', args = { link , k , id = m } }
-- --s = p.current_frame:expandTemplate{ title = 'BlockLink', args = { link , k , id = m } }
-- end
-- end
if p.items[itemname][1] == "item" then
s = sprite.link({name='InvSprite', link, k ,id=m})
--s = p.current_frame:expandTemplate{ title = 'ItemLink', args = { link , k , id = m } }
elseif p.items[itemname][1] == "block" then
s = sprite.link({name='InvSprite', link, k ,id=m})
--s = p.current_frame:expandTemplate{ title = 'BlockLink', args = { link , k , id = m } }
end


if p.items[itemname].note and p.notes[p.items[itemname].note] then
if p.items[itemname].note and p.notes[p.items[itemname].note] then
Line 1,514: Line 1,521:
local item = p.items[chest_item]
local item = p.items[chest_item]


table.insert( html, "\n<td>" )
local image, spriteCat = sprite.link{
id = item.id or chest_item,
link = item.link or string.gsub(chest_item,'-',' '),
text = item.title or q.titlecase(string.gsub(chest_item,'-',' ')),
wrap = 'true',
name = ( item[1] == 'item' and 'ItemSprite' or 'BlockSprite')
}
table.insert( html, image )
table.insert( html, spriteCat )
-- table.insert( html, "\n<td>" )
-- table.insert( html, "\n<td>" )
-- local image, spriteCat = sprite.link{
-- local image, spriteCat = sprite.link{
Line 1,520: Line 1,538:
-- text = item.title or q.titlecase(string.gsub(chest_item,'-',' ')),
-- text = item.title or q.titlecase(string.gsub(chest_item,'-',' ')),
-- wrap = 'true',
-- wrap = 'true',
-- name = ( item[1] == 'item' and 'ItemSprite' or 'BlockSprite' )
-- name = ( item[1] == 'item' and 'InvSprite' or 'InvSprite')
-- }
-- }
-- table.insert( html, image )
-- table.insert( html, image )
-- table.insert( html, spriteCat )
-- table.insert( html, spriteCat )
table.insert( html, "\n<td>" )
local image, spriteCat = sprite.link{
id = item.id or chest_item,
link = item.link or string.gsub(chest_item,'-',' '),
text = item.title or q.titlecase(string.gsub(chest_item,'-',' ')),
wrap = 'true',
name = ( item[1] == 'item' and 'InvSprite' )
}
table.insert( html, image )
table.insert( html, spriteCat )


if item.note and p.notes[item.note] then
if item.note and p.notes[item.note] then