From a0cf09c901ea519e6aaa3a211ffbc05f88d6d61c Mon Sep 17 00:00:00 2001 From: Joey Wunderlich Date: Thu, 16 Jul 2020 15:14:28 -0700 Subject: [PATCH 1/3] fix namespace now that we have a tilemap temp literal --- overworld.ts | 8 ++++---- pxt.json | 9 ++++++--- tilemap.ts | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/overworld.ts b/overworld.ts index 9691f40..fd13b02 100644 --- a/overworld.ts +++ b/overworld.ts @@ -31,7 +31,7 @@ namespace ConnectionKind { //% color=#84b89f icon="\uf279" //% groups='["Sprites", "Cover", "Tiles", "Creation", "Connections", "Location", "Camera"]' -namespace tilemap { +namespace tiles { export const OVERWORLD_MAP_ID = 7686; export const MAP_LOADED_EVENT = 7687; @@ -142,7 +142,7 @@ namespace tilemap { export function loadMap(map: WorldMap) { const loaded = getLoadedMap(); - tilemap.destorySpritesOfKind(SpriteKind._TileSprite) + tiles.destorySpritesOfKind(SpriteKind._TileSprite) if (loaded) { OverWorldState.callUnloadListeners(); @@ -297,8 +297,8 @@ namespace tilemap { //% direction.shadow=direction_editor //% group="Overworld Grid" weight=40 loadMapAt( - tilemap.columnInDirection(loadedWorldColumn(), direction), - tilemap.rowInDirection(loadedWorldRow(), direction) + tiles.columnInDirection(loadedWorldColumn(), direction), + tiles.rowInDirection(loadedWorldRow(), direction) ); } diff --git a/pxt.json b/pxt.json index 2fbbb59..292b231 100644 --- a/pxt.json +++ b/pxt.json @@ -1,18 +1,21 @@ { "name": "tilemaps", + "version": "1.7.1", + "description": "An extension for handling multiple tilemaps and extra tilemap blocks.", "dependencies": { "device": "*" }, - "description": "An extension for handling multiple tilemaps and extra tilemap blocks.", "files": [ "README.md", "tilemap.ts", "overworld.ts", "search.ts" ], - "preferredEditor": "tsprj", "testFiles": [ "test.ts" ], - "version": "1.7.1" + "supportedTargets": [ + "arcade" + ], + "preferredEditor": "tsprj" } diff --git a/tilemap.ts b/tilemap.ts index 877af28..f118ca5 100644 --- a/tilemap.ts +++ b/tilemap.ts @@ -3,8 +3,9 @@ namespace SpriteKind { } //% color=#84b89f icon="\uf279" +//% block="Tilemaps" //% groups='["Sprites", "Cover", "Tiles", "Location", "Camera"]' -namespace tilemap { +namespace tiles { // // Cover // From ba13e5373acedf792847b8b982c92b5d6958a4ea Mon Sep 17 00:00:00 2001 From: Joey Wunderlich Date: Thu, 16 Jul 2020 15:31:13 -0700 Subject: [PATCH 2/3] also fix destory typo --- tilemap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tilemap.ts b/tilemap.ts index f118ca5..6936e2e 100644 --- a/tilemap.ts +++ b/tilemap.ts @@ -99,7 +99,7 @@ namespace tiles { //% block="destroy all sprites of kind $spriteKind" //% spriteKind.shadow=spritekind //% group="Sprites" weight=9 blockGap=8 - export function destorySpritesOfKind(spriteKind: number) { + export function destroySpritesOfKind(spriteKind: number) { sprites.allOfKind(spriteKind).forEach(s => s.destroy()); } From 8ad2a976a809b0202a6cb68b10d4be0fc59ddf0e Mon Sep 17 00:00:00 2001 From: Joey Wunderlich Date: Thu, 16 Jul 2020 16:28:16 -0700 Subject: [PATCH 3/3] fix one more instance of dest(or=>ro)ySpritesOfKind --- overworld.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overworld.ts b/overworld.ts index fd13b02..0d98a37 100644 --- a/overworld.ts +++ b/overworld.ts @@ -142,7 +142,7 @@ namespace tiles { export function loadMap(map: WorldMap) { const loaded = getLoadedMap(); - tiles.destorySpritesOfKind(SpriteKind._TileSprite) + tiles.destroySpritesOfKind(SpriteKind._TileSprite) if (loaded) { OverWorldState.callUnloadListeners();