Skip to content

Commit

Permalink
Update hoc22.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
neonerz committed Jun 21, 2022
1 parent 8e77767 commit 5cc7265
Showing 1 changed file with 94 additions and 9 deletions.
103 changes: 94 additions & 9 deletions hoc22.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -221,31 +221,31 @@ 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
*/
//% block="swap green side"
export function dinnerTableSwapGreen(): void {
blocks.place(Block.YellowConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(plateTimeout)
loops.pause(communicationsTimeout)
}
/**
* Dinner Table Swap Blue
*/
//% block="swap blue side"
export function dinnerTableSwapBlue(): void {
blocks.place(Block.LightBlueConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(plateTimeout)
loops.pause(communicationsTimeout)
}
/**
* Dinner Table Swap Yellow
*/
//% block="swap yellow side"
export function dinnerTableSwapYellow(): void {
blocks.place(Block.MagentaConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(plateTimeout)
loops.pause(communicationsTimeout)
}

/**
Expand All @@ -254,31 +254,31 @@ namespace hoc22 {
//% block="push blue (up)"
export function mosaicPushUp(): void {
blocks.place(Block.OrangeConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(chessTimeout)
loops.pause(communicationsTimeout)
}
/**
* Mosaic Push Down
*/
//% block="push red (down)"
export function mosaicPushDown(): void {
blocks.place(Block.MagentaConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(chessTimeout)
loops.pause(communicationsTimeout)
}
/**
* Mosaic Push Left
*/
//% block="push yellow (left)"
export function mosaicPushLeft(): void {
blocks.place(Block.LightBlueConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(chessTimeout)
loops.pause(communicationsTimeout)
}
/**
* Mosaic Push right
*/
//% block="push green (right)"
export function mosaicPushRight(): void {
blocks.place(Block.YellowConcrete, placeBlockMechanicsCommunicationPos)
loops.pause(chessTimeout)
loops.pause(communicationsTimeout)
}

/**
Expand All @@ -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)
Expand Down

0 comments on commit 5cc7265

Please sign in to comment.