Space Engineers

Space Engineers

Oxygen and Hydrogen Tank Monitor with Images
46 Comments
Alcatraz 30 Nov, 2024 @ 12:08pm 
Hello again guys, lucky me... I got a simply solution:

At line 100, simply add ·· // ··


imageName = warningImage;
}
}

At this line, add the 2 slash ===> //screen.ShowTextureOnScreen();
if (imageName != screen.CurrentlyShownImage)
{
screen.AddImageToSelection(imageName);
screen.RemoveImageFromSelection(screen.CurrentlyShownImage);


Hope it helps. Greetings
Alcatraz 30 Nov, 2024 @ 11:53am 
Hello there,

Similar problem:

Program(100,35): Error: 'IMyTextPanel' does not contain a definition for
'ShowTextureOnScreen' and no accessible extension method
'ShowTextureOnScreen' accepting a first argument of type
'IMyTextPanel' could be found (are you missing a using directive or an
assembly reference?)

I'm no programmer nad trying to figure it out =/

Any suggestion?
Thanks
NorimaR 6 Jan, 2024 @ 9:03am 
Program(100,35): Error: 'IMyTextPanel' ***
Titan Nya 11 Sep, 2020 @ 2:13pm 
Well then i guess my dirty edit was useless :p
Was just trying to make this one not be broken :p

I'll use your other script on new ships, i'll stay with my dirty edit for this one as i don't want to go find all lcd and all other things to redo the config... i'll unsub from this one
Morphik  [author] 11 Sep, 2020 @ 10:13am 
Titan Nya, https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=835036636 , This script of mine should still work and it works like the jump drive script that lumps all hydrogen/ Oxygen tanks into a average.
Titan Nya 8 Sep, 2020 @ 7:28am 
Well made a new (dirty) version for me using the jump script as template and changing things around until it work... I'm not able to write code on my own but editing in a dirty way i can...

It work even better as it round all tanks type as one...

If Morphik allow it i could publish it... until then (or if there is no answer at the end of 2020)

if i do publish it i'll link this one and the jump one in the description... And if someone who is more skilled can then make a cleaner version...
Titan Nya 8 Sep, 2020 @ 3:03am 
Broken... Any Eta on fix or should we try to fix it ourselves?
Argo 5 May, 2020 @ 10:23pm 
it's broken, pops errors
Titan Nya 9 Nov, 2019 @ 7:28am 
Would it be possible to use this script to check the internal Hydrogen Engine tank level?
Zael'a 4 Feb, 2019 @ 3:56pm 
tells me my hydrogen tanks (from another mod) are filled with oxygen. now to find out what went wrong and who's lying to me :D
Garrett 19 Jan, 2019 @ 12:15pm 
Still getting same error with showing up on LCD screens, Compile works and get no errors but nothing shows up on the LCD.
Shallowerty 9 Sep, 2018 @ 7:25pm 
For some reason it shows that the programable block is connected to the tank, but it wont show up on the LCD panel
Morphik  [author] 15 Jan, 2018 @ 8:28am 
Should be fixed now. Odd change to the API I must say.
Bidou 15 Jan, 2018 @ 4:48am 
Until an official fix:

replace
currentLevel = tank.FilledRatio;
by
currentLevel = (float) tank.FilledRatio;

and
currentLevel = tank.FilledRatio;
by
currentLevel = (float) tank.FilledRatio;

That worked for me, script was able to compile, and I get the correct output numbers in the terminal when I look at the programmable block.
I still can't get anything on LCDs though... it's as if it can't get the images...(yes I subscribed to the related mods)
Ceril 11 Jan, 2018 @ 8:36pm 
Hey, this was working really well up until today.
Now, it throws an error about missing a cast on line 57 and 73, not sure why all of a sudden!
Any chance for a fix?

Thank you!
Yilmas 26 Sep, 2017 @ 4:55pm 
Sounds good mate, will definitely give it a go... For these "simple" read outs, I prefer this mod compared to many of the text based ones. Since do you want a full screen with a single line on it (TIM or Automatic LCD2) or do you want it to actually use the screen...
TwennyOne 26 Sep, 2017 @ 4:07pm 
Thanks :D
Morphik  [author] 26 Sep, 2017 @ 11:41am 
Updated the code. Also changed code so the image wont flash.
Yilmas 25 Sep, 2017 @ 9:16pm 
@Morphik updated the code to fix the OBSOLETE exception: https://pastebin.com/LESF5mjk
TwennyOne 30 Jun, 2017 @ 5:41pm 
I keep getting the error "caught exception during the execution of script: Index and length must refer to a location within the string. Parameter name: length"

My tank name is Hydrogen Tank tnk#000 and LCD panel is LCD Panel LCD_Tank#000
TIGIRAN 10 Mar, 2017 @ 2:29pm 
But if I have 50 tanks)) that each sign))
SGT_MAJOR_FISH 22 Jan, 2017 @ 7:07am 
does it work on small grid text panels?
That One R.O.B. 5 Jan, 2017 @ 11:37am 
Thank you @Morphik
Morphik  [author] 5 Jan, 2017 @ 1:48am 
Also the script for you @MetroAssassin
Morphik  [author] 5 Jan, 2017 @ 1:47am 
@The Mixican
Here is that script that will show the average of all tanks on one (or more) LCD's
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=835036636

@Trebot5007 Delete this from lines 62 to 67

if (!_tanks [a].IsWorking) {
// If new Image == null, load former image
if (screen.CurrentlyShownImage != warningImage) {
_imagename = warningImage;
}
}
That One R.O.B. 3 Jan, 2017 @ 3:38pm 
Could someone tell me which lines I would need to remove in order for the screen to not show the Danger Sign when the tanks are below the threshold, I only want to see the fill level.
FluffyNinja 22 Dec, 2016 @ 6:50pm 
@Morphik, yes please. I've tried to do it myself, but have been unsuccessful.
The Mixican 21 Dec, 2016 @ 12:39pm 
Well it seems to take the average when I take them all at #000 or #001 from what I have seen.
It's where I want to have each tank seperate this code cannot. Still using it eitherway though :D
Morphik  [author] 21 Dec, 2016 @ 11:14am 
Like I said in the description, this is a adaptation of someone elses script. I will try to make it take the average of all tanks with the same tag.

I do however have a script saved locally that takes the average of all Oxygen tanks on the grid and displays to one LCD, and does the same with Hydrogen tank to another LCD, I can publish that and link it here if you like.
The Mixican 21 Dec, 2016 @ 5:22am 
I was wondering the same as Gladiator, I have 4 hydrogen tanks per side of my ship so would like to track more then 2. Cheers
Gladiator 17 Dec, 2016 @ 1:19pm 
Works well for a single tank. Is there a way for multiple tanks to be summed up on one LCD? What happens if you give more than 1 tank the same tag? Thanks.
NeoAcario 17 Nov, 2016 @ 3:12am 
@Morphik
Heya... any chance you'd consider adding the jump drive script in here and making it one script to do all 3?
Morphik  [author] 7 Nov, 2016 @ 11:26am 
Just make sure all blocks involved are the same ownership. That is scriptings #1 worst enemy.
twiggywilbur 7 Nov, 2016 @ 3:18am 
HUH I'n not sure where I messed up but I'll give it another shot . . lol sorry I was frustruated, And thanks!
Morphik  [author] 7 Nov, 2016 @ 12:52am 
Added some pictures for clarity.
twiggywilbur 6 Nov, 2016 @ 10:11pm 
The Worst instructions ever, hell with this.
jwagne51 24 Sep, 2016 @ 9:04am 
Could you use the Group function like in your Cargo mod to be able to just use one screen?
Morphik  [author] 23 Sep, 2016 @ 11:15pm 
Okay I tested, seems like it shows the percentage of the last tank if they all have the same tag. I will have to brush off my rusty C# coding abilities to change this.
Morphik  [author] 22 Sep, 2016 @ 3:24pm 
@Budroi I honestly don't know, This requires testing
Budroi 22 Sep, 2016 @ 8:05am 
Does this mod allow for 1 LCD screen to show the average between multiple tanks.
IE: I have 5 tanks but would like only 1 screen to view the average fill of them
Morphik  [author] 11 Sep, 2016 @ 6:47pm 
This script allows for multiple screens for multiple tanks.
Kurist Zero 11 Sep, 2016 @ 3:52am 
Hey Morphik.
Can a single Program and timer block be used to control multiple screens for multiple tanks?
Or will I need 4 Program and timer blocks for 4 tanks?
Morphik  [author] 4 Sep, 2016 @ 6:51am 
I don't know if it works for the dev build.
SpetS 2 Sep, 2016 @ 10:47am 
does it work in DEV version?
Mooka 31 Aug, 2016 @ 5:48am 
Nice!:steamhappy:
Tainara 31 Aug, 2016 @ 2:16am 
Looks good man! been looking for something like this for a while now