Space Engineers

Space Engineers

65 ratings
CAT Life Support Manager - Oxygen, Airlocks and Alarms oh my
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
16.671 KB
23 Mar, 2015 @ 11:54am
12 Oct, 2019 @ 9:30am
15 Change Notes ( view )

Subscribe to download
CAT Life Support Manager - Oxygen, Airlocks and Alarms oh my

In 1 collection by Loues.S.Cat
CAT Scripts
12 items
Description
O2 and Airlock Manager.
This script is the start of a Life Support manager with LCD Display, light indicator and sound block alert. (It also contains a Work In Progress Airlock System which can be enabled by setting the varialbe ENABLE_AIRLOCK_NAMAGER = true;)

The script aims to keep the pressure in Oxygen tanks between two provided values. This avoids the tanks being at 100% all the time which prevents airlocks from being depressurised saving you on O2 when your exterior doors are opened.
If Tank pressure falls too low, O2 production is turned on. If it falls way too low, an alarm goes off. O2 production remains on until O2 pressure in tanks reaches the maximum desired level assigned and then it is turned off, saving you power.
The current status of the O2 system is tracked and displayed on LCDs and by interior light indicators if desired.

/*
* Cats makes the best programmers!
*/

The following variables can be adjusted to alter behavior

This uses Prefix Filtering to ensure it only acts on the ship it is running on. The script will only effect blocks which have names that start with SHIP_PREFIX. or set SHIP_PREFIX = null; to disable this feature, allowing the script to act on all blocks, including those on docked ships.

Any Tank. Vent or Oxygen Generator which has a name containing the keyword indicated by the variable O2_SYSTEM_TAG will be tracked and controled by the script.

It has a minim, maximum and critical integer which are relavent to tank pressure
if tank pressure falls below TANK_O2_MIN then the Oxy-Generators will be turned on until tank pressure rises to be equal or greater than TANK_O2_MAX.
If tank pressure falls below TANK_O2_CRITICAL an alarm will be sounded.

If an alert goes off all sound blocks with the tag SOUND_TAG will be played. They will be stopped if the tank pressure goes back above the TANK_O2_CRITICAL value.
Setting SOUND_TAG = null; disables this feature.

All lights which have names containing the keyword indicated by LIGHT_TAG will have their colour adjusted relative to tank pressure. green = 100%, yellow = 50%, red = 0%.
The colour of the light shifts proportionatly to the tank pressure rather than 3 fixed colours.
setting LIGHT_TAG = null; disables this feature.

The string LCD_DISPLAY_TAG is the keyword that indentifies LCD panels to be used. (null means all panels)
LCD_DISPLAY_FONT_COL determins the colour of the text
LCD_DISPLAY_COLOUR determins the colour of the background.
LCD_FONT_SIZE determins the size of the text.

/*
* Cats makes the best programmers!
*/

There is a basic Airlock Control section to the script, but this is a work in progress.

Setting ENABLE_AIRLOCK_NAMAGER to true enables the Airlock manager.
VENT_LCK is the full name of airlock vent (including ship prefix if any).
LIGHT_LCK is the full name of airlock indicator light (including ship prefix if any).
LOCK_DOOR_INT is the full name of interior airlock door (including ship prefix if any).
LOCK_DOOR_EXT is the full name of exterior airlock door (including ship prefix if any).
Popular Discussions View All (2)
77
5 Jan, 2017 @ 6:38am
Support Thread (Life Support ;)
Loues.S.Cat
0
13 May, 2015 @ 6:09pm
Copy Paste Version
Loues.S.Cat
84 Comments
aleks 13 Jan, 2021 @ 12:30am 
( не устанавливается.
Avos 29 Aug, 2020 @ 5:01am 
Can I specify panels to watch certain vents or groups containing vents?
ruze0110 28 Mar, 2020 @ 11:06am 
merci
Loues.S.Cat  [author] 12 Oct, 2019 @ 9:08am 
Can't even remember what ship that was running on.
Can't hurt to remove it now.
Oloneus 12 Oct, 2019 @ 9:07am 
pretty much yes xD to clean up the code
Loues.S.Cat  [author] 12 Oct, 2019 @ 9:00am 
You mean all the parts labled "//Really dont use this 0.o" :p
Oloneus 12 Oct, 2019 @ 8:23am 
please take a look at this pastebin: https://pastebin.com/Df73UGL6

I removed everything "Air Lock" from it, hope you don't mind

it's somewhat obsolete xD
Oloneus 12 Oct, 2019 @ 7:05am 
Thumbs up :) I I`ll give it another go later today.
Loues.S.Cat  [author] 12 Oct, 2019 @ 6:56am 
The Single Missing line to set the LCD to show text has been added.
Loues.S.Cat  [author] 12 Oct, 2019 @ 6:46am 
I do already have some functions for string parsing used to save and loading data from strings which I have used in custom data storage. I could use that to have the pb format its content, save to the block custom data and then read it back out to see if it has changed. I don't like doing a lot of string parsing though, it tends to be costly.
If people are loading scripts they know about the editor. If I make a custom control solution I'd have to tell them how to use it.
still, I shall have a poke at that.
And looks like I missed the set show text thing on the LCD setup oups.