File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,8 +247,16 @@ namespace pxtblockly {
247247 }
248248 }
249249
250- const allTiles = getAllBlocksWithTilesets ( workspace ) ;
251250 const project = pxt . react . getTilemapProject ( ) ;
251+ const projectMaps = project . getAllTilemaps ( ) ;
252+
253+ for ( const projectMap of projectMaps ) {
254+ for ( const tile of projectMap . data . tileset . tiles ) {
255+ all [ tile . id ] = tile ;
256+ }
257+ }
258+
259+ const allTiles = getAllBlocksWithTilesets ( workspace ) ;
252260 for ( const tilesetField of allTiles ) {
253261 const id = tilesetField . ref . getValue ( ) ;
254262
Original file line number Diff line number Diff line change @@ -179,6 +179,10 @@ namespace pxt {
179179 return null ;
180180 }
181181
182+ public getAllTilemaps ( ) {
183+ return this . state . projectTilemaps ?. slice ( ) || [ ] ;
184+ }
185+
182186 public updateTilemap ( id : string , data : pxt . sprite . TilemapData ) {
183187 for ( const tm of this . state . projectTilemaps ) {
184188 if ( tm . id === id ) {
You can’t perform that action at this time.
0 commit comments