Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timer A
- //inputs:
- //signal_red : inverted number of stations still building BPs
- //signal_N : Number of grids above and below the center line should be built
- //BP Book Pages:
- //1: Grid Segment
- //2: Horizontal Stub Station
- //3: Vertical Stub Station Top
- //4: Vertical Stub Station Bottom
- //5: Reset next column signal
- 10: //Initialize and enumerate all variables used
- X = 0 // horizontal offset for building BP
- Y = 0 // vertical offset for building BP
- W = 0 // width of deconstruction area
- H = 0 // height of deconstruction area
- I = 0 // current tile horizontal postion
- J = 0 // current tile vertical position
- C = 0 // contruct/deconstruct signal, map to construction_robot
- B = 60 * 5 //standard wait time, 5 seconds
- G = 256 // Size of grid
- => 30
- 30: //Wait until N combinator is turned on
- N > 0 => 40
- 40: //Build initial stub station
- reset A
- C = 2
- => 50
- 50: //Wait standard wait time
- A > B => 60
- 60: //Turn off BP
- C = 0
- reset A
- => 70
- 70: //Wait standard wait time
- A > B => 80
- 80: //Build Main block
- reset A
- X = G * I
- X = X + 1
- Y = G * J
- C = 1
- => 90
- 90: //Wait standard wait time
- A > B => 100
- 100:
- C = 0
- reset A
- => 110
- 110: //Wait standard wait time
- A > B => 120
- 120: //Build Stub Station
- reset A
- C = 2
- => 130
- 130: //Wait standard wait time
- A > B => 140
- 140: //Turn off BP
- C = 0
- reset A
- I == 0 => 150
- I != 0 => 250
- 150: //Build vertical stub stations
- J >= 0 => 160
- J < 0 => 210
- 160: //Build vertical stub station up
- C = 3
- reset A
- =>170
- 170: //Wait
- A > B => 180
- 180: //Turn off BP
- C = 0
- reset A
- => 190
- 190: //Wait
- A > B => 200
- 200: //Handle middle row
- J == 0 => 210
- J > 0 => 250
- 210: //Build vertical stub station down
- C = 4
- reset A
- =>220
- 220: //Wait
- A > B => 230
- 230: //Turn off BP
- C = 0
- reset A
- => 240
- 240: //Wait
- A > B => 250
- 250: //Select next cell
- J == 0 => 260
- J > 0 => 270
- J < 0 => 280
- 260:
- J = 1
- => 290
- 270:
- J = J * -1
- => 290
- 280:
- J = J * -1
- J = J + 1
- =>290
- 290: //Check if done
- J <= N => 80
- => 300
- 300: //Turn off N circuit
- X = 5
- Y = -20
- C = 5
- reset A
- => 310
- 310: //Wait
- A > B => 320
- 320: //Turn off BP
- C = 0
- reset A
- => 330
- 330: //Wait
- A > B => 340
- 340: //Wait until N signal turned back on
- N > 0 => 80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement