diff --git a/Js/Audio.js b/Js/Audio.js index c767bc4..8a6c748 100644 --- a/Js/Audio.js +++ b/Js/Audio.js @@ -90,7 +90,7 @@ class audioController { if(!this.loader.bufferList[sound]) { return; } - let source = this.audioCtx.createBufferSource() + let source = this.audioCtx.createBufferSource(); this.sources[sound] = source; source.buffer = this.loader.bufferList[sound]; source.loop = false; diff --git a/Js/Main.js b/Js/Main.js index 20f0f23..00af298 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -269,7 +269,10 @@ function languageChanged(event) { if(currentMission) { missionPath = `${utage.rootDirectory}Js/Translations/Missions/${currentMission.Path.replace('Asset/Utage/', '').replace('Scenario/', '').replace('.utage', '').replace('.tsv', `_translations_${selectedLang}.json`)}`; } - utage.setTranslationLanguage(selectedLang, missionPath); + utage.setTranslationLanguage(selectedLang, missionPath) + .then((success) => { + buildMissionSelectList(); + }); } function checkMissionList(missions, currentvalue) { diff --git a/Js/Player.js b/Js/Player.js index 7e83848..73b9166 100644 --- a/Js/Player.js +++ b/Js/Player.js @@ -680,18 +680,31 @@ class Player { this.checkPutCharacterScreen(cur, true); break; case "attachit02": //103500221 + this.waitTime = 300; break; - case "attachit03": + case "attachit03": //312000112 + this.waitTime = 300; break; case "attacshot12": //103500231 + this.waitTime = 300; break; case "attacslash01": //103500642 + this.waitTime = 300; break; case "attacslash02": //103500231 + this.waitTime = 300; + break; + case "attacslash03": //312000112 + this.waitTime = 300; + break; + case "attacslash04": //312000142 + this.waitTime = 300; break; case "attacslash05": //103500552 + this.waitTime = 300; break; case "attacshot11": //103500251 + this.waitTime = 300; break; case "getitem01": //103400252 break; @@ -764,16 +777,26 @@ class Player { this.waitTime = Number(cur.Arg1) * 1000; break; case "enemy_disappearance01": //312000112 - processTryRemoveChar(cur.Arg1); - break; case "enemy_disappearance02": //312000111 - processTryRemoveChar(cur.Arg1); - processTryRemoveChar(cur.Arg2); + case "enemy_disappearance03": //312000142 + this.processTryRemoveChar(cur.Arg1); + if(cur.Arg2) { + this.processTryRemoveChar(cur.Arg2); + } + if(cur.Arg3) { + this.processTryRemoveChar(cur.Arg3); + } break; case "darkaura01": //312000111 break; - case "somethingnew_appearance01": //312000111 + case "somethingnew_appearance01": { //312000111 + let c = this.currentCharacters['キャラ中央']; + this.waitTime = 1500; + this.lerpTargets.push({type: 'alpha', object: c.sprite, curTime: 0, time: 200, finalV: 0, initV: 1, post: "destroy" }); + let customCommand = { Command: "", Arg1: cur.Arg1, Arg2: this.defaultCharPattern, Arg3: 'キャラ中央', Arg6: .200 }; + this.checkPutCharacterScreen(customCommand, false); break; + } case "continue01": break; } @@ -901,7 +924,7 @@ class Player { sprite.alpha = 0; let fadeTime = 200; //If the character is already on screen put the new sprite in the same position as the old one. - if(curChar) { + if(curChar && curChar.layer.info.LayerName === cur.Arg3) { sprite.position.x = curChar.sprite.position.x; sprite.position.y = curChar.sprite.position.y; //if the current character is doing a tween transfer the tween to the new one. @@ -967,8 +990,11 @@ class Player { curChar = this.currentCharacters[c]; } } - if(!curChar) + if(!curChar) { return; + } + this.lerpTargets.push({type: 'alpha', object: curChar.sprite, curTime: 0, time: 500, finalV: 0, initV: 1, post: "destroy" }); + this.currentCharacters[curChar.layer.info.LayerName] = undefined; } //Checks if the current command is trying to put text on the screen. diff --git a/Js/TextFunctions.js b/Js/TextFunctions.js index 860b16a..853df36 100644 --- a/Js/TextFunctions.js +++ b/Js/TextFunctions.js @@ -88,6 +88,7 @@ class TextFunctions { if (this.dialogToDisplay.curPos === this.dialogToDisplay.text.length) { this.showNextIndicator(true); this.scrollingText = false; + this.dialog.scrollTop = 0; return; } else { this.dialogToDisplay.curPos += 1; @@ -113,7 +114,7 @@ class TextFunctions { this.dialogInner.innerHTML = this.dialogToDisplay.fullText; let lHeight = this.lineHeight * 2; if(this.dialogInner.offsetHeight > lHeight + 5) { - this.dialog.scrollTop = this.dialogInner.offsetHeight - lHeight; + this.dialog.scrollTop = 0//this.dialogInner.offsetHeight - lHeight; this.showScrollControls(true); } this.showNextIndicator(true); diff --git a/Js/Translations b/Js/Translations index 5687378..54cfee1 160000 --- a/Js/Translations +++ b/Js/Translations @@ -1 +1 @@ -Subproject commit 5687378f81f332e32668763f04335f3883f35e4e +Subproject commit 54cfee17b22e9dedf8d92409abd1b2bf4222ed82 diff --git a/Js/UtageParse.js b/Js/UtageParse.js index fae5c62..9078fee 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -183,7 +183,7 @@ class UtageInfo { resolve(); } else { var promises = [ - commonFunctions.getFileJson(`${utage.rootDirectory}Js/Translations/XduMissionsNamesCustom_${this.currentTranslation}.json`), + commonFunctions.getFileJson(`${utage.rootDirectory}Js/Translations/XduMissionsNames_${this.currentTranslation}.json`), commonFunctions.getFileJson(`${utage.rootDirectory}Js/Translations/XduMissionsNamesCustom_${this.currentTranslation}.json`) ]; Promise.all(promises)