Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
component:agent [2018/10/01 07:27]
payonel
component:agent [2021/12/01 06:45] (current)
ocawesome101 clarify documentation under `move()` regarding sides.
Line 25: Line 25:
 - `compareFluid(side:​number):​boolean` - `compareFluid(side:​number):​boolean`
   Compares fluid in the selected tank (requires a [[item:​tank_upgrade|Tank upgrade]]) to fluid in the world or in an external tank on the specified side of the robot. ​   Compares fluid in the selected tank (requires a [[item:​tank_upgrade|Tank upgrade]]) to fluid in the world or in an external tank on the specified side of the robot. ​
-- `drain([count:​number]):​boolean` ​  +- `drain(side:number[count:​number]):​boolean` ​  
-  Extracts the specified amount of fluid from the world or a tank in front of the robot. If no amount is specified, the robot will try to drain 1000mB. If the tank is unable to store the specified amount of fluid, the operation will fail (no fluid is lost in the process). +  Extracts the specified amount of fluid from the world or a tank on the specified side of the robot. If no amount is specified, the robot will try to drain 1000mB. If the tank is unable to store the specified amount of fluid, the operation will fail (no fluid is lost in the process). 
-- `fill([count:​number]):​boolean`  ​+- `fill(side:number[count:​number]):​boolean`  ​
   Fills the specified amount of fluid from the selected tank (requires a [[item:​tank_upgrade|Tank upgrade]]) into the world or a tank in front of the robot. If no amount is specified, the robot will try to fill the target tank with 1000mB of fluid. If there is not enough fluid to fill a block, or not enough space in the target tank, the operation will fail with no fluids lost.   Fills the specified amount of fluid from the selected tank (requires a [[item:​tank_upgrade|Tank upgrade]]) into the world or a tank in front of the robot. If no amount is specified, the robot will try to fill the target tank with 1000mB of fluid. If there is not enough fluid to fill a block, or not enough space in the target tank, the operation will fail with no fluids lost.
  
Line 85: Line 85:
   Get the durability of the currently equipped tool.   Get the durability of the currently equipped tool.
 - `move(direction:​number):​boolean`  ​ - `move(direction:​number):​boolean`  ​
-  Move in the specified direction. Valid movement sides are: front, back, top, bottom.+  Move in the specified direction. Valid movement sides are: front, back, top, bottom ​(see [[api:​sides|Sides]]).
 - `turn(clockwise:​boolean):​boolean`  ​ - `turn(clockwise:​boolean):​boolean`  ​
   Rotate in the specified direction.   Rotate in the specified direction.