User:Carsten Milkau/Dual-Atmosphere Airlock: Difference between revisions
From Stationeers Wiki
More actions
→Door sensor: pseudocode |
→Vent direction: pseudocode |
||
| Line 50: | Line 50: | ||
[[User:Carsten Milkau/NOT Gate]] | [[User:Carsten Milkau/NOT Gate]] | ||
<pre>if (my target atmosphere) | |||
then pressurize | |||
else depressurize</pre> | |||
Revision as of 12:29, 22 July 2018
Structure
Piping
Electronics
Constants
- Zero
- "Vacuum" pressure
Target Atmosphere
Current Atmosphere
if (internal_pressure > vacuum_pressure) then current_atmosphere = current_atmosphere else current_atmosphere = target_atmosphere
Door sensor
num_open_doors = read_sum(airlock_door open) doors_closed = (num_open_doors = 0)
Door control
if (my atmosphere) then (internal pressure >= external pressure) else Zero
Vent activation
if (my atmosphere) then (doors closed) else Zero
- atmosphere 0: max(atmosphere1, any door open) = Zero
- atmosphere 1: atmosphere1 > any door open
Vent direction
if (my target atmosphere) then pressurize else depressurize