Airlock Master Computer v1.72 - with air seal/depressurize waiting!
Фото и видео: 1 из 2. Материалы автора из Steam Workshop.
О материале
«Airlock Master Computer v1.72 - with air seal/depressurize waiting!» — материал мастерской Space Engineers. Моды, чертежи кораблей, скрипты и миры для Space Engineers. Для установки откройте оригинал в Steam Workshop, проверьте требования автора и подпишитесь. Совместимость с версией игры редакцией не проверена.
Описание автора
If you find this description to be too long, I have wrote quicker instructions in the code itself. Or watch the video demo :P
This is a controller script for airlocks, one script can control multiple airlocks at the same time.
Blocks for this script:
- Programmable block
- Timer block
- 2x Doors for each airlock
- Trigger block for each airlock (any functional block that can be turned on or off, a light for example)
- Buttons or something to press :P
- Optional: light for each airlock
- Optional: 1 or 2 sound blocks for each airlock
You only need 1 programmable block for any number of airlock pairs and you can even recycle a timer block that triggers some other script to trigger this script as well.
To start off load the script into the programmable block and configure the timer block to run the script and start itself again and set its delay to 1.
ADVANCED: You can also have improved response and greater delay accuracy by replacing "Start" with "Trigger Now" but you need to edit the calledTicks variable in the script accordingly (to 60) and set skipCalls to at least 5 because 60 times a second is too fast and it gets glitchy.
Then name your door, trigger, light and sound blocks to the combination of Prefix+AirlockID+Suffix, here's the default names: Doors: "Airlock 1 Inside" and "Airlock 1 Outside" Trigger: "Trigger Airlock 1" Optional blocks: "Light Airlock 1", "Sound Airlock 1 Open", "Sound Airlock 1 Close", "Air Vent Airlock 1", "Screen Airlock 1"
The "1" is the airlock ID, which you can change/add in the "airlocks" list at the top of the code, they can be numbers, letters or words. The prefixes and suffixes for blocks can also be edited.
Next, you'll need some buttons (you can use anything really, even sensors) to trigger the airlock cycle, in which you must add the Trigger Airlock ID block as turn ON, do not add it as toggle ! The script will turn it off once it finished cycling.
NOTE: If you turn the trigger block on and off again, both doors will remain closed until you turn it on again, might be of use in certain situations.
Additionally you can place a decorative light and sounds to trigger when doors open and when they close (if you have some depressurization sound mods or something), but they're optional, like I said, which means the script will run fine without them.
Since v1.2
You can edit the lights colors and other settings on each state.
Optionally you can add an Air Vent block ("Air Vent Airlock ") which will be set to "Depressurize" when both doors are closed by default, you can change that in the code however.
v1.4
You can also add LCD/text panels to be updated by the script with the airlock status, again, see code to configure :P NOTE: You can have as many screens with the same name as you want, it will update all of them.
v1.71
Since this version the airlocks are set to wait for depressurization or seal (for pressurization). This only works if the airlocks have an air vent, if they don't then the open delay variables are used. Additionally it updates screens with the oxygen level and has a failsafe in case oxygen levels do not drop to avoid a permanent cycle.
Known issues
-
Fixed since v1.6b Since there's no interface for the air vent I had to do a workaround to find out if it's despressurize status is checked or not, which is language sensitive. If you're using anything other language than english this won't work properly with air vents. I will fix this once they implement an interface to get the depressurize status internally.
-
Because of some issues in the API, the light settings might not work if you add more than one action (set color and set blink for example), while the script is made to support that, the game fails to apply them (as far as I know, might've been fixed by now xD)
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.