ferreusveritas

makeChamber

Sep 11th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.37 KB | None | 0 0
  1. --[[
  2.  
  3. /gamerule doDaylightCycle false
  4. /gamerule doWeatherCycle false
  5. /gamerule commandBlockOutput false
  6. /gamerule logAdminCommands false
  7. /gamerule randomTickSpeed 1000
  8. /time set 6000
  9.  
  10. ]]--
  11.  
  12. os.loadAPI("build");
  13.  
  14. --API Aliases
  15. function dirMap(turns) return build.dirMap(turns); end
  16.  
  17. dofile("config");
  18. dofile("blocks");
  19.  
  20. local D, U, N, S, W, E = dirMap(0);
  21.  
  22. local radius = 8;
  23. local compy = build.Coord:get();
  24. local center = compy:off(N, radius + 3);
  25. local vol = build.cuboid(center):grohor(radius + 3);
  26.  
  27. build.cuboid(compy:up()):gro(U, 2):grohor():erase(); --Erase Monitors
  28.  
  29. build.cuboid(compy):grohor():loop(air); --Erase Base Around Computer
  30. vol:gro(U, height + 2):shrhor():erase();
  31. vol:gro(D, 2):dwn():fill(sandstone);
  32.  
  33. --error(); --Uncomment to bail after erasing
  34.  
  35. vol:dwn():loop(hazardBlock);
  36.  
  37. vol = vol:shrhor():fill(platBlock);
  38. vol = vol:shrhor():up():loop(frameBlock);
  39. vol:gro(U, height + 1):box(air, frameBlock, frameBlock, frameBlock, frameBlock, frameBlock);
  40. vol:shrhor():fill(floorBlock);
  41.  
  42. --TODO: Make glass ceiling
  43.  
  44. center = center:up();
  45.  
  46. build.cuboid(center):grohor():fill(ventBlock);
  47.  
  48. center:cub():fill(dirt);
  49.  
  50. --Chamber walls
  51. center:up():cylinder(wallBlock, radius, height);
  52.  
  53. build.cuboid(compy:up()):dunswe(0, 2, 1, 0, 2, 2):fill(frameBlock);
  54. build.cuboid(compy):grohor():loop(platBlock):grohor():loop(platBlock);
  55. build.cuboid(compy):off(S):dunswe(0, 0, 0, 1, 2, 2):erase();
  56.  
  57. --Make monitors TODO:  Make monitor placement library
  58. compy:up(2):off(W):putnbt(build.blockState("computercraft:peripheral", "variant=advanced_monitor_rd"), "{dir:3,width:3,height:2,xIndex:0,yIndex:1}");
  59. compy:up(2):putnbt(build.blockState("computercraft:peripheral", "variant=advanced_monitor_lrd"),       "{dir:3,width:3,height:2,xIndex:1,yIndex:1}");
  60. compy:up(2):off(E):putnbt(build.blockState("computercraft:peripheral", "variant=advanced_monitor_ld"), "{dir:3,width:3,height:2,xIndex:2,yIndex:1}");
  61. compy:up():off(W):putnbt(build.blockState("computercraft:peripheral", "variant=advanced_monitor_ru"),  "{dir:3,width:3,height:2,xIndex:0,yIndex:0}");
  62. compy:up():putnbt(build.blockState("computercraft:peripheral", "variant=advanced_monitor_lru"),        "{dir:3,width:3,height:2,xIndex:1,yIndex:0}");
  63. compy:up():off(E):putnbt(build.blockState("computercraft:peripheral", "variant=advanced_monitor_lu"),  "{dir:3,width:3,height:2,xIndex:2,yIndex:0}");
  64.  
  65. os.reboot();
  66.  
Add Comment
Please, Sign In to add comment