Merlin of Mines - Space Engineers

A set of useful scripts for aspiring Space Engineers!

View on GitHub

Tank Block Handler

This Block Handler handles both Oxygen and Hydrogen tanks. It enables you to get information about stored O2/H2 levels and set the tank to stockpile or not, and whether auto-refill bottles or not.

Default Primitive Properties:

Default Directional Properties

“Enabled” Property

Enables or Disables the given block

#Enable Block
enable "My Tank"
set "My Tank" to enabled
turn on "My Tank"

#Disable Block
disable "My Tank"
set "My Tank" to disabled
turn off "My Tank"

“Power” Property

Turns on or off power to the block. Effectively the same as the Enabled property.

#Turn on
turn on power to "My Tank"
power on "My Tank"

#Turn off
turn off "My Tank"
power off "My Tank"

“Supply” Property

Gets/Sets whether the tank is set to stockpile

if "My Tank" is collecting
  Print "Tank is stockpiling"

tell "My Tank" to stockpile

“Limit” Property

Gets the capacity of the tank, in liters.

Print "Tank Capacity: " + "My Tank" capacity

“Ratio” Property

Gets the percentage that the tank is filled, as a value from 0-1 (0 = empty, 1 = 100% full)

Print "Tank Fill Ratio: " + "My Tank" ratio

“Level” Property

Gets the approximate level of the tank, in L, by multiplying the tank’s capacity by it’s current fill ratio. So if it has as 10000L capacity and is 40% full, would return 4000.

Print "Tank Level: " + "My Tank" level

“Auto” Property

Gets/Sets whether the tank is set to auto-refill bottles.

if "My Tank" is on auto
  Print "Tank is auto refilling"

#Set My Tank to auto-refill
tell "My Tank" to refill