Tank
Stores liquids and gases. When a liquid or gas touches the Tank, the Tank will automatically store it. Will not conduct heat when containing a fluid, making it a good heat storage part.
It is a craftable and spawnable non-flammable solid.
Here is a list of possible sizes that reach the maximum malleability (1000) that have integer components: 1x1000x1, 1x500x2, 1x250x4, 1x200x5, 1x125x8, 1x100x10, 1x50x20, 1x40x25, 2x250x2, 2x125x4, 2x100x5, 2x50x10, 2x25x20, 4x50x5, 4x25x10, 5x40x5, 5x25x8, 5x20x10, 10x10x10, 20x10x5, 25x20x2, 25x10x4, 25x8x5
At its default size (3x3x3) it has a durability of 1, at its maximum size it has a durability of 4.
By default, its colour is #69665c.
It requires 2 Iron
and 1 Rubber
to be crafted.
Methods
GetResource() → resource
Gets the name of the resource contained, will return the string "nil"
if nothing is stored, rather than actually returning nil
.
The resource return can be any of the following types:
-
string
-
"nil"
GetResourceAmount() → amount
Gives you the total amount of objects in the container.
The amount return is a number
.
GetAmount() → amount
This method is deprecated. Use :GetResourceAmount()
instead.
Gives you the total amount of objects in the container.
The amount return is a number
.
Configurables
CanBeCraftedFrom
Determines whether this Tank can be used by nearby players to craft objects. It is a boolean
.
Resource
The kind of resource the bin can hold. You can set this to Any to allow the bin to accept anything. It is a string
.
Events
ContainerChanged(resourceType, resourceAmount)
Fires when the amount of the resource in the container changes.
The parameters for ContainerChanged
are as follows:
- The resourceType parameter is a string that can be
Power
,Solid
, orFluid
- The resourceAmount parameter is a
number
.
OnClick(clickerId)
Fires when the object is clicked.
The clickerId parameter is the UserId
of the player who clicked the object. It is a number
.