Module Peripherals
CC: Deep Seas provides a few new peripherals for Create: Deep Seas mechanics!
Usage:
local vent = peripheral.wrap("left")
-
isAnyHolesFaceSubmerged ()
-
Determines whether any faces of the vent are submerged in water.
Returns:
boolean
Whether any faces of the vent are submerged in water.
Usage:
if vent.isAnyHolesFaceSubmerged() then
print("The vent is submerged in water!")
else
print("The vent is not submerged in water.")
end
Usage:
local thruster = peripheral.wrap("left")
-
getThrust ()
-
Gets the currently output thrust if the thruster.
Returns:
number
The currently output thrust.
Usage:
print("Thruster: " .. tostring(thruster.getThrust()))
-
getScaledThrust ()
-
Gets the scaled output thrust of the thruster.
Returns:
number
The scaled output thrust.
Usage:
print("Scaled Thruster: " .. tostring(thruster.getScaledThrust
-
getAirflow ()
-
Gets the airflow of the thruster.
Returns:
number
The airflow of the thruster.
Usage:
print("Airflow: " .. tostring(thruster.getAirflow()))
-
getScaledAirflow ()
-
Gets the scaled airflow of the thruster.
Returns:
number
The scaled airflow of the thruster.
Usage:
print("Scaled Airflow: " .. tostring(thruster.getScaledAirflow()))
-
getCurrentAirPressure ()
-
Gets the current air pressure of the thruster.
Returns:
number
The current air pressure of the thruster.
Usage:
print("Current Air Pressure: " .. tostring(thruster.getCurrentAirPressure()))
-
isActive ()
-
Determines whether the thruster is active.
Returns:
boolean
Whether the thruster is active.
Usage:
if thruster.isActive() then
print("The thruster is active!")
end
Usage:
local oxygenator = peripheral.wrap("left")
-
getCurrentSubLevelID ()
-
Gets the current Sub-Level ID of the Sub-Level
Returns:
string
The current Sub-Level ID of the Sub-Level.
Usage:
print("Current Sub-Level ID: " .. oxygenator.getCurrentSubLevelID())
-
getCompartments ()
-
Gets the current compartment data of the Sub-Level.
Returns:
array[table]
The current compartment data of the Sub-Level.
Usage:
local compartments = oxygenator.getCompartments()
for i, compartment in pairs(compartments) do
print("Compartment " .. i .. ":")
print("\tAnchor: " .. tostring(compartment.anchor)) print("\tInternals:")
for k, internal in pairs(compartment.internal) do
print("\t\t" .. tostring(internal)) end
print("\tHull:")
for k, hull in pairs(compartment.hull) do
print("\t\t" .. tostring(hull)) end
if compartment.sealed then
print("\tCompartment is sealed.")
else
print("\tCompartment is not sealed.")
end
end