Clean up logs and fix variant reference error
This commit is contained in:
14
src/main.js
14
src/main.js
@@ -4,7 +4,7 @@ import { CameraManager } from './view/CameraManager.js';
|
||||
import { UIManager } from './view/UIManager.js';
|
||||
import { MissionConfig, MISSION_TYPES } from './engine/dungeon/MissionConfig.js';
|
||||
|
||||
console.log("🏗️ Warhammer Quest - Manual Dungeon Construction");
|
||||
|
||||
|
||||
// 1. Setup Mission
|
||||
const mission = new MissionConfig({
|
||||
@@ -65,7 +65,7 @@ renderer.onHeroFinishedMove = (x, y) => {
|
||||
|
||||
// 5. Connect Generator State to UI
|
||||
generator.onStateChange = (state) => {
|
||||
console.log(`[Main] State: ${state}`);
|
||||
|
||||
|
||||
if (state === 'PLACING_TILE') {
|
||||
ui.showPlacementControls(true);
|
||||
@@ -87,7 +87,7 @@ generator.onPlacementUpdate = (preview) => {
|
||||
const handleClick = (x, y, doorMesh) => {
|
||||
// PRIORITY 1: Tile Placement Mode - ignore all clicks
|
||||
if (generator.state === 'PLACING_TILE') {
|
||||
console.log('[Main] Use placement controls to place tile');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ const handleClick = (x, y, doorMesh) => {
|
||||
const doorExit = doorMesh.userData.cells[0];
|
||||
|
||||
if (game.isPlayerAdjacentToDoor(doorExit)) {
|
||||
console.log('[Main] 🚪 Opening door and drawing tile...');
|
||||
|
||||
|
||||
// Open door visually
|
||||
renderer.openDoor(doorMesh);
|
||||
@@ -109,7 +109,7 @@ const handleClick = (x, y, doorMesh) => {
|
||||
console.error('[Main] Door missing exitData');
|
||||
}
|
||||
} else {
|
||||
console.log('[Main] ⚠️ Move adjacent to the door first');
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ renderer.setupInteraction(
|
||||
);
|
||||
|
||||
// 7. Start
|
||||
console.log("--- Starting Game ---");
|
||||
|
||||
game.startMission(mission);
|
||||
|
||||
// 8. Render Loop
|
||||
@@ -140,4 +140,4 @@ const animate = (time) => {
|
||||
};
|
||||
animate(0);
|
||||
|
||||
console.log("✅ Ready - Move barbarian next to a door and click it");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user