文档目录
灌装机界面
Thermal 灌装机界面(MachineBottlerScreen 176×166):输入槽、26×26 产物槽、medium 输入流体罐 (34,22)、流体进度箭头 (87,35)、scale_bubble 速度元素。
灌装机玩家
import {
THERMAL_DEMO_PLAYER_HOTBAR,
THERMAL_DEMO_PLAYER_MAIN,
} from "../thermal-demo-data";
import { ThermalBottlerScreen } from "./index";
/**
* ThermalBottlerScreen 预览用例:玻璃瓶 + 250mB 水 → 水瓶(灌装机 bottler)。
*/
export function ThermalBottlerScreenDemo() {
return (
<ThermalBottlerScreen
energy={{ amount: 240000, capacity: 400000 }}
fluid={{ amount: 250, capacity: 4000, tint: "#3c64c8" }}
input={{ count: 1, icon: "glass-bottle", tooltip: "玻璃瓶" }}
onSlotClick={() => {}}
output={{ count: 1, icon: "potion", tooltip: "水瓶" }}
playerHotbar={THERMAL_DEMO_PLAYER_HOTBAR}
playerItems={THERMAL_DEMO_PLAYER_MAIN}
progress={0.45}
speed={0.7}
/>
);
}
安装
$pnpm add @tennantite/thermalnpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/thermal/src/thermal-bottler-screen/index.tsxnpm 包保留源码目录,可直接复制改造。