模块:Crop/doc:修订间差异
来自星砂岛百科
更多语言
更多操作
< 模块:Crop
同步更新 |
同步更新 |
||
| 第1行: | 第1行: | ||
== 概述 == | == 概述 == | ||
'''Crop''' 提供作物域的数据读取与配方列表渲染,供 {{tl|Infobox crop}} | '''Crop''' 提供作物域的数据读取与配方列表渲染,供 {{tl|Infobox crop}} 与 {{tl|CropRecipes}} 调用。 | ||
== 用法 == | == 用法 == | ||
<syntaxhighlight lang="wikitext"> | <syntaxhighlight lang="wikitext"> | ||
{{#invoke:Crop|getField| | {{#invoke:Crop|getField|土豆|seed_item_name}} | ||
{{#invoke:Crop|processRecipeList| | {{#invoke:Crop|processRecipeList|土豆}} | ||
{{#invoke:Crop|productionRecipeList| | {{#invoke:Crop|productionRecipeList|土豆}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 第22行: | 第17行: | ||
== 数据来源 == | == 数据来源 == | ||
* [[数据:Crop/crop_index.json]] | * [[数据:Crop/crop_index.json]] | ||
* [[数据: | * [[数据:Item/item_mapping.json]] | ||
[[分类:模块文档]] | [[分类:模块文档]] | ||
2026年3月17日 (二) 14:15的最新版本
概述
Crop 提供作物域的数据读取与配方列表渲染,供 {{Infobox crop}} 与 {{CropRecipes}} 调用。
用法
{{#invoke:Crop|getField|土豆|seed_item_name}}
{{#invoke:Crop|processRecipeList|土豆}}
{{#invoke:Crop|productionRecipeList|土豆}}
函数
getField:读取条目字段,默认查当前页面标题。processRecipeList:渲染加工配方列表。productionRecipeList:渲染产出配方列表。machineList:返回关联机器名称列表。