drabont

Stationeers - Hard Suit Automaton v1.1

Nov 5th, 2021 (edited)
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. #= Hard Suit Automaton = v 1.1 ======= by swagman =#
  2. # _ _ .Auto Light._ ___ _ _ Filter #
  3. # | || |__ _ _ _ __| | / __|_ _(_) |_ AirRel #
  4. # | __ / _` | '_/ _` | \__ \ || | | _| NaviSy #
  5. # |_||_\__,_|_| \__,_| |___/\_,_|_|\__| Automaton #
  6. #==================================================#
  7. # NormalMode: #
  8. # * Auto light off timer - save battery power #
  9. # * Helmet emergency close (P<20, T<>-10..50) #
  10. # Free first filter slot to enable ExtendedMode: #
  11. # + Filter control for ultra-long filters life #
  12. # + AirRel control in hot atmos prevents o2 leak #
  13. # + NaviSy uses TargetP to show distance to Home #
  14. # Home - where IC10 was first inserted into suit #
  15. # place filter in first slot for safe chip removal #
  16. define AutoLightOff 200 #set time to light off (.5s)
  17. #==================================================#
  18. # |-| _\" /-\ |_| "|" () |\/| /-\ "|" () |\| - |_ #
  19. #= 2019.09.13 02:43 https://youtu.be/4UgGSwNdiHI =#
  20. alias Suit db
  21. alias Helm d0
  22. alias Back d1
  23. alias debug r13
  24. alias count r12
  25. alias lTime r11
  26. alias s4o r10
  27. alias LiEn r9
  28. alias ArEn r8
  29. alias FiEn r7
  30. alias PrIn r6
  31. alias RaOx r5
  32. alias PrSe r4
  33. alias PosX r3
  34. alias PosZ r2
  35. move lTime AutoLightOff
  36. l PosX Suit PositionX
  37. l PosZ Suit PositionZ
  38. s Suit Error 1 #beep-boop
  39. #.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-
  40. loop:
  41. yield
  42. ls s4o Suit 4 Occupied
  43. l LiEn Helm On
  44. l PrIn Suit Pressure
  45. l RaOx Suit RatioOxygen
  46. #---light control section
  47. mul count count LiEn
  48. add count count LiEn
  49. sub r0 lTime count
  50. brgt r0 4 2
  51. s Helm On r0
  52. #---air & filter control section
  53. mul RaOx RaOx PrIn
  54. slt ArEn RaOx 20
  55. slt FiEn RaOx 21
  56. #---NaviSy section
  57. l r1 Suit PositionX
  58. l r0 Suit PositionZ
  59. sub r1 r1 PosX
  60. mul r1 r1 r1
  61. sub r0 r0 PosZ
  62. mul r0 r0 r0
  63. add r0 r0 r1
  64. sqrt r0 r0
  65. add r0 r0 50 #-don't scare too low value
  66. select PrSe ArEn 200 r0
  67. #---select mode & use
  68. select PrSe s4o 50 PrSe
  69. select ArEn s4o 1 ArEn
  70. select FiEn s4o 1 FiEn
  71. s Suit PressureSetting PrSe
  72. s Suit AirRelease ArEn
  73. s Suit Filtration FiEn
  74. #---helm emergency close section
  75. l r0 Helm Open
  76. beq r0 0 loop
  77. l r0 Suit PressureExternal
  78. brgt r0 20 2 # 20 kPa
  79. s Helm Open 0
  80. l r0 Suit TemperatureExternal
  81. brlt r0 263.15 2 #-10°C
  82. brlt r0 323.15 2 # 50°C
  83. s Helm Open 0
  84. j loop
  85. #.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-. \-(o)-(o)-/
Add Comment
Please, Sign In to add comment