# Work in progress wind tunnel script

Sep 29th, 2022 (edited)
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. let tunnelSize = 200 // Set the size of the tunnel (2-300)
2.
3.
4.
5. // Left side settings
6.
7. // Toggle left side
8. let left = 1
9.
10. // 0 = no cloner, 1 = just the left side, 2 = left, top, and bottom sides
11. let clonerTypeL = 2
12.
13. // Horizontal posistion from the edge of the left barrier (2-150, 0 = disable barrier)
14. let barrierXL = 100
15.
16. // Set the width of the left barrier
17. let barrierWidthL = 5
18. //let speciesL = (species) // work in progress option
19.
20. // Right side settings
21.
22. // Toggle right side
23. let right = 1
24.
25. // 0 = no cloner, 1 = just the right side, 2 = right, top, and bottom sides
26. let clonerTypeR = 1
27.
28. // Horizontal posistion from the edge of the right barrier, (2-150, 0 = disable barrier)
29. let barrierXR = 25
30.
31. // Set the width of the right barrier
32. let barrierWidthR = 1
33.
34. //let speciesR = (species) // work in progress option
35.
36.
37.
38. //Setup
39. u.reset() //Clears screen with empty
40. u.paint(150,150,600,1) //Fills with wall
41. Array.from({length: 300},(_,x) => u.paint(x,150,tunnelSize,0)) //Uses empty to create the tunnel
42.
43. if (left == 1) { //left side
44.     Array.from({length: 300},(_,x) => u.paint(barrierXL,x,barrierWidthL,1))
45.     if (clonerTypeL == 1) {
46.         Array.from({length: 300},(_,x) => u.paint(0,x,1,species.Cloner))
47.     } else if (clonerTypeL == 2) {
48.         Array.from({length: 300},(_,x) => u.paint(0,x,1,species.Cloner))
49.         Array.from({length: barrierXL},(_,x) => u.paint(x,150-tunnelSize+tunnelSize*2-tunnelSize/2,1,species.Cloner))
50.         Array.from({length: barrierXL},(_,x) => u.paint(x,300-(150-tunnelSize+tunnelSize*2-tunnelSize/2),1,species.Cloner))
51.     }
52. }
53.
54.
55. if (right == 1) { //right side
56.     Array.from({length: 300},(_,x) => u.paint(300-barrierXR,x,barrierWidthR,1))
57.     if (clonerTypeR == 1) {
58.         Array.from({length: 300},(_,x) => u.paint(299,x,1,species.Cloner))
59.     } else if (clonerTypeR == 2) {
60.         Array.from({length: 300},(_,x) => u.paint(299,x,1,species.Cloner))
61.         Array.from({length: barrierXR},(_,x) => u.paint(300-x,150-tunnelSize+tunnelSize*2-tunnelSize/2,1,species.Cloner))
62.         Array.from({length: barrierXR},(_,x) => u.paint(300-x,300-(150-tunnelSize+tunnelSize*2-tunnelSize/2),1,species.Cloner))
63.     }
64. }