FutureProg functions
setliquid
Overload 1
setliquid overload 1
Boolean setliquid(Item item, Number liquidId)
Available in
- computer function
- computer program
- standard futureprog
Sets a liquid container's contents to a full container of the selected liquid, or empties it if the ID is invalid. Returns false if the item is null or is not a liquid container.
| Parameter | Type | Description |
|---|---|---|
item |
Item |
The liquid container item to fill or empty. |
liquidId |
Number |
The liquid ID to fill the container with. Use 0 or an invalid ID to empty the container. |
Overload 2
setliquid overload 2
Boolean setliquid(Item item, Number liquidId, Number volume)
Available in
- computer function
- computer program
- standard futureprog
Sets a liquid container to the requested final volume. Invalid liquid IDs and invalid, negative, non-finite or over-capacity volumes return false without changing the container.
| Parameter | Type | Description |
|---|---|---|
item |
Item |
The liquid container item to fill or empty. |
liquidId |
Number |
The liquid ID to set, or 0 to empty only when volume is also 0. |
volume |
Number |
The desired final volume in base fluid-volume units; 0 empties the container. |