打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

本站正在进行早期测试,目前仍存在许多内容的缺失。

模块:Seed/doc:修订间差异

来自星砂岛百科
Sizau-bot留言 | 贡献
同步更新
 
Sizau-bot留言 | 贡献
同步更新
 
第1行: 第1行:
== 概述 ==
== 概述 ==
'''Seed''' 提供种子域的数据读取与配方列表渲染,供 {{tl|Infobox seed}} {{tl|SeedRecipes}} 调用。
'''Seed''' 提供种子域的数据读取与配方列表渲染,供 {{tl|Infobox seed}} {{tl|SeedRecipes}} 调用。


== 用法 ==
== 用法 ==
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
{{#invoke:Seed|getField|玉米种子|crop_item_link}}
{{#invoke:Seed|getField|土豆种子|type_display}}
{{#invoke:Seed|processRecipeList|玉米种子}}
{{#invoke:Seed|processRecipeList|土豆种子}}
{{#invoke:Seed|productionRecipeList|玉米种子}}
{{#invoke:Seed|productionRecipeList|土豆种子}}
</syntaxhighlight>
 
== 示例 ==
<syntaxhighlight lang="wikitext">
{{#invoke:Seed|getField|玉米种子|origin}}
</syntaxhighlight>
</syntaxhighlight>


第22行: 第17行:
== 数据来源 ==
== 数据来源 ==
* [[数据:Seed/seed_index.json]]
* [[数据:Seed/seed_index.json]]
* [[数据:Seed/seed_mapping.json]]
* [[数据:Item/item_mapping.json]]


[[分类:模块文档]]
[[分类:模块文档]]

2026年3月17日 (二) 14:18的最新版本

概述

Seed 提供种子域的数据读取与配方列表渲染,供 {{Infobox seed}}{{SeedRecipes}} 调用。

用法

{{#invoke:Seed|getField|土豆种子|type_display}}
{{#invoke:Seed|processRecipeList|土豆种子}}
{{#invoke:Seed|productionRecipeList|土豆种子}}

函数

  • getField:读取条目字段,默认查当前页面标题。
  • processRecipeList:渲染加工配方列表。
  • productionRecipeList:渲染产出配方列表。
  • machineList:返回关联机器名称列表。

数据来源