Space Engineers

Space Engineers

Not enough ratings
Airlock Manager
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
7.631 KB
24 Apr, 2015 @ 9:58am
3 Oct, 2015 @ 7:41am
18 Change Notes ( view )

Subscribe to download
Airlock Manager

In 1 collection by Noy
Noy's Space Engineers Scripts
2 items
Description
Plug and play Airlock manager.
- Will work on multiple airlocks.
- Can use air vents, and both normal and hanger doors. (this includes modded as well)
- You can assign multiple doors to both the inner and outer doors of any airlock.
- You can also set various timing settings.
- interior emergency airlocks!!!!
- Pressurized hanger functionality for sectors (WIP)
- lights for airlocks
- interior airlock, default door states.

still in development:
- sounds.
- sensors functionality.

>>MOST RECENT UPDATE<<
Update 1.8
- script is now entirely aware of door state (no more guesswork)
-- this also removes the need for the the tag "C>"
- timer is now set for ticks (trigger now) instead of seconds, to increase reaction rate.
-- multiply your "D>" and "A>" settings by 60 (ticks per a sec at normal game speed)


Airlock states are as follows: (use lights to see the colors)
-- Blue: passive interior airlock (doesn't do airlock like things)
-- Green: airlock is ready for use
-- Yellow: airlock is cycling
-- Red: Airlock detected a breach and is sealing.


{{{ Instructions: }}}

Step1:
--place 1 timer block and programmable block down.
Step2:
--load script into programmable block, compile, and remember.
Step3:
--setup timer block to run programmable block and then start it's self now.
Step4:
--apply tags to the names of all related airlock blocks as follows:

<<<AIRLOCKS>>>

Minimum Blocks to function:
- 2 doors (at least one interior)
- 1 air vent

Format for tag list:
"[Airlock: " - used to start tag list. ]
": " - used to separate tags.
"]" -used to end tag list.

Required tags:
"N>" - name of airlock
__ EX: "N>{name of airlock}"

Required tags (Doors):
"S>" - used to identify which side
__ EX: "S>{in/out}"
---OR---
- use the sector tag list, and have this dynamically assigned (requires valid sector to work)

Optional tags (Doors):
"D>" - set close delay (duration the doors stay wide open.)
__ EX: "D>{close delay}"
"A>" - set/enable auto open delay (minimum time the script waits, to auto open the other side.)
__ EX: "A>{opening delay}"
"P>" - set/enable auto open/close of a SPECIFIC passive airlock door to the set state
__ EX: "P>{OPEN/CLOSE}"

*you only need to tag one of the inner and outer doors respectively with delay tags.
*order of tags does not matter but, must be properly separated and wrapped


EX1: Door [Airlock: N>main airlock: S>in: D>120]
EX2: Hanger Door 3 [Airlock: N>hanger: D>600: S>out: A>120]
EX3: Air Vent 2 [Airlock: N>somewhere]
EX4: Door 5 [Airlock: N>interior: D>120: A>120: P>CLOSE] [Sector: N>Control_Room]
EX5: interior light [Airlock: N>airlock]


<<<SECTORS>>>

Minimum Blocks to function:
- 1 door
- 1 air vent

Format for tag list:
"[Sector: " - used to start tag list. ]
": " - used to separate tags.
"]" -used to end tag list.

Required tags:
"N>" - name of sector
__ EX: "N>{name of sector}"

optional tags (doors):
"G>" - name of sub group it's to be assigned to
__ EX: "G>{name of group}"

optional tags (lights):
"T>" - name of sub group the light toggles (open/close)
__ EX: "T>{name of group}"

*order of tags does not matter but, must be properly separated and wrapped

EX1: Door2 [Sector: N>Control_Room] [Airlock: N>interior: D>120: A>120]
EX2: Air Vent 3 [Sector: N>Control_Room]
EX3: Hanger Door 5 [Sector: N>Hanger: G>:RightSide]
EX4: Toggle Light 1 [Sector: N>Hanger: T>:RightSide]



Debug:
- also you can name LCD panels "Debug Airlock" to see the debugging output. (currently does not scroll, or use multiple screens)

Known Bugs:
- if your air storage maxes out, the airlocks refuse to let you outside and waste the air in the airlock...
- breach detection might not work properly

