File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ export const MapEditorPage: React.FC<Props> = (props) => {
8181 const handleKeyDown = ( event : KeyboardEvent ) => {
8282 if ( ( event . ctrlKey || event . metaKey ) && event . key === 'z' ) {
8383 handleUndo ( )
84+ event . preventDefault ( )
8485 }
8586 }
8687 window . addEventListener ( 'keydown' , handleKeyDown )
Original file line number Diff line number Diff line change 1- export const CLIENT_VERSION = '1.4.1 '
1+ export const CLIENT_VERSION = '1.4.2 '
22export const SPEC_VERSION = '1'
33export const BATTLECODE_YEAR : number = 2025
44export const MAP_SIZE_RANGE = {
Original file line number Diff line number Diff line change @@ -373,15 +373,6 @@ export class StaticMap {
373373 } )
374374 }
375375
376- // Render ruins
377- this . ruins . forEach ( ( { x, y } ) => {
378- const coords = renderUtils . getRenderCoords ( x , y , this . dimension )
379-
380- const imgPath = `ruins/silver.png`
381- const ruinImage = getImageIfLoaded ( imgPath )
382- renderUtils . renderCenteredImageOrLoadingIndicator ( ctx , ruinImage , coords , 1.0 )
383- } )
384-
385376 // Draw grid
386377 const showGrid = true
387378 if ( showGrid ) {
@@ -401,6 +392,15 @@ export class StaticMap {
401392 }
402393 }
403394 }
395+
396+ // Render ruins
397+ this . ruins . forEach ( ( { x, y } ) => {
398+ const coords = renderUtils . getRenderCoords ( x , y , this . dimension )
399+
400+ const imgPath = `ruins/silver_64x64.png`
401+ const ruinImage = getImageIfLoaded ( imgPath )
402+ renderUtils . renderCenteredImageOrLoadingIndicator ( ctx , ruinImage , coords , 1.0 )
403+ } )
404404 }
405405
406406 isEmpty ( ) : boolean {
You can’t perform that action at this time.
0 commit comments