Advertisement
drabont

Stationeers - HardSuit HiPr v 1.2

Oct 30th, 2022
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. #= Hard Suit Automaton HiPr = v 1.2 == 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 300 #set time to light off (.5s)
  17. #==================================================#
  18. # |-| _\" /-\ |_| "|" () |\/| /-\ "|" () |\| - |_ #
  19. #= 2022.10.30 01:39 https://youtu.be/fHjzsR-N6DU =#
  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. sle FiEn RaOx 22
  55. xor r0 FiEn 1
  56. s Suit On r0
  57. sle ArEn PrIn 560 #max 560
  58. #---NaviSy section
  59. l r1 Suit PositionX
  60. l r0 Suit PositionZ
  61. sub r1 r1 PosX
  62. mul r1 r1 r1
  63. sub r0 r0 PosZ
  64. mul r0 r0 r0
  65. add r0 r0 r1
  66. sqrt r0 r0
  67. add r0 r0 50 #-don't scare too low value
  68. select PrSe ArEn 999 r0
  69. #---select mode & use
  70. select PrSe s4o 50 PrSe
  71. select ArEn s4o 1 ArEn
  72. select FiEn s4o 1 FiEn
  73. s Suit PressureSetting PrSe
  74. s Suit AirRelease ArEn
  75. s Suit Filtration FiEn
  76. #---helm emergency close section
  77. l r0 Helm Open
  78. beq r0 0 loop
  79. l r0 Suit PressureExternal
  80. brgt r0 20 2 # 20 kPa
  81. s Helm Open 0
  82. l r0 Suit TemperatureExternal
  83. brlt r0 263.15 2 #-10C
  84. brlt r0 323.15 2 # 50C
  85. s Helm Open 0
  86. j loop
  87. #.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-.-~-. \-(o)-(o)-/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement