Stationeers空間站工程師自動(dòng)化編程模塊01

太陽(yáng)能電池板
alias sensor d0
alias panel d1
move r0 -2045627372
move r1 -539224550
move r2 -934345724
move r3 -1545574413
alias list r4
alias vertical r5
alias horizontal r6
alias angle r7
alias sunup r8
alias date r9
alias old.date r10
alias var r11
reset:
move sunup 999
move old.date 0
move var 0
set:
l vertical sensor Vertical
blt vertical 20 reset
bge vertical 75 reset
sub vertical 90 vertical
s panel Vertical vertical
round vertical vertical
l date panel Vertical
round date date
brne date vertical -8
l horizontal sensor Horizontal
add horizontal horizontal var
brgez horizontal 2
add horizontal horizontal 360
brle horizontal 360 2
sub horizontal horizontal 360
s panel Horizontal horizontal
round horizontal horizontal
l date panel Horizontal
round date date
brne date horizontal -10
l date panel Ratio
brle date old.date 4
move old.date date
move angle var
s db Setting angle
add var var 90
beq var 360 start
j set
start:
l vertical sensor Vertical
brlt vertical 90 10
floor var vertical
brne sunup 999 5
brne var 90 4
l horizontal sensor Horizontal
move sunup horizontal
add sunup sunup angle
move vertical 15
move horizontal sunup
j loop
sub vertical 90 vertical
l horizontal sensor Horizontal
add horizontal horizontal angle
loop:
brne list 4 3
move list 0
j start
sb rr4 Horizontal horizontal
sb rr4 Vertical vertical
add list list 1
j loop
固體燃料發(fā)電機(jī)
move r1 0.2???#0.2可以改成0-1之間的任何數(shù)值
move r4 0.8???#0.8可以改成0-1之間的任何數(shù)值
move r2 0
move r3 1
lb r0 -1388288459 Ratio Minimum
bge r1 r0 a
bge r0 r1 b
yield
a:
s d0 On r3
yield
j 3
b:
lb r0 -1388288459 Ratio Maximum
bge r0 r4 r2
s d0 On r2
yield
j 3w