Skip to content

Dump Element

Frinn38 edited this page Dec 4, 2021 · 1 revision

The Dump Gui Element is a button used to void the content of one or several fluid tanks.

When clicked, the Dumpbutton will find the specified fluid component in the machine and void it's content.

Dump Elements are defined in json with : "type": "custommachinery:dump".

Properties

Beside the 3 mandatory properties (type/x/y) and the 3 optional properties (width/height/priority) the Dump Element have 1 mandatory and 1 optional properties.

id (Mandatory)

Description : The id of the Fluid Component you want to void. It must be the exact same id specified in the fluid component json id property. You can specify a list of tank id `["tank1", "tank2"...] in which case all specified tanks will be voided when the dump element is clicked.

Example : "id": "tank1" The element will void the fluid component with id tank1, if no fluid component have this id it will do nothing.

texture (Optional)

Description : The location of the texture that will be rendered into the GUI. The location must be referenced by : namespace:path/file.png The texture loader will search for textures in the assets/namespace folder, the .png extension is required or the file will not be found.

Default: custommachinery:textures/gui/base_dump.png The default Dump Element texture.

Example : "texture": "namespace:textures/my_texture.png" The file assets/textures/my_texture.png will be used by the Dump Element.

Note : The texture can be any size, if the texture size is different from the default size the width and height properties of the element will be automatically changed to fit the texture size if not provided. If the width and/or height properties of the element are provided, the texture will be stretched to fit the dimensions of the element (it can render weirdly in that case).

Example

A basic Dump Gui Element :

{
    "type": "custommachinery:dump",
    "x": 20,
    "y": 20,
    "id": "tank1"
}

dump_element

Clone this wiki locally