pub struct TankController(pub Address);Expand description
The tank_controller component (10 methods).
Provided by OpenComputers’ UpgradeTankController$Adapter, UpgradeTankController$Drone, UpgradeTankController$Robot.
Tuple Fields§
§0: AddressImplementations§
Source§impl TankController
impl TankController
Sourcepub fn drain(&self, amount: Option<Number>) -> Result<bool>
pub fn drain(&self, amount: Option<Number>) -> Result<bool>
Transfers fluid from a tank in the selected inventory slot to the selected tank.
Lua: tank_controller.drain([amount:number]):boolean
Indirect call: waits for the next server tick.
Sourcepub async fn drain_async(&self, amount: Option<Number>) -> Result<bool>
pub async fn drain_async(&self, amount: Option<Number>) -> Result<bool>
Self::drain without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn fill(&self, amount: Option<Number>) -> Result<bool>
pub fn fill(&self, amount: Option<Number>) -> Result<bool>
Transfers fluid from the selected tank to a tank in the selected inventory slot.
Lua: tank_controller.fill([amount:number]):boolean
Indirect call: waits for the next server tick.
Sourcepub async fn fill_async(&self, amount: Option<Number>) -> Result<bool>
pub async fn fill_async(&self, amount: Option<Number>) -> Result<bool>
Self::fill without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_fluid_in_internal_tank(&self, tank: Option<Number>) -> Result<Value>
pub fn get_fluid_in_internal_tank(&self, tank: Option<Number>) -> Result<Value>
Get a description of the fluid in the tank in the specified slot or the selected slot.
Lua: tank_controller.getFluidInInternalTank([tank:number]):table
Indirect call: waits for the next server tick.
Sourcepub async fn get_fluid_in_internal_tank_async(
&self,
tank: Option<Number>,
) -> Result<Value>
pub async fn get_fluid_in_internal_tank_async( &self, tank: Option<Number>, ) -> Result<Value>
Self::get_fluid_in_internal_tank without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_fluid_in_tank(
&self,
side: impl Into<Number>,
tank: Option<Number>,
) -> Result<Value>
pub fn get_fluid_in_tank( &self, side: impl Into<Number>, tank: Option<Number>, ) -> Result<Value>
Get a description of the fluid in the tank on the specified side.
Lua: tank_controller.getFluidInTank(side:number [, tank:number]):table
Indirect call: waits for the next server tick.
Sourcepub async fn get_fluid_in_tank_async(
&self,
side: impl Into<Number>,
tank: Option<Number>,
) -> Result<Value>
pub async fn get_fluid_in_tank_async( &self, side: impl Into<Number>, tank: Option<Number>, ) -> Result<Value>
Self::get_fluid_in_tank without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_fluid_in_tank_in_slot(&self, slot: Option<Number>) -> Result<Value>
pub fn get_fluid_in_tank_in_slot(&self, slot: Option<Number>) -> Result<Value>
Get a description of the fluid in the tank item in the specified slot or the selected slot.
Lua: tank_controller.getFluidInTankInSlot([slot:number]):table
Indirect call: waits for the next server tick.
Sourcepub async fn get_fluid_in_tank_in_slot_async(
&self,
slot: Option<Number>,
) -> Result<Value>
pub async fn get_fluid_in_tank_in_slot_async( &self, slot: Option<Number>, ) -> Result<Value>
Self::get_fluid_in_tank_in_slot without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_tank_capacity(
&self,
side: impl Into<Number>,
tank: Option<Number>,
) -> Result<Number>
pub fn get_tank_capacity( &self, side: impl Into<Number>, tank: Option<Number>, ) -> Result<Number>
Get the capacity of the tank on the specified side.
Lua: tank_controller.getTankCapacity(side:number [, tank:number]):number
Indirect call: waits for the next server tick.
Sourcepub async fn get_tank_capacity_async(
&self,
side: impl Into<Number>,
tank: Option<Number>,
) -> Result<Number>
pub async fn get_tank_capacity_async( &self, side: impl Into<Number>, tank: Option<Number>, ) -> Result<Number>
Self::get_tank_capacity without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_tank_capacity_in_slot(&self, slot: Option<Number>) -> Result<Number>
pub fn get_tank_capacity_in_slot(&self, slot: Option<Number>) -> Result<Number>
Get the capacity of the tank item in the specified slot of the robot or the selected slot.
Lua: tank_controller.getTankCapacityInSlot([slot:number]):number
Indirect call: waits for the next server tick.
Sourcepub async fn get_tank_capacity_in_slot_async(
&self,
slot: Option<Number>,
) -> Result<Number>
pub async fn get_tank_capacity_in_slot_async( &self, slot: Option<Number>, ) -> Result<Number>
Self::get_tank_capacity_in_slot without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_tank_count(&self, side: impl Into<Number>) -> Result<Number>
pub fn get_tank_count(&self, side: impl Into<Number>) -> Result<Number>
Get the number of tanks available on the specified side.
Lua: tank_controller.getTankCount(side:number):number
Indirect call: waits for the next server tick.
Sourcepub async fn get_tank_count_async(
&self,
side: impl Into<Number>,
) -> Result<Number>
pub async fn get_tank_count_async( &self, side: impl Into<Number>, ) -> Result<Number>
Self::get_tank_count without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_tank_level(
&self,
side: impl Into<Number>,
tank: Option<Number>,
) -> Result<Number>
pub fn get_tank_level( &self, side: impl Into<Number>, tank: Option<Number>, ) -> Result<Number>
Get the amount of fluid in the tank on the specified side.
Lua: tank_controller.getTankLevel(side:number [, tank:number]):number
Indirect call: waits for the next server tick.
Sourcepub async fn get_tank_level_async(
&self,
side: impl Into<Number>,
tank: Option<Number>,
) -> Result<Number>
pub async fn get_tank_level_async( &self, side: impl Into<Number>, tank: Option<Number>, ) -> Result<Number>
Self::get_tank_level without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_tank_level_in_slot(&self, slot: Option<Number>) -> Result<Number>
pub fn get_tank_level_in_slot(&self, slot: Option<Number>) -> Result<Number>
Get the amount of fluid in the tank item in the specified slot or the selected slot.
Lua: tank_controller.getTankLevelInSlot([slot:number]):number
Indirect call: waits for the next server tick.
Sourcepub async fn get_tank_level_in_slot_async(
&self,
slot: Option<Number>,
) -> Result<Number>
pub async fn get_tank_level_in_slot_async( &self, slot: Option<Number>, ) -> Result<Number>
Self::get_tank_level_in_slot without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Trait Implementations§
Source§impl Clone for TankController
impl Clone for TankController
Source§impl Component for TankController
impl Component for TankController
Source§fn from_address(address: Address) -> Self
fn from_address(address: Address) -> Self
fn address(&self) -> &Address
Source§fn at(address: impl Into<Address>) -> Option<Self>
fn at(address: impl Into<Address>) -> Option<Self>
address, if it is of this type.Source§fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
Source§fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
Component::invoke without blocking; see invoke_async.