diff --git a/App/js/database.js b/App/js/database.js index 0d953d5..31f5409 100644 --- a/App/js/database.js +++ b/App/js/database.js @@ -10,7 +10,6 @@ (https://evilresource.com/resident-evil-code-veronica/maps) name: [String] Map Name - location: [String] Map Name location: [String] Map location canSave: [Boolean] Player can save haveItemBox: [Boolean] Map have item box @@ -555,7 +554,7 @@ temp_DATABASE = { 'R40B': { name: 'Synthesis Room', location: 'Hospital', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, 'R40C': { name: 'Park Entrance', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, 'R40D': { name: 'Water Pump Puzzle', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, - 'R40E': { name: 'Park ā€ŸLā€ Bridge', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, + 'R40E': { name: 'Lake Passageway', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, 'R40F': { name: 'Park Exit', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, 'R410': { name: 'Sewer Passage', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, 'R411': { name: 'Graveyard', location: 'Park', haveItemBox: !1, canSave: !1, gameStart: !1, gameEnd: !1, skipCamHint: !1 }, diff --git a/App/js/graphics.js b/App/js/graphics.js index 496de3b..4745960 100644 --- a/App/js/graphics.js +++ b/App/js/graphics.js @@ -212,14 +212,8 @@ temp_GRAPHICS = { // Add room to map pushMap: function(mapName, parent){ - // Variables - var canAdd = !0, - errorReason = '', - mList = this.addedMaps, - cMap = APP.gameHook.gameData.cMap, - distanceFactor = this.distanceFactor; - - // Get current game and check if current map was added + // Set vars, get current game and check if current map was added + var canAdd = !0; const cGame = APP.options.settingsData.currentGame; if (document.getElementById(`ROOM_${mapName}`) !== null){ canAdd = !1; @@ -238,10 +232,6 @@ temp_GRAPHICS = { // Check if can add map if (canAdd === !0){ - // Reset map drag - APP.graphics.enableCanvasDrag = !0; - APP.graphics.toggleDragMapCanvas(); - // Default coords var posX = 50000, posY = 50050, @@ -250,6 +240,11 @@ temp_GRAPHICS = { cBioRandObjective = APP.database[cGame].bioRandObjectives[mapName], isBioRandMod = document.getElementById('CHECKBOX_isBioRand').checked; + // Reset map drag + APP.graphics.enableCanvasDrag = !0; + APP.graphics.toggleDragMapCanvas(); + + // Check if parent map was provided if (parent !== void 0){ // Set default position @@ -266,11 +261,9 @@ temp_GRAPHICS = { // Check if is game start if (APP.database[cGame].rdt[mapName].gameStart === !0){ - - // Can add message var - var canAddGameStart = !0; - // Check if is Bio 2 and current map is start from other scenario (Start from B on A and vice-versa) + // Create can add message var, check if is Bio 2 and current map is start from other scenario (Start from B on A and vice-versa) + var canAddGameStart = !0; if (cGame === 'bio2' && cGameScenario === 'scenario_a' && mapName === 'R104'){ canAddGameStart = !1; } @@ -452,11 +445,9 @@ temp_GRAPHICS = { // Process const runProcess = function(){ - // Bump cycle counter and set reset flag + // Bump cycle counter, set reset flag and start processing cycles++; var reRun = !1; - - // Start processing Object.keys(APP.graphics.addedMaps).forEach(function(cMap){ // Exclude current map from processing @@ -644,8 +635,10 @@ temp_GRAPHICS = { canAdd = !1; } + // Check if can add if (canAdd === !0){ + // Create vars var pData = TMS.getRect(`ROOM_${parent}`), nData = TMS.getRect(`ROOM_${newMap}`), canvasData = TMS.getRect('APP_MAP_CANVAS'), @@ -771,6 +764,7 @@ temp_GRAPHICS = { // Update lines updateLines: function(roomName){ + // Create line const and check how much lines exists const lineList = this.addedLines; if (Object.keys(lineList).length !== 0){