Space Engineers

Space Engineers

Oxygen Level Display
19 Comments
darkice1982 Oct 11, 2022 @ 11:50pm 
no it dosent but thanks for the reply is there anthoer one than you know of or have done
Pasukaru  [author] Oct 10, 2022 @ 3:25pm 
@darkice1982
I doubt this mod still works. It's 5 years old. But feel free to try!
darkice1982 Oct 9, 2022 @ 7:00am 
dose this work with modded tanks
Angry D May 25, 2019 @ 11:42pm 
Same error as AgemoomegA.
Kool Aid Man Jan 16, 2018 @ 9:31pm 
Not working keeps saying - Program 65,16 cannot implicitly convert type 'double' to 'float'. an explicit conversion exsists (are you missing a cast) - what should i do?
Ben Dec 29, 2017 @ 10:25pm 
Your welcome and thank you for the script :)
Pasukaru  [author] Dec 28, 2017 @ 8:06pm 
Thanks Jiman, I have fixed the issue.
Ben Dec 26, 2017 @ 3:35am 
hey there, i think (not certain) that this is checking hydrogen as well, to seperate the oxygen tanks i used GridTerminalSystem.GetBlocksOfType<IMyGasTank>(Tanks,x=>x.DetailedInfo.Split(' ')[1] == "Oxygen"); On line 47 i think but you will get what i mean
Pasukaru  [author] Dec 20, 2017 @ 1:03am 
Updated the script to work with the current Scripting API.
I also added an option to ignore other scripts, which is also enabled by default.

Thanks to qcoumes (https://github.com/qcoumes) for issuing a pull request.
AnoraPeart May 31, 2017 @ 1:50pm 
script need to to be update spits out errors regarding IMyOxygentank being wrong and IMyOxygenTank.GetOxygenLevel is wrong tried the fixes it tell you and dose not work
mad_bottle May 1, 2016 @ 8:03am 
Thanks for this one. I had no problem on making it work for the first lcd, but I couldn't manage to get it to work on a second lcd too. After a few tries, I found out that you can't give the exact same name to both lcd's. I hope this is useful for someone as noob in scripting as me xD
Morphik Aug 10, 2015 @ 6:07pm 
@Pasukaru
If you want a tip. To make your program not get information from tanks connected to your grid you can make these changes.

Change this:
GridTerminalSystem.GetBlocksOfType<IMyOxygenTank>(tanks);

To this:
GridTerminalSystem.GetBlocksOfType<IMyOxygenTank>(tanks, b => b.CubeGrid == Me.CubeGrid);

This makes the Program block only look for Oxygen Tanks on the grid it is on.
DerFedus May 6, 2015 @ 3:40pm 
@Pasukaru
Hi there... I've used the script into a new world and doesn't seem to show on LCD's properly.
I've followed the Instructions.
name: LCD (Oxygen Status)
Public text: Oxygen Level\nAvg: {0:0.00000}%\nTanks: {1:00}\nTime Left: {2:00}:{3:00}:{4:00}

(Prog block and timer properly set, owenrship to me)

What I'm missing?
Thank's in advance!!!

DerFedus May 6, 2015 @ 1:47pm 
Thanks Pasukaru!!!
A great Script!
Jesse Burson May 1, 2015 @ 10:13am 
Great script. Worked fine the first go if you follow instruction. Remember to rename the LCD from default.
Pasukaru  [author] Apr 30, 2015 @ 8:50am 
You're welcome. I'm glad I was able to help you.
Thanks for your review :)
Fox Apr 30, 2015 @ 4:34am 
Grrr. It does work now thank you. I didn't change anything - it just worked. I assume restarting the session somehow worked. 5 stars - thanks!
Pasukaru  [author] Apr 29, 2015 @ 9:34am 
Hi Fox.

I can see 3 reasons for your problem:
1: The blocks don't belong to the same user. In this case, go to the station control, select all blocks and assign them to yourself.
2: A typo. Either in the Programmable block variable, or your LCD Panel. Make sure you don't have any leading/trailing spaces.
3: You did not set up the Timer Block properly. Make sure it's executing the Programmable Block -> "run".

BTW: If you set the IGNORE_ERRORS variable to false, the programmable block will display the error in its right panel. You will have to recompile the script if such an error occurs.

I hope this helps.
Fox Apr 28, 2015 @ 4:27pm 
I'm new to scripts and programming blocks so I'm not sure where to go with this.

I added a wide LCD screen and called the name, public title and private title LCD (I kept it short for debugging purposes - the full name used in the code didn't work either). It defaults to OFFLINE text.

I added a timer and a programming block (survival mode). I set up the timer. Triggers every 5 seconds. I can see it flash blue and green as expected.

I loaded the script into the programming block. I compiled it for safety and then quit the control panel and waited. The LCD still says OFFLINE after a long time.

I've adjusted the LCD name in the code and I even set the debug information to FALSE (or true - or whatever is 'on'). Where is the debug information suppose to go?

I did NOT edit anything below the line. I tried different LCD names and debug settings but my LCD always says OFFLINE.

I'm assuming I'm the only one with an issue. :(