drabont

Stationeers - Hard Suit Automaton v1.0

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