SemlerPDX

Stationeers - Starter Base: Power Systems Control v1

Dec 7th, 2025
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | Gaming | 0 0
  1. #Early Game Power Systems Control
  2. # by SemlerPDX Dec2025
  3.  
  4.  
  5. define Generators 813146305
  6. define Batteries -400115994
  7.  
  8. define SolarPanels -539224550 #basic
  9. #define SolarPanels -1545574413 #heavy
  10.  
  11. define DaylightSensors 1076425094
  12.  
  13. # Threshold for "dark"
  14. define IrradianceMin 1
  15. define RelativeTolerance 0.067 # approx. +/-1
  16.  
  17. define SensorOffset 90 # 0, 90, 180, 270
  18.  
  19. define DawnVertical 165
  20. define DawnHorizontal 180
  21.  
  22. define ChargeMin 0.10 # 10%
  23. define ChargeMax 0.50 # 50%
  24.  
  25. define TopOfStack 2
  26.  
  27. alias Counter r15
  28.  
  29. push 0
  30. push 0
  31.  
  32. begin:
  33. move sp TopOfStack
  34. brgtz Counter 2
  35. move Counter 5
  36. start:
  37. beqz sp begin
  38. yield
  39.  
  40. #Gather Power Data
  41. lb r0 Batteries PowerPotential Maximum
  42. get r1 db 0
  43. brlt r0 r1 2
  44. put db 0 r0 #maximum historic production
  45. lb r0 Batteries PowerActual Maximum
  46. mul r1 r0 2
  47. sub r0 r0 r1 #Invert to Negative
  48. get r1 db 1
  49. brgt r0 r1 2
  50. put db 1 r0 #maximum historic power draw
  51.  
  52. #Display
  53. sub Counter Counter 1
  54. and r0 Counter 1
  55. breqz r0 3
  56. pop r0
  57. s db Setting r0
  58.  
  59. #Backup Power Toggle
  60. lb r0 Batteries Charge Average
  61. lb r1 Generators On Maximum
  62. select r1 r1 ChargeMax ChargeMin
  63. slt r0 r0 r1
  64. sb Generators On r0
  65.  
  66. #Check Time of Day
  67. lb r0 DaylightSensors SolarIrradiance Maximum
  68. blt r0 IrradianceMin nightSleep
  69.  
  70. #Follow Sun (in daytime only)
  71. lb r0 DaylightSensors Vertical Maximum
  72. lb r1 DaylightSensors Horizontal Maximum
  73. add r0 r0 SensorOffset
  74. add r1 r1 SensorOffset
  75. sb SolarPanels Vertical r0
  76. sb SolarPanels Horizontal r1
  77. j start
  78.  
  79. nightSleep:
  80. lb r0 SolarPanels Vertical Maximum
  81. bap r0 DawnVertical RelativeTolerance start
  82.  
  83. #Point array at dawn sun
  84. sb SolarPanels Vertical DawnVertical
  85. sb SolarPanels Horizontal DawnHorizontal
  86. j start
Advertisement