Known Bugs (that are on Keen's end):
- Owner-less Programmer blocks cannot detect blocks that are repaired/built, only placed/damaged (not even sure how this is happening)
(version 01.102 and possibly later)
- Currently airlocks might not decompress


Update 1.1:
- changed format of tags
- added auto open feature

Update 1.2:
- added air-vent functionality (the airlock pressurizes as you come in. still working on the way out.)

Update 1.3:
- doors now reactivity open as a group (if this bothers people I'll add it as a setting; that means give feedback)

Update 1.4:
- Airlock behavior is more stable, and less likely to get confused.

Update 1.5:
- added interior emergency airlocks
- added airlock breach detection (WIP)
- can now assign multiple LCDS to display debug info

Update 1.6:
- added sub groups for sectors (to allow, separated controls)
- added hanger functionality for sectors
-- uses lights for toggling doors states

Update 1.7
- added lights to airlocks
- added to option to set each individuals doors' default state when an airlock is in interior mode.
Popular Discussions View All (3)
3
10 May, 2015 @ 5:14am
What am i doing wrong?
Steve
0
4 Dec, 2015 @ 3:21pm
Can't get this script to fully function
Tallinu
0
2 May, 2015 @ 2:02pm
Tutorial
Noy
12 Comments
Noy  [author] 3 Aug, 2017 @ 8:24pm 
Currently working on a version 2.0 that should be more stable and easier to setup. Will post a link to it once I finish.
BladedDingo 18 Dec, 2016 @ 2:38pm 
Do you still maintain this script? I've tried using it as of the beta, but it doesn't seem to want to work properly.

When I am inside my ship, and I click the inner airlock door, I get blasted with vacuum, it doesn't equalize, then open, it just opens right away making air rush in, then barely waits for it to decompress before opening the outer door.

Then when I come back in from outside, it does the same, it decompresses the chamber, then lets air flood in from the interior room to fill it back up.

Shouldn't it be waiting to decompress before opening the other door, or equalizing the pressure first? I don't know if I'm doing anything wrong, the tags seem to be set up correctly.
737✈Garrus 21 Mar, 2016 @ 8:39am 
Haha cool thumbnail :)
Noy  [author] 3 Oct, 2015 @ 7:45am 
and updated the airlock code. It's now better. Though now I need to make it filter out blocks from other ships/station that are docked, to prevent logic collisions, and boost performance in those scenarios.
Noy  [author] 19 Sep, 2015 @ 7:01pm 
Just noticed that Keen added a door related variable. Will use this to make the airlocks more stable, accurate, and possibly removing the need for the "C>{state change delay}" tag.
Noy  [author] 28 Aug, 2015 @ 6:11am 
It's been a while since I touch this code but, if I recall, the situation you described should be doable. More likely something is tagged wrong.

Hall Door [Sector: N>Hanger]

Air Vent 1 [Sector: N>Hanger]

Toggle Light 1 [Sector: N>Hanger: T>:HangerD1]
hanger door 1a[Sector: N>Hanger: G>:HangerD1]

Toggle Light 2 [Sector: N>Hanger: T>:HangerD2]
hanger door 2a[Sector: N>Hanger: G>:HangerD2]

Toggle Light 3 [Sector: N>Hanger: T>:HangerD3]
hanger door 3c[Sector: N>Hanger: G>:HangerD3]
...

the tags should resemble the above. from there make sure that you are not maxed out for oxygen storage, and look to see if any of the individual blocks (typically airvents) are bugging out.
LuckyLegs 28 Aug, 2015 @ 2:42am 
Hi, really like the look of your script but I'm having a lot of trouble implementing it for use with a hangar. In this particular case, I have 6 hangar doors (3 on each side), a vent, and a door leading to a connecting hallway. I tried using the Sector tag for all objects involved, and all of the hangar doors are grouped, however the hangar won't depressurize upon opening.

Also, if the hangar doors are grouped and I command only one of them to open, are the rest supposed to open as well? This didn't happen for me.

Any help you could offer would be greatly appreciated.
Noy  [author] 11 May, 2015 @ 2:32pm 
I believe what you are asking for requires you to simple not use the A> tag. As that's what enables that automation. Granted if you do not use automation, the code defaults the air vent to always depressurize, to help prevent accidental air loss.
Steve 11 May, 2015 @ 12:15pm 
Could be my fault but when I enter the airlock the outer door opens/closes, then pressurizing, the inner door opens/closes and then depressurizing. Thats what I mean with "automated cycle".
For me it would be nice if i could set the airlock either to "automated" or to only "open/close door and de-/pressurize" if i would use a outer or inner door.

Maybe there is a way to do that yet and i dont get it.
Noy  [author] 10 May, 2015 @ 4:58pm 
The reason the airlock is left depressurized on idle, is that the outer doors are unlocked during idle (so you can open them without a button,) and could let all the air out, when opened unexpectedly. It's a simulaur issue with the inner doors as well (I can't "hook" into the door buttons to prevent them from opening before, the airlock is ready.)

Also what do you mean by "cycle automated or to open the doors separately", just so I understand exactly what you meant.