Advertisement
drabont

Stationeers - Hard Suit Automaton

Sep 13th, 2019
1,829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # WARNING - In the latest versions this code does not work, I leave it only as a sample
  2. # ВНИМАНИЕ - В последних версиях игры этот код не работает, оставляю его только как пример.
  3.  
  4. #= Hard Suit Automaton = v 0.8 ======= by swagman =#
  5. #  _  _             _   ___      _ _     li je **  #
  6. # | || |__ _ _ _ __| | / __|_  _(_) |_   te fi ba  #
  7. # | __ / _` | '_/ _` | \__ \ || | |  _|  ** re se  #
  8. # |_||_\__,_|_| \__,_| |___/\_,_|_|\__|  Automaton #
  9. #==================================================#
  10. # Use "Pressure Up/Down" button to set light timer #
  11. # Look at "Temperature Setting" on hud when setup  #
  12. # NormalMode:                                      #
  13. # + auto light off timer                           #
  14. # + jetpack "silent mode"                          #
  15. # Free first filter slot to enable AdvancedMode:   #
  16. # + auto correct A/C settings by external temp     #
  17. # + auto activation A/C at critical temperatures   #
  18. # + filter system control for filters longer life  #
  19. # + display of remaining battery life in seconds   #
  20. # Place filter in first slot for safe chip removal #
  21. #==================================================#
  22. # |-| _\"  /-\ |_| "|" () |\/| /-\ "|" () |\| - |_ #
  23. #= 2019.09.13 02:43  https://youtu.be/Nh8U1YmfuXE =#
  24.  
  25. define cZer 273.15 # 0°C
  26. define cMid 298.15 # 25°C
  27. define cMax 323.15 # 50°C
  28. alias Suit db
  29. alias Helm d0
  30. alias Back d1
  31. alias debug r15
  32. alias count r14
  33. alias bPrCh r13
  34. alias lTime r12
  35. alias s4o r10
  36. alias LiEn r9
  37. alias TeEn r7
  38. alias FiEn r8
  39. alias TeSe r6
  40. alias TeEx r5
  41. alias TeIn r4
  42. alias BaCh r3
  43. alias RaOx r2
  44.  
  45. #.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~
  46. loop:
  47. yield
  48. ls s4o Suit 4 Occupied
  49. l LiEn Helm On
  50. ls BaCh Suit 2 Charge
  51. l TeEx Suit TemperatureExternal
  52. l TeIn Suit Temperature
  53. l RaOx Suit RatioOxygen
  54.  
  55. #--light control module
  56. mul count count LiEn
  57. add count count LiEn
  58. sub r0 lTime count
  59. brgt r0 4 2
  60. s Helm On r0
  61.  
  62. #--jetpack control module
  63. s Back On 1
  64. s Back Activate 0 # bug "silent mode"
  65.  
  66. #--temp control module
  67. min TeSe TeEx cMax # 50°C
  68. max TeSe TeSe cZer # 0°C
  69. sna TeEn TeIn cMid 0.1 # 25°C ±30°C
  70.  
  71. #--filter control module
  72. slt FiEn RaOx 0.40
  73.  
  74. #--battery control module
  75. sub r0 bPrCh BaCh
  76. move bPrCh BaCh
  77. div BaCh BaCh r0
  78. div BaCh BaCh 2
  79. sub r0 cZer BaCh
  80. xor debug debug 1
  81. brgtz debug 2
  82. select TeSe TeEn TeSe r0
  83.  
  84. #--restore safe setting
  85. select TeEn s4o 1 TeEn
  86. select FiEn s4o 1 FiEn
  87. select TeSe s4o cMid TeSe
  88.  
  89. #--setup module
  90. l r0 Suit PressureSetting
  91. sub r0 r0 50
  92. mul r0 r0 100 #step
  93. add lTime lTime r0
  94. max lTime lTime 100 #init
  95. breqz r0 5
  96. move TeEn 0
  97. div TeSe lTime 2
  98. add TeSe cZer TeSe
  99.  
  100. #--apply automaton
  101. s Suit On TeEn
  102. s Suit Filtration FiEn
  103. s Suit TemperatureSetting TeSe
  104. s Suit PressureSetting 50
  105. j loop
  106.  
  107. #.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.   \-(o)-(o)-/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement