1
0
forked from noxious/client

Works partially 💩

This commit is contained in:
Zaxiure
2024-10-15 23:48:50 +02:00
parent a6c22df528
commit a9c2b209d9
3 changed files with 46 additions and 7 deletions

View File

@ -120,7 +120,7 @@ function setEraserMode(value: string) {
}
function clickTile(pointer: Phaser.Input.Pointer) {
if (zoneEditorStore.tool !== 'eraser' && zoneEditorStore.tool !== 'pencil' && zoneEditorStore.tool !== 'paint') return
if (zoneEditorStore.tool !== 'eraser' && zoneEditorStore.tool !== 'move' && zoneEditorStore.tool !== 'pencil' && zoneEditorStore.tool !== 'paint') return
if (pointer.event.shiftKey) return
const px = scene.cameras.main.worldView.x + pointer.x
@ -129,6 +129,10 @@ function clickTile(pointer: Phaser.Input.Pointer) {
const pointer_tile = getTile(px, py, props.layer as TilemapLayer) as Phaser.Tilemaps.Tile
if (!pointer_tile) return
if (zoneEditorStore.tool === 'move') {
emit('move', pointer_tile)
}
if (zoneEditorStore.tool === 'eraser') {
emit('eraser', pointer_tile)
}