Merge cleanup

This commit is contained in:
2025-02-10 16:21:23 -06:00
parent 87ffc98cce
commit 59243e0e17
4 changed files with 5 additions and 10 deletions

View File

@ -113,10 +113,6 @@ function updateAndCommit(map?: MapT) {
commit()
commandStack.push(0)
commandIndex.value = commandStack.length
console.log(history.value)
console.log(commandStack)
console.log(commandIndex.value)
}
function addCommand(command: EditorCommand) {

View File

@ -25,6 +25,7 @@ import TilemapLayer = Phaser.Tilemaps.TilemapLayer
const scene = useScene()
const mapEditor = useMapEditorComposable()
const map = computed(() => mapEditor.currentMap.value!)
const emit = defineEmits<{(e: 'update', map: MapT): void, (e: 'updateAndCommit', map: MapT): void}>()
@ -141,7 +142,6 @@ function rotatePlacedMapObject(id: string, map: MapT) {
map.placedMapObjects.map((placed) => {
if (placed.id === id) {
console.log(placed.id)
placed.isRotated = !placed.isRotated
}})

View File

@ -108,7 +108,7 @@ import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
const mapEditor = useMapEditorComposable()
const emit = defineEmits(['save', 'clear', 'open-maps', 'open-settings'])
const emit = defineEmits(['save', 'clear', 'open-maps', 'open-settings', 'open-teleport'])
// States
const toolbar = ref(null)
@ -150,7 +150,7 @@ function handleClick(tool: string) {
mapEditor.setTool(tool)
selectPencilOpen.value = tool === 'pencil' ? !selectPencilOpen.value : false
selectEraserOpen.value = tool === 'eraser' ? !selectEraserOpen.value : false
if (mapEditor.drawMode.value === 'teleport') emit("open-teleport")
}
function cycleToolMode(tool: 'pencil' | 'eraser') {