-
Notifications
You must be signed in to change notification settings - Fork 28
Generic Gas Node
Available on most blocks that have an internal inventory of gas (some exceptions apply, which are gas-storing blocks with their own custom peripheral)
getGasDetails(gasName: string) -> tableReturns a table representing the gas properties, in the following format:
{
name = <string>
density = <number>
viscosity = <number>
specificHeatCapacity = <number>
thermalConductivity = <number>
sutherlandConstant = <number>
adiabaticIndex = <number>
}Throws if the gasName (resource location) is not found in the gas registry
getGasMass() -> table<string, number>Returns a table of each gas name to its mass in the node. Will contain every gas name, even if the node does not contain that gas.
getHeatEnergy() -> numberReturns the total heat energy in the node, in Joules
getPressure() -> numberReturns the pressure of the node, in Pascals
getTemperature() -> numberReturns the temperature of the node, in Kelvin
pushGas(toName: string, gasName: string, amount: number | nil)Push the gas of type gasName from this node to the node with the peripheral name toName.
If amount is not specified, it will move the entire amount of gasName in the node.
Throws if:
-
toNameis not found as a peripheral -
toNameis not a gas node peripheral -
gasNameis not found in the gas registry -
amountis<=0 -
amountis larger than the amount ofgasNamein the node -
cheatKelvinPeripheralis not enabled in the server config (disabled by default)
pullGas(fromName: string, gasName: string, amount: number | nil)The same as pushGas, documented above, except the gas is being moved from the fromName into this node.
pushTemperature(toName: string, amount: number | nil)Push amount of Kelvin from this node to the node peripheral named toName.
If amount is not specific, it will transfer all heat from this node into toName.
Throws if:
-
toNameis not found as a peripheral -
toNameis not a gas node peripheral -
amountis<=0 -
amountis larger than the temperature in the node -
cheatKelvinPeripheralis not enabled in the server config (disabled by default)
pullTemperature(fromName: string, amount: number | nil)The same as pushTemperature, documented above, except the temperature is being moved from the fromName into this node.