此模板使用了模块:Grinding,此脚本使用Lua编写。
更多详情,请参阅维基百科:Lua和MediaWiki:扩展:Scribunto。
您可以使用该模板创建使用砂轮修复武器或工具的表格。该模板的使用方法与{{Grindstone}}
相似,不同之处在于它会为您创建表格。
默认情况下,该模板所生成的表格包含3列:名称、材料和包含{{Grindstone}}
的主列。您可以通过设置参数{{{showname=1}}}
或{{{showname=0}}}
来选择是否显示“名称”一列。想要将多个砂轮配方的表格合并为一个,您还需要在第一个和最后一个模板内分别设置参数{{{head=1}}}
和{{{foot=1}}}
。
示例用法:
{{Grinding |head=1 |showdescription=1 |ingredients=2x Damaged Wooden Sword or<br>2x Damaged Stone Sword or<br>2x Damaged Iron Sword or<br>2x Damaged Golden Sword or<br>2x Damaged Diamond Sword |Damaged Wooden Sword; Damaged Stone Sword; Damaged Iron Sword; Damaged Golden Sword; Damaged Diamond Sword |Damaged Wooden Sword; Damaged Stone Sword; Damaged Iron Sword; Damaged Golden Sword; Damaged Diamond Sword |Wooden Sword; Stone Sword; Iron Sword; Golden Sword; Diamond Sword |description=The durability of the two swords is added together, plus an extra 5% durability. }} {{Grinding |ingredients=2x Damaged Elytra |Damaged Elytra |Damaged Elytra |Elytra |description=The durability of the two elytra pairs are added together, plus an extra 5% durability. |foot=1 }}
结果:
名称 | 材料 | 砂轮配方 | 描述 |
---|---|---|---|
木剑或 石剑或 铁剑或 金剑或 钻石剑 |
2x Damaged Wooden Sword or 2x Damaged Stone Sword or 2x Damaged Iron Sword or 2x Damaged Golden Sword or 2x Damaged Diamond Sword |
The durability of the two swords is added together, plus an extra 5% durability. | |
鞘翅 | 2x Damaged Elytra | The durability of the two elytra pairs are added together, plus an extra 5% durability. |