
When you pass through the door behind which you find the yellow key card (in the next cube) the four grates that were initially blocking the passasges to the cave you are now in will be closed again.
If you get killed at this state before picking up the yellow key card (it's right in front of you but it may still happen) you will have to open them again. You do that the same way you did it previously, by moving into the section where you found the omega cannon and the afterburner (in the central area above the lava). When you leave this section you will activate some robot generators, like before. Move straight to the cave for your weapons again, pick up the key and exit through the yellow door (for some more surface action). You will have to fight the extra generated robots inside the planet later, unless you manage to avoid them (when you go for the red key card).
On the other hand if you get killed right after getting the yellow key card you can enter this cave for your weapons through the yellow door which is situated right where you start.

When you enter the cube where you find the yellow key the four grates blocking the entrance to the central lava area will be opened. These grates will be closed again when you enter the cube with the red key card. When you leave this cube you will open another grate which was blocking the passage to the red door.
If you get killed in this section after the four grates have been closed again, but before you get the red key card, you will have to open the four grates again by moving into the cube where the yellow key was (again you will enter that cave through the yellow door at the start).
If you get killed the moment you get the red key card but before the grate blocking the passage to the red door is opened you will have to do the same.
If you get killed having acquired the red key card and had the grate blocking the passage to the red doore opned you may choose to come back for your weapons by going through the red door from outside. In any case you have to enter/reenter the lava section in order to go through the red door from the inside since that opens a door you need to get opened in order to win the game. 

Poet.
