Space Engineers

Space Engineers

Not enough ratings
Airlock Protection And Indicators
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
386.040 KB
Jul 25, 2021 @ 12:50pm
1 Change Note ( view )

Subscribe to download
Airlock Protection And Indicators

Description
This script manages the doors, vents, and (if any) status lights in airlocks, as well as providing an overview of all airlock statuses on the grid.

The primary functionality is the control of both sets of doors, preventing any possibility of accidentally venting the main atmosphere by opening both sets of doors (unless breathable external atmosphere is present, in which case all doors are held open). The script will also manage the air vent(s) to avoid losses to space, and will update lights in the airlock to use color and flash to indicate airlock status and alert conditions.

Red airlocks are those which have one set of doors open, disallowing the other to be opened; yellow through green indicate airlocks that can be opened, with the mix between the two indicating how much air will be lost if opened to space (green if none). Flashing red airlocks indicate that they have been breached in some way.
7 Comments
Reika  [author] Feb 4, 2023 @ 1:19pm 
Yes, I generally design my scripts to work with any (conceptually compatible) build, needing only naming or block groups to identify the components.
simulinker Feb 4, 2023 @ 8:54am 
I have used quite a lot of both timers and gateway scripts, but none of them suited me to this extent for some reason. Even almost nothing had to be added to fit your requirements.
Reika  [author] Jul 6, 2022 @ 5:55pm 
By default all you need to do is have "Airlock" in the name of a block for the script to interpret it as being a member of an airlock of that name. To be meaningful, an airlock has to have a vent and two doors. The doors should also be discernible whether inner or outer, using the return values of those functions. By default, anytihng with "External", "Exterior", or "Outer" are the outer doors, and anything with "Inner" or "Interior" are the inner ones. You can change this as you see fit.

Look at some of my sample blueprints, such as the waypoint station, which is featured in the screenshots for this page.
Zulu-1 Jul 6, 2022 @ 11:32am 
Relka - could you offer some examples of the naming conventions you used for the airlock parts? My thick brain can't grasp the instructions you placed at the top of the script. Thanks.
Reika  [author] Apr 7, 2022 @ 3:28pm 
It looks like you named an air vent in a way that confused it. This script - and most of my other "grid monitoring" scripts only work as intended if you name your vents/doors/etc according to a specific template specified in the settings at the top of the script.
jglenn1562 Apr 7, 2022 @ 1:27pm 
Compilation is successful, but upon running the script, I get this message:

Caught exception during execution of script:Index was outside the bounds of the array.
at Program.createID(IMyAirVent vent)
at Program..ctor()
jglenn1562 Apr 7, 2022 @ 1:25pm 
I'm testing this script out right now, however it doesn't seem to work at this time. Any plans on fixing it? Or if it's something I did wrong, is there a guide or instructions anywhere?