文档目录
自动工作台界面
自动工作台:4×4 材料存储槽 + 图纸槽 + 配方选择按钮组(y 依数量 68/59/…)+ 能量条,176×184
自动工作台物品栏
2
铁板铜锭
工程师蓝图(铁机械零件)
import { IeAutoWorkbenchScreen } from "./index";
/**
* IeAutoWorkbenchScreen 预览用例:工程师蓝图(铁机械零件),材料齐备,能量 50%。
*/
export function IeAutoWorkbenchScreenDemo() {
return (
<IeAutoWorkbenchScreen
blueprint={{ icon: "wheat", tooltip: "工程师蓝图(铁机械零件)" }}
energy={{ max: 32000, value: 16000 }}
onRecipeSelect={() => {}}
onSlotClick={() => {}}
recipes={[
{ icon: "iron-ingot", selected: true, tooltip: "铁机械零件" },
]}
storage={[
{ count: 2, icon: "iron-ingot", tooltip: "铁板" },
{ count: 1, icon: "copper-ingot", tooltip: "铜锭" },
...Array.from({ length: 14 }, () => null),
]}
/>
);
}
安装
$pnpm add @tennantite/ienpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ie/src/ie-auto-workbench-screen/index.tsxnpm 包保留源码目录,可直接复制改造。