From 5cc7265d3661fa4c6f12d691559e8aa6f4771480 Mon Sep 17 00:00:00 2001 From: neonerz Date: Tue, 21 Jun 2022 12:02:22 -0400 Subject: [PATCH] Update hoc22.ts --- hoc22.ts | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 9 deletions(-) diff --git a/hoc22.ts b/hoc22.ts index ea803e8..b6317f1 100644 --- a/hoc22.ts +++ b/hoc22.ts @@ -72,7 +72,7 @@ enum ChessQueenMovementBlock { // global variables const placeBlockMechanicsCommunicationPos = world(0, 64, 0) -const weightDropPosition = world(27, 27, 33) +const weightDropPosition = world(-18, 77, 162) const communicationsTimeout = 100 const chessTimeout = 500 const plateTimeout = 500 @@ -221,7 +221,7 @@ namespace hoc22 { //% block="swap red side" export function dinnerTableSwapRed(): void { blocks.place(Block.OrangeConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(plateTimeout) + loops.pause(communicationsTimeout) } /** * Dinner Table Swap Green @@ -229,7 +229,7 @@ namespace hoc22 { //% block="swap green side" export function dinnerTableSwapGreen(): void { blocks.place(Block.YellowConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(plateTimeout) + loops.pause(communicationsTimeout) } /** * Dinner Table Swap Blue @@ -237,7 +237,7 @@ namespace hoc22 { //% block="swap blue side" export function dinnerTableSwapBlue(): void { blocks.place(Block.LightBlueConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(plateTimeout) + loops.pause(communicationsTimeout) } /** * Dinner Table Swap Yellow @@ -245,7 +245,7 @@ namespace hoc22 { //% block="swap yellow side" export function dinnerTableSwapYellow(): void { blocks.place(Block.MagentaConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(plateTimeout) + loops.pause(communicationsTimeout) } /** @@ -254,7 +254,7 @@ namespace hoc22 { //% block="push blue (up)" export function mosaicPushUp(): void { blocks.place(Block.OrangeConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(chessTimeout) + loops.pause(communicationsTimeout) } /** * Mosaic Push Down @@ -262,7 +262,7 @@ namespace hoc22 { //% block="push red (down)" export function mosaicPushDown(): void { blocks.place(Block.MagentaConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(chessTimeout) + loops.pause(communicationsTimeout) } /** * Mosaic Push Left @@ -270,7 +270,7 @@ namespace hoc22 { //% block="push yellow (left)" export function mosaicPushLeft(): void { blocks.place(Block.LightBlueConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(chessTimeout) + loops.pause(communicationsTimeout) } /** * Mosaic Push right @@ -278,7 +278,7 @@ namespace hoc22 { //% block="push green (right)" export function mosaicPushRight(): void { blocks.place(Block.YellowConcrete, placeBlockMechanicsCommunicationPos) - loops.pause(chessTimeout) + loops.pause(communicationsTimeout) } /** @@ -304,6 +304,91 @@ namespace hoc22 { moveQueenChessInDirection(direction) } + /** + * Potion Room Mixing Puzzle Nether Wart + */ + //% block="add nether wart" + export function mixingPuzzleNetherWart(): void { + blocks.place(Block.OrangeConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + /** + * Potion Room Mixing Puzzle Phantom Membrane + */ + //% block="add phantom membrane" + export function mixingPuzzlePhantomMembrane(): void { + blocks.place(Block.MagentaConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + /** + * Potion Room Mixing Puzzle Spider Eye + */ + //% block="add spider eye" + export function mixingPuzzleSpiderEye(): void { + blocks.place(Block.LightBlueConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + + /** + * Break Block + */ + //% block="break block" + export function breakBlock(): void { + placeBlockSignal() + } + + /** + * Greenhouse Flower Planting Red Flower + */ + //% block="plant red flower" + export function flowerPlantingRedFlower(): void { + blocks.place(Block.LimeConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + + + /** + * Greenhouse Flower Planting Yellow Flower + */ + //% block="plant yellow flower" + export function flowerPlantingYellowFlower(): void { + blocks.place(Block.PinkConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + /** + * Greenhouse Flower Planting Blue Flower + */ + //% block="plant blue flower" + export function flowerPlantingBlueFlower(): void { + blocks.place(Block.GrayConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + + /** + * Lab Minecart Sorting Zombie + */ + //% block="sort zombie" + export function minecraftSortingZombie(): void { + blocks.place(Block.OrangeConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + /** + * Lab Minecart Sorting Skeleton + */ + //% block="sort skeleton" + export function minecraftSortingSkeleton(): void { + blocks.place(Block.MagentaConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + /** + * Lab Minecart Sorting Creeper + */ + //% block="sort creeper" + export function minecraftSortingCreeper(): void { + blocks.place(Block.LightBlueConcrete, placeBlockMechanicsCommunicationPos) + loops.pause(communicationsTimeout) + } + // helper functions function resetSignal(): void { blocks.place(Block.WhiteConcrete, placeBlockMechanicsCommunicationPos)