mnscript
Dispenser Peripheral.GetConnectedDispenser()
Description ​
Attempts to find a connected Dispenser peripheral
Returns ​
Dispenser
- The Dispenser entity
Example ​
msc
using Peripheral;
using Application;
Dispenser dispenser = Peripheral.GetConnectedDispenser();
if(dispenser.IsValid() == false){
// If the dispenser was not connected to the terminal, quit.
Application.Exit();
}