Oxygen Not Included

Oxygen Not Included

Tiny Door
A fix for the water covering the door
You will notice that the vanilla pneumatic door, aka Mechanized Airlock, (and same for manual pneumatic door) is constructed with

buildingDef.SceneLayer = Grid.SceneLayer.TileMain;

instead of

buildingDef.SceneLayer = Grid.SceneLayer.Building;

I have created a mod with a "custom prenumatic door" by just copying the vanilla code and changing that one setting gave me the same "visual bug" you're having. See bellow:

https://imgur.com/a/lMiLAvQ

I don't believe it is just visual, there might be no immediate or obvious sideeffects of doing it this way, but as we all can see it is not working as we expect it.

My next step would be to decompile and recompile your mod to verify this works. If it does I'll stick to using this private version of your mod it in case it is not officially fixed. Otherwise the mod works very well and I like it. Good job.

Edit: I've recreated your mod and it seems that I stand corrected, it seems that the "shadow" from water is for whatever reason drawn on top of the door instead "inside" it. I say this because I have not noticed the vanilla doors had the same shadow but only on the inside when opening or closing. It might be something with the animation order but I'm not sure how you control that. Although my solution kind of looks nicer and the missing shadow is less of an eyesore, it's still not ideal though.

Doors opening below (from left to right: your door, then my recreated door, vanilla door):

https://imgur.com/MjX3zZd

But also water does not animate on top of my door when flowing through:

https://imgur.com/abfluzY

So my solution was misleading. Back to the drawing board.
Last edited by Luck is No Excuse; 29 Oct, 2020 @ 1:25pm
< >
Showing 1-2 of 2 comments
Luck is No Excuse 29 Oct, 2020 @ 6:22pm 
I bring to you the actual fix to this issue. See image below:

https://imgur.com/3eVmwhh

Tiny door on the left is from this mod, and I recreated the tiny door on the right. And the problem is not the code, but the kanim.

People at Oxygen not included discord modding channel told me what to do, all credit goes to them. You can't fix it programmatically (apart from that SceneLayer has to be TileMain, not Building), in fact the issue here is that the background wall is covering the liquids. Solution is to change the background image flag in the kanim files to "foreground" (I've been told the order on the doors is reversed intentionally). You can do this with kanim-explorer[github.com] and edit and save the _build.byte file.

Like this:

https://imgur.com/m5s67o1

Change wall_piece_fg Foreground flag to True. Save the build file. Done.
Last edited by Luck is No Excuse; 29 Oct, 2020 @ 6:23pm
Davkas  [developer] 12 Nov, 2020 @ 4:50am 
ok thanks to all, i try to update today, so many problem in real life >_<
< >
Showing 1-2 of 2 comments
Per page: 1530 50