Space Engineers

Space Engineers

Oxygen Level Display
19 kommentarer
darkice1982 11. okt. 2022 kl. 23:50 
no it dosent but thanks for the reply is there anthoer one than you know of or have done
Pasukaru  [ophavsmand] 10. okt. 2022 kl. 15:25 
@darkice1982
I doubt this mod still works. It's 5 years old. But feel free to try!
darkice1982 9. okt. 2022 kl. 7:00 
dose this work with modded tanks
Angry D 25. maj 2019 kl. 23:42 
Same error as AgemoomegA.
Kool Aid Man 16. jan. 2018 kl. 21:31 
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 29. dec. 2017 kl. 22:25 
Your welcome and thank you for the script :)
Pasukaru  [ophavsmand] 28. dec. 2017 kl. 20:06 
Thanks Jiman, I have fixed the issue.
Ben 26. dec. 2017 kl. 3:35 
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  [ophavsmand] 20. dec. 2017 kl. 1:03 
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 31. maj 2017 kl. 13:50 
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 1. maj 2016 kl. 8:03 
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 10. aug. 2015 kl. 18:07 
@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 6. maj 2015 kl. 15:40 
@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 6. maj 2015 kl. 13:47 
Thanks Pasukaru!!!
A great Script!
NotStym3 1. maj 2015 kl. 10:13 
Great script. Worked fine the first go if you follow instruction. Remember to rename the LCD from default.
Pasukaru  [ophavsmand] 30. apr. 2015 kl. 8:50 
You're welcome. I'm glad I was able to help you.
Thanks for your review :)
Fox 30. apr. 2015 kl. 4:34 
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  [ophavsmand] 29. apr. 2015 kl. 9:34 
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 28. apr. 2015 kl. 16:27 
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. :(