Differences

This shows you the differences between two versions of the page.

Link to this comparison view

component:tank_controller:zh [2023/11/26 15:59]
hfsr created
component:tank_controller:zh [2023/11/26 16:23] (current)
hfsr [Component: Tank Controller]
Line 1: Line 1:
-Component: Tank Controller+组件:储罐控制器
 ========================== ==========================
-**Component name:** `tank_controller`+此组件由[[item:tank_controller_upgrade:​zh|储罐控制器升级]]提供。
  
-This component is provided by the [[item:​tank_controller_upgrade|tank controller upgrade]].+有了此API后,机器人可储存流体,还可以从世界和储罐“抽取”流体,或者向它们“倾倒”流体。此API还让机器人得以读取其物品栏中流体容器的更多信息,以及检查流体堆。
  
-With this API the robot can store fluids, "​suck"​ fluids, and "​drop"​ fluids to and from tanks and the world. It also allows the robot to receive additional information about fluid containers in the robot'​s inventory, as well as inspecting fluid stacks.+组件名:`tank_controller`。
  
-Callbacks:+回调函数:
  
 - `getTankCapacity(side:​number):​number or nil[, string]`  ​ - `getTankCapacity(side:​number):​number or nil[, string]`  ​
-  ​Get the capacity of the tank on the specified side of the robot. Back refers to the robot'​s own selected tank.+  ​获取机器人指定方向处储罐的容量。指定后方(`sides.back`)将访问机器人内部的选定储罐。 ​  
 +\\
 - `getTankLevel(side:​number):​number or nil[,​string]`  ​ - `getTankLevel(side:​number):​number or nil[,​string]`  ​
-  ​Gets amount of fluid in tank on specified side.+  ​获取机器人指定方向处储罐中的流体存量。 ​  
 +\\
 - `getFluidInTank(side:​number):​table`  ​ - `getFluidInTank(side:​number):​table`  ​
-  ​Get a description of the fluid in the the tank on the specified side of the robot. ​**Note:** sides.back ​deprecated, use `getFluidInInternalTank()`+  ​获取机器人指定方向处储罐中流体的信息。 ​  
 +**注意:**`sides.back`已被弃用,请用`getFluidInInternalTank()`代替。 ​  
 +\\
 - `getFluidInInternalTank(slot):​table` - `getFluidInInternalTank(slot):​table`
-  ​Get a description of fluid in the specified or selected slot of robot inventory.+  ​获取机器人物品栏中指定槽位或当前选定槽位中的流体信息。 ​  
 +\\
 - `drain([amount:​number]):​boolean`  ​ - `drain([amount:​number]):​boolean`  ​
-  ​Transfers fluid from a tank in the selected inventory slot to the selected tank. If the amount of fluid that would be generated from the item is too large to fit into the tank (for example buckets will usually generate 1000) nothing will happen, that is no fluid is lost.+  ​从物品栏当前选定槽位中的储罐,向机器人的当前选定储罐转移流体。若物品栏中储罐产生的流体量太大,无法装进机器人的储罐(例如桶只能产生1000mb的流体)则不会进行任何操作,也不会丢失流体。 ​  
 +\\
 - `fill([amount:​number]):​boolean`  ​ - `fill([amount:​number]):​boolean`  ​
-  ​Transfers fluid from the selected tank to a tank in the selected inventory slot. If the specified amount is too low (for example for buckets the minimum amount will usually be 1000) nothing will happen, that is no fluid is lost.+  ​从机器人的当前选定储罐,向物品栏当前选定槽位中的储罐转移流体。若给定转移量太小(例如对桶而言至少要转移1000mb流体)则不会进行任何操作,也不会丢失流体。 ​  
 +\\
 - `getTankCapacityInSlot(slot:​number):​number`  ​ - `getTankCapacityInSlot(slot:​number):​number`  ​
-  ​Gets capacity of tank in specified or selected slot of the robot inventory.+  ​获取机器人物品栏中指定或当前选定槽位中储罐的容量。 ​  
 +\\
 - `getTankLevelInSlot(slot:​number):​number`  ​ - `getTankLevelInSlot(slot:​number):​number`  ​
-  ​Gets amount of fluid tank item in specified or selected slot of the robot inventory.+  ​获取机器人物品栏中指定或当前选定槽位中储罐的流体存量。 ​  
 +\\
 - `getFluidInTankInSlot(slot:​number):​table`  ​ - `getFluidInTankInSlot(slot:​number):​table`  ​
-  ​Gets description of fluid in tank item in the specified or selected slot of the robot inventory.+  ​获取机器人物品栏中指定或当前选定槽位中储罐所存储流体的信息。
  
 目录 目录
 ---- ----
 {{page>​component:​contents:​zh&​noheader&​noeditbutton&​nouser&​nofooter}} {{page>​component:​contents:​zh&​noheader&​noeditbutton&​nouser&​nofooter}}