Merge branch 'master' into release

这个提交包含在:
rdh 2018-09-13 09:23:18 -04:00
当前提交 b74cacb148
共有 11 个文件被更改,包括 387 次插入62 次删除

4
.gitmodules vendored
查看文件

@ -2,3 +2,7 @@
path = Js/Translations
url = https://git.poweris.moe/xdutranslations.git
branch = .
[submodule "CustomData"]
path = CustomData
url = https://git.poweris.moe/customdata.git
branch = .

2
Css/generic.min.css vendored
查看文件

@ -1 +1 @@
html{font-size:16px;font-family:arial;background-color:#393939;color:rgba(255,255,255,.7)}html body{border-color:rgba(255,255,255,.2)}html body a{color:#0096cf}html body a:not([href]){text-decoration:underline;cursor:pointer}html body .hover-span{color:#0096cf}.fade-in{opacity:0;transition:opacity .5s}
html{font-size:16px;font-family:arial;background-color:#393939;color:rgba(255,255,255,.7)}html body{border-color:rgba(255,255,255,.2)}html body a{color:#0096cf}html body a:not([href]){text-decoration:underline;cursor:pointer}html body .hover-span{color:#0096cf}.fade-in{opacity:0;transition:opacity .5s}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}

查看文件

@ -35,10 +35,15 @@
}
@font-face {
font-family: SourceCodePro-Regular;
src: url(../Fonts/SourceCodePro-Regular.woff2) format('woff');
font-family: Orbitron-Medium;
src: url(../Fonts/Orbitron Medium.woff2) format('woff');
}
/*@font-face {
font-family: SourceSansVariable-Roman;
src: url(../Fonts/SourceSansVariable-Roman.woff2) format('woff');
}*/
@-webkit-keyframes smallbounce {
from { transform: translate(0, 5px); }
to { transform: translate(0, -5px); }
@ -56,8 +61,6 @@ body { margin: 0; }
.flex-grow { flex-grow: 1; }
.centered { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.hidden { opacity: 0; }
.shown { opacity: 0; }
@ -68,6 +71,10 @@ body { margin: 0; }
#text-container { color: white; position: absolute; margin: auto; height: 750px; width: 1334px; font-family: 'FOT-RodinNTLGPro'; }
#text-container.eng { font-family: 'FOT-RodinNTLGPro'; }
#text-container.jpn { font-family: 'FOT-RodinNTLGPro'; }
#text-container #fullscreen-button { position: absolute; top: 0.5rem; left: 0.5rem; font-size: 30px; line-height: 30px; opacity: 0.35; z-index: 11; }
#text-container #title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 20px; transition: opacity 0.3s; cursor: default; user-select: none; }

1
CustomData 子模块

@ -0,0 +1 @@
Subproject commit e45642773aa255babfde41b770ce1e4c78ca5251

查看文件

@ -12,6 +12,19 @@
"seconds": 11.323
}
},
"bgm_adv_battle_02": {
"duration": 94.41484375,
"loop_end": {
"samples_48k": 4531845,
"samples_native": 3021230,
"seconds": 94.4134375
},
"loop_start": {
"samples_48k": 330432,
"samples_native": 220288,
"seconds": 6.884
}
},
"bgm_adv_comical_01": {
"duration": 57.7235625,
"loop_end": {
@ -25,6 +38,19 @@
"seconds": 5.222
}
},
"bgm_adv_comical_02": {
"duration": 71.2195,
"loop_end": {
"samples_48k": 3418456,
"samples_native": 2278971,
"seconds": 71.21784375
},
"loop_start": {
"samples_48k": 625728,
"samples_native": 417152,
"seconds": 13.036
}
},
"bgm_adv_emergency_01": {
"duration": 98.295,
"loop_end": {
@ -38,6 +64,19 @@
"seconds": 27.183
}
},
"bgm_adv_emergency_02": {
"duration": 76.7199375,
"loop_end": {
"samples_48k": 3682461,
"samples_native": 2454974,
"seconds": 76.7179375
},
"loop_start": {
"samples_48k": 720144,
"samples_native": 480096,
"seconds": 15.003
}
},
"bgm_adv_everyday_01": {
"duration": 75.8483125,
"loop_end": {
@ -77,6 +116,19 @@
"seconds": 9.092
}
},
"bgm_adv_everyday_04": {
"duration": 66.528375,
"loop_end": {
"samples_48k": 3193291,
"samples_native": 2128861,
"seconds": 66.52690625
},
"loop_start": {
"samples_48k": 313296,
"samples_native": 208864,
"seconds": 6.527
}
},
"bgm_adv_highlight_01": {
"duration": 97.1335,
"loop_end": {
@ -116,6 +168,19 @@
"seconds": 30.764
}
},
"bgm_adv_highlight_04": {
"duration": 102.86365625,
"loop_end": {
"samples_48k": 4937361,
"samples_native": 3291574,
"seconds": 102.8616875
},
"loop_start": {
"samples_48k": 682224,
"samples_native": 454816,
"seconds": 14.213
}
},
"bgm_adv_peace_01": {
"duration": 83.74309375,
"loop_end": {
@ -129,6 +194,19 @@
"seconds": 11.278
}
},
"bgm_adv_peace_02": {
"duration": 67.32375,
"loop_end": {
"samples_48k": 3231464,
"samples_native": 2154309,
"seconds": 67.32215625
},
"loop_start": {
"samples_48k": 386400,
"samples_native": 257600,
"seconds": 8.05
}
},
"bgm_adv_sorrow_01": {
"duration": 75.9431875,
"loop_end": {
@ -142,6 +220,19 @@
"seconds": 20.332
}
},
"bgm_adv_sorrow_02": {
"duration": 78.8830625,
"loop_end": {
"samples_48k": 3786321,
"samples_native": 2524214,
"seconds": 78.8816875
},
"loop_start": {
"samples_48k": 680016,
"samples_native": 453344,
"seconds": 14.167
}
},
"bgm_adv_tension_01": {
"duration": 66.506,
"loop_end": {
@ -155,6 +246,32 @@
"seconds": 8.573
}
},
"bgm_adv_tension_02": {
"duration": 75.747875,
"loop_end": {
"samples_48k": 3635811,
"samples_native": 2423874,
"seconds": 75.7460625
},
"loop_start": {
"samples_48k": 545088,
"samples_native": 363392,
"seconds": 11.356
}
},
"bgm_adv_tension_03": {
"duration": 96.00084375,
"loop_end": {
"samples_48k": 4607959,
"samples_native": 3071973,
"seconds": 95.99915625
},
"loop_start": {
"samples_48k": 383952,
"samples_native": 255968,
"seconds": 7.999
}
},
"bgm_home_01": {
"duration": 76.73034375,
"loop_end": {
@ -259,6 +376,19 @@
"seconds": 18.59
}
},
"music_daisukisukisugi": {
"duration": 93.21253125,
"loop_end": {
"samples_48k": 4474110,
"samples_native": 2982740,
"seconds": 93.210625
},
"loop_start": {
"samples_48k": 322416,
"samples_native": 214944,
"seconds": 6.717
}
},
"music_dangerous_sunshine": {
"duration": 99.20853125,
"loop_end": {
@ -311,6 +441,19 @@
"seconds": 38.785
}
},
"music_endless_summertime": {
"duration": 122.51665625,
"loop_end": {
"samples_48k": 5880708,
"samples_native": 3920472,
"seconds": 122.51475
},
"loop_start": {
"samples_48k": 2393568,
"samples_native": 1595712,
"seconds": 49.866
}
},
"music_first_love_song": {
"duration": 104.9476875,
"loop_end": {
@ -324,6 +467,19 @@
"seconds": 12.189
}
},
"music_flight_feathers": {
"duration": 111.38940625,
"loop_end": {
"samples_48k": 5346628,
"samples_native": 3564419,
"seconds": 111.38809375
},
"loop_start": {
"samples_48k": 1221216,
"samples_native": 814144,
"seconds": 25.442
}
},
"music_fushichou_no_flamme": {
"duration": 129.0045,
"loop_end": {
@ -480,6 +636,19 @@
"seconds": 26.267
}
},
"music_gyakkou_no_flugel_ver_souyoku": {
"duration": 123.3248125,
"loop_end": {
"samples_48k": 5919507,
"samples_native": 3946338,
"seconds": 123.3230625
},
"loop_start": {
"samples_48k": 1687440,
"samples_native": 1124960,
"seconds": 35.155
}
},
"music_gyakkou_no_resolve": {
"duration": 111.3798125,
"loop_end": {
@ -532,6 +701,19 @@
"seconds": 17.948
}
},
"music_junpaku_innocent": {
"duration": 118.195375,
"loop_end": {
"samples_48k": 5673310,
"samples_native": 3782207,
"seconds": 118.19396875
},
"loop_start": {
"samples_48k": 2061216,
"samples_native": 1374144,
"seconds": 42.942
}
},
"music_kimitoiu_otokanade_tsukirumade": {
"duration": 95.7555,
"loop_end": {
@ -688,6 +870,19 @@
"seconds": 27.383
}
},
"music_rainbow_flower": {
"duration": 88.8225,
"loop_end": {
"samples_48k": 4263411,
"samples_native": 2842274,
"seconds": 88.8210625
},
"loop_start": {
"samples_48k": 1273728,
"samples_native": 849152,
"seconds": 26.536
}
},
"music_ressou_gungnir": {
"duration": 141.42465625,
"loop_end": {
@ -805,6 +1000,32 @@
"seconds": 0.0
}
},
"music_shippujinrai": {
"duration": 104.2053125,
"loop_end": {
"samples_48k": 5001786,
"samples_native": 3334524,
"seconds": 104.203875
},
"loop_start": {
"samples_48k": 1210320,
"samples_native": 806880,
"seconds": 25.215
}
},
"music_shitou_eibihikaito": {
"duration": 151.1798125,
"loop_end": {
"samples_48k": 7256547,
"samples_native": 4837698,
"seconds": 151.1780625
},
"loop_start": {
"samples_48k": 2724096,
"samples_native": 1816064,
"seconds": 56.752
}
},
"music_sorae": {
"duration": 128.56625,
"loop_end": {
@ -831,6 +1052,19 @@
"seconds": 27.145
}
},
"music_tegami": {
"duration": 79.045,
"loop_end": {
"samples_48k": 3794065,
"samples_native": 2529377,
"seconds": 79.04303125
},
"loop_start": {
"samples_48k": 897552,
"samples_native": 598368,
"seconds": 18.699
}
},
"music_the_moon_is_a_harsh_mistress": {
"duration": 96.8825,
"loop_end": {

查看文件

@ -28,7 +28,6 @@ let isMuted = false;
let volume = 0.5;
let fullScreen = false;
let prevMission = '{Select}';
const availableMstIds = [202070, 202071, 202013, 338001, 338002, 338003, 338004]//[202070, 202013, 338001, 338002, 338003, 338004, 338005, 338006, 338007, 338009, 338010, 338011];
function onBodyLoaded() {
bodyLoaded = true;
@ -105,6 +104,7 @@ function loadLocalStorage() {
if(languages.includes(lang)) {
selectedLang = lang;
}
document.getElementById('text-container').className = selectedLang;
utage.setTranslationLanguage(selectedLang, '')
.then((success) => {
languagesLoaded = true;
@ -193,12 +193,14 @@ function missionDropDownChanged(event) {
chapterSelect += `<option value="${m.Id}">${m.Id}</option>`
}
}
let detailSrc = `${utage.rootDirectory}${(mis.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Detail/${mis.MstId}.png`;
let iconSrc = `${utage.rootDirectory}${(mis.IsCustom ? "CustomData" : "XDUData")}/Asset/Image/Quest/Snap/Icon/${mis.MstId}.png`;
chapterSelect += '</select></div>';
cont.innerHTML = `
<div id="mission-modal" class="modal">
<span class="mission-title">${name || 'none'}</span>
<img id="mission-detail" src="${utage.rootDirectory}XDUData/Asset/Image/Quest/Snap/Detail/${mis.MstId}.png"/>
<img id="mission-icon" src="${utage.rootDirectory}XDUData/Asset/Image/Quest/Snap/Icon/${mis.MstId}.png"/>
<img id="mission-detail" src="${detailSrc}"/>
<img id="mission-icon" src="${iconSrc}"/>
<div id="mission-summary">Summary: ${summary || 'none'}</div>
<div class="flex-grow"></div>
<div>Credits (${selectedLang}): ${credits}</div>
@ -256,10 +258,13 @@ function missionChanged(mstId, value) {
missionChanged(currentMissionMst, mst.Missions[currentMissionList[currentMissionIndex+1]].Id);
return;
}
let promises = [
utage.parseMissionFile(`${utage.rootDirectory}XDUData/${newMission.Path.replace('Asset/', '').replace('.utage', '').replace('.tsv', '_t.tsv')}`),
utage.loadMissionTranslation(`${utage.rootDirectory}Js/Translations/Missions/${currentMission.Path.replace('Asset/Utage/', '').replace('Scenario/', '').replace('.utage', '').replace('.tsv', `_translations_${selectedLang}.json`)}`)
];
let promises = [];
if(newMission.IsCustom) {
promises.push(utage.parseMissionFile(`${utage.rootDirectory}CustomData/${newMission.Path.replace('Asset/', '').replace('.utage', '').replace('.tsv', '_t.tsv')}`));
} else {
promises.push(utage.parseMissionFile(`${utage.rootDirectory}XDUData/${newMission.Path.replace('Asset/', '').replace('.utage', '').replace('.tsv', '_t.tsv')}`));
}
promises.push(utage.loadMissionTranslation(`${utage.rootDirectory}Js/Translations/Missions/${currentMission.Path.replace('Asset/Utage/', '').replace('Scenario/', '').replace('.utage', '').replace('.tsv', `_translations_${selectedLang}.json`)}`))
closeMissionModal(undefined, true);
Promise.all(promises)
.then((success) => {
@ -296,7 +301,9 @@ function languageChanged(event) {
}
utage.setTranslationLanguage(selectedLang, missionPath)
.then((success) => {
document.getElementById('text-container').className = selectedLang;
buildMissionSelectList();
localStorage.setItem('language', selectedLang);
});
}

查看文件

@ -55,6 +55,17 @@ class Player {
try {
let c = utage.currentPlayingFile[i];
if(c.comment) { continue; }
//They use this to set the sprite set for a charater but have an alternate name displayed
if(c.Arg2 && c.Arg2.toLowerCase().includes("<character=")) {
try {
let reg = /<Character=.*?>/i;
let match = c.Arg2.match(reg);
c.Arg2 = c.Arg2.replace(reg, "");
c.Character = match[0].match(/<Character=(.*?)>/i)[1];
} catch (error) {
console.log(error);
}
}
let command = c.Command ? c.Command.toLowerCase() : '';
switch(command) {
//BG images
@ -75,24 +86,25 @@ class Player {
if(Arg2 === 'Off>') {
Arg2 = '<Off>'
}
if(c.Arg1 && this.utage.characterInfo[c.Arg1] && !Arg2) {
let charToLoad = c.Character || c.Arg1;
if(charToLoad && this.utage.characterInfo[charToLoad] && !Arg2) {
Arg2 = this.defaultCharPattern;
}
//I know the nesting here isint pretty
//If the character at arg1|arg2 exists and arg2 is not <off>
if(this.utage.characterInfo[c.Arg1] && this.utage.characterInfo[c.Arg1][Arg2] && Arg2 && Arg2 != "<Off>") {
if(!this.loader.resources[`char|${c.Arg1}|${Arg2}`]) {
this.loader.add(`char|${c.Arg1}|${Arg2}`, this.utage.characterInfo[c.Arg1][Arg2].FileName);
if(this.utage.characterInfo[charToLoad] && this.utage.characterInfo[charToLoad][Arg2] && Arg2 && Arg2 != "<Off>") {
if(!this.loader.resources[`char|${charToLoad}|${Arg2}`]) {
this.loader.add(`char|${charToLoad}|${Arg2}`, this.utage.characterInfo[charToLoad][Arg2].FileName);
}
//If the character at arg1|arg2 isint here check at arg1|none. If not there put error in console.
} else if(c.Arg1 && Arg2 && Arg2 != "<Off>" &&
(!this.utage.characterInfo[c.Arg1] || !this.utage.characterInfo[c.Arg1][Arg2])) {
if(this.utage.characterInfo[c.Arg1] && this.utage.characterInfo[c.Arg1]['none']) {
if(!this.loader.resources[`char|${c.Arg1}|none`]) {
this.loader.add(`char|${c.Arg1}|none`, this.utage.characterInfo[c.Arg1]['none'].FileName);
} else if(charToLoad && Arg2 && Arg2 != "<Off>" &&
(!this.utage.characterInfo[charToLoad] || !this.utage.characterInfo[charToLoad][Arg2])) {
if(this.utage.characterInfo[charToLoad] && this.utage.characterInfo[charToLoad]['none']) {
if(!this.loader.resources[`char|${charToLoad}|none`]) {
this.loader.add(`char|${charToLoad}|none`, this.utage.characterInfo[charToLoad]['none'].FileName);
}
} else {
console.log(`Failed to get Character: ${c.Arg1}|${Arg2}`);
console.log(`Failed to get Character: ${charToLoad}|${Arg2}`);
}
}
//These voices arent in the Sound.tsv because fuck you
@ -224,9 +236,25 @@ class Player {
//this isint in the texture file.
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}XDUData/Sample/Texture/BG/bg_title.jpg`);
break;
case "scenetitle13":
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}XDUData/Sample/Texture/BG/event0010.png`);
case "scenetitlebridal":
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}CustomData/Sample/Texture/BG/eventbridal.png`);
break;
case "scenetitle13":
this.loader.add('bg|titlecard', `${this.utage.rootDirectory}XDUData/Sample/Texture/BG/event0001.png`);
break;
case "loopeffect01": {
switch(c.Arg1) {
case "underwater01": {
if(!toLoadSe['se_斬撃音_単体']) {
toLoadSe['se_斬撃音_単体'] = this.utage.soundInfo['se_斬撃音_単体'];
}
if(!this.loader.resources['bg|underwater01']) {
this.loader.add('bg|underwater01', `${this.utage.rootDirectory}CustomData/Sample/Texture/BG/bg_underwater01.jpg`);
}
break;
}
}
}
case "attachit02":
case "attachit03":
if(this.utage.soundInfo['se_打撃音']) {
@ -306,6 +334,7 @@ class Player {
for(let l of Object.keys(this.utage.layerInfo)) {
layersToAdd.push(this.utage.layerInfo[l]);
}
layersToAdd.push({LayerName: "bg|loopeffect", Type: "Bg", X: 0, Y: 0, Order: 1})
layersToAdd.sort(compare);
let parentContainer = new PIXI.Container();
parentContainer.position.set(this.center.x, this.center.y);
@ -761,6 +790,27 @@ class Player {
this.processShake(delta, cur);
break;
}
case "loopeffect01": {
let container = this.layers["bg|loopeffect"].container;
switch((cur.Arg1 || "").toLowerCase()) {
case "underwater01": {
this.audio.playSound("se_斬撃音_単体", "Se");
let sprite = new PIXI.Sprite(this.loader.resources['bg|underwater01'].texture);
sprite.scale.set(1.30273438, 1.30273438);
sprite.anchor.set(0.5, 0.5);
sprite.alpha = 0;
container.addChild(sprite);
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: 1000, finalV: 1, initV: 0});
}
}
container.visible = true;
break;
}
case "divaclearloopdecorate": {
let container = this.layers["bg|loopeffect"].container;
this.lerpTargets.push({type: 'alpha', object: container.children[0], curTime: 0, time: 1000, finalV: 0, initV: 1, post: "destroy"});
break;
}
default:
this.processCommandOther(delta);
break;
@ -992,7 +1042,8 @@ class Player {
//special is used if the command actually has a command param such as Henshin since normal text commands dont.
//ignoreCurrent is used for if you are remvoing a current character yourself and don't want this to add another fade out to it such as somethingnew_appearance01.
checkPutCharacterScreen(cur, special = false, ignoreCurrent = false,) {
if((!cur.Command || special) && cur.Arg1 && this.utage.characterInfo[cur.Arg1]) {
let charToLoad = cur.Character || cur.Arg1;
if((!cur.Command || special) && charToLoad && this.utage.characterInfo[charToLoad]) {
let lay = undefined;
let curChar = undefined; //The character that is currently on screen with the same name as Arg1.
let prevChar = undefined; //The character that is already on the layer we are trying to put the new char on.
@ -1000,7 +1051,7 @@ class Player {
if(!ignoreCurrent) {
for(let c of Object.keys(this.currentCharacters)) {
if(!this.currentCharacters[c]) { continue; }
if(this.currentCharacters[c].charName === cur.Arg1) {
if(this.currentCharacters[c].charName === charToLoad) {
curChar = this.currentCharacters[c];
lay = this.currentCharacters[c].layer;
if(!cur.Arg3) {
@ -1016,11 +1067,11 @@ class Player {
} else if (!cur.Arg2 && curChar) {
cur.Arg2 = curChar.character.Pattern;
}
let chr = this.utage.characterInfo[cur.Arg1][cur.Arg2];
let chr = this.utage.characterInfo[charToLoad][cur.Arg2];
if(!chr) {
//Non character sprites don't have a pattern and just use none as a key so if we don't find a character at arg1|arg2 look for this.
cur.Arg2 = 'none';
chr = this.utage.characterInfo[cur.Arg1][cur.Arg2];
chr = this.utage.characterInfo[charToLoad][cur.Arg2];
}
//If we didn't find the character at all just abandon.
if(!chr) { return; }
@ -1048,19 +1099,19 @@ class Player {
this.currentCharacters[curChar.layer.info.LayerName] = undefined;
}
//If this character is already here and not changing patterns don't change anything.
else if(curChar && curChar.charName === cur.Arg1 && curChar.character.Pattern === cur.Arg2) {
else if(curChar && curChar.charName === charToLoad && curChar.character.Pattern === cur.Arg2) {
return;
}
if(!ignoreCurrent) {
//If the layer already has a different character on it remove it.
if(prevChar && (prevChar.charName !== cur.Arg1 || prevChar.character.Pattern !== chr.Pattern)) {
if(prevChar && (prevChar.charName !== charToLoad || prevChar.character.Pattern !== chr.Pattern)) {
this.lerpTargets.push({type: 'alpha', object: prevChar.sprite, curTime: 0, time: 200, finalV: 0, initV: 1, post: "destroy" });
this.currentCharacters[cur.Arg3] = undefined;
}
}
let sprite = new PIXI.Sprite(this.loader.resources[`char|${cur.Arg1}|${cur.Arg2}`].texture);
let sprite = new PIXI.Sprite(this.loader.resources[`char|${charToLoad}|${cur.Arg2}`].texture);
sprite.scale.set(Number(chr.Scale), Number(chr.Scale));
let anchor = commonFunctions.getAnchorFromCharPivot(chr.Pivot);
sprite.anchor.set(anchor.x, anchor.y);
@ -1088,7 +1139,7 @@ class Player {
//Im halving this because their fades take too fucking long and looks bad.
fadeTime = (Number(cur.Arg6) * 1000) / 2;
}
this.currentCharacters[cur.Arg3] = { layer: lay, character: chr, charName: cur.Arg1, sprite: sprite };
this.currentCharacters[cur.Arg3] = { layer: lay, character: chr, charName: charToLoad, sprite: sprite };
if(fadeTime > 0) {
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: fadeTime, finalV: 1, initV: 0 });
} else {
@ -1159,8 +1210,13 @@ class Player {
//future note: This might be better to just look for the character in character info if this start failing.
for(let c of Object.keys(this.currentCharacters)) {
if(!this.currentCharacters[c]) { continue; }
if(this.currentCharacters[c].charName === cur.Arg1) {
this.text.characterName(true, utage.charTranslations[this.currentCharacters[c].character.NameText] || this.currentCharacters[c].character.NameText);
if(this.currentCharacters[c].charName === cur.Arg1 || this.currentCharacters[c].charName === cur.Character) {
let nameToUse = this.currentCharacters[c].character.NameText;
//If cur.Character is set that means the line had a <character= included so we want to use the name from arg1 instead.
if(cur.Character) {
nameToUse = cur.Arg1;
}
this.text.characterName(true, utage.charTranslations[nameToUse] || nameToUse);
this.text.dialogText(true, text);
this.currentCharacters[c].sprite.tint = 0xFFFFFF;
found = true;

@ -1 +1 @@
Subproject commit 5b7839ae9b5e47b5bd29d64c06c22a3b000d8959
Subproject commit fe1fa06db3afc7fd1a8f967adf6e105cd26fc963

查看文件

@ -20,23 +20,26 @@ class UtageInfo {
this.bgmLoopData = {};
}
loadUtageSettings(resolve, reject) {
loadUtageSettings() {
return new Promise((resolve, reject) => {
let promises = [
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduMissions.json`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Character.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Layer.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Localize.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Param.tsv`),
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduMissions.json`), //0
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Character.tsv`), //1
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Layer.tsv`), //2
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Localize.tsv`), //3
//commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Param.tsv`),
//commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Scenario.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`),
commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`),
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduMissionsCustom.json`),
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Sound.tsv`), //4
commonFunctions.getFileText(`${this.rootDirectory}XDUData/Utage/Diva/Settings/Texture.tsv`), //5
commonFunctions.getFileJson(`${this.rootDirectory}Js/BgmLoop.json`), //6
commonFunctions.getFileJson(`${this.rootDirectory}Js/Translations/XduMissionsCustom.json`), //7
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomCharacter.tsv`), //8
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomSound.tsv`), //9
commonFunctions.getFileText(`${this.rootDirectory}CustomData/Utage/Diva/Settings/CustomTexture.tsv`), //10
];
Promise.all(promises)
.then((success) => {
this.groupMissions(success[0], success[8]);
this.groupMissions(success[0], success[7]);
this.missionsList = Object.keys(this.groupedMissions).map((k) => {
return {Name: this.groupedMissions[k].Name, MstId: this.groupedMissions[k].MstId};
});
@ -44,10 +47,13 @@ class UtageInfo {
this.parseCharacterInfo(success[1]);
this.parseLayerInfo(success[2]);
this.parseLocalizeInfo(success[3]);
this.parseParamInfo(success[4]);
this.parseSoundInfo(success[5]);
this.parseTextureInfo(success[6]);
this.bgmLoopData = success[7];
//this.parseParamInfo(success[4]);
this.parseSoundInfo(success[4]);
this.parseTextureInfo(success[5]);
this.bgmLoopData = success[6];
this.parseCharacterInfo(success[8], true);
this.parseSoundInfo(success[9], true);
this.parseTextureInfo(success[10], true);
resolve();
}, (failure) => {
reject(failure);
@ -99,16 +105,18 @@ class UtageInfo {
}
for(let key of Object.keys(customMissions)) {
let mis = customMissions[key];
mis.IsCustom = true;
if(!this.groupedMissions[mis.MstId]) {
this.groupedMissions[mis.MstId] = {
IsCustom: true,
Name: mis.Name,
SummaryText: mis.SummaryText,
MstId: mis.MstId,
Missions: {}
}
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path, Enabled: mis.Enabled };
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path, Enabled: mis.Enabled, IsCustom: true };
} else {
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path, Enabled: mis.Enabled };
this.groupedMissions[mis.MstId].Missions[mis.Id] = { Id: mis.Id, Path: mis.Path, Enabled: mis.Enabled, IsCustom: true };
}
}
}
@ -202,7 +210,7 @@ class UtageInfo {
}
//http://madnesslabo.net/utage/?page_id=4521&lang=en
parseCharacterInfo(text) {
parseCharacterInfo(text, custom = false) {
let lines = text.split("\n");
let headers = [];
let lastCharName = '';
@ -227,10 +235,10 @@ class UtageInfo {
}
if(read.FileName) {
if(!read.FileName.startsWith('file://')) {
read.FileName = `${this.rootDirectory}XDUData/Sample/Texture/Character/${read.FileName}`;
read.FileName = `${this.rootDirectory}${(custom ? "CustomData" : "XDUData")}/Sample/Texture/Character/${read.FileName}`;
} else {
read.FileName = read.FileName.replace('file://', '');
read.FileName = `${this.rootDirectory}XDUData/${read.FileName}`;
read.FileName = `${this.rootDirectory}${(custom ? "CustomData" : "XDUData")}/${read.FileName}`;
}
}
if(!this.characterInfo[lastCharName]) {
@ -294,7 +302,7 @@ class UtageInfo {
}
//http://madnesslabo.net/utage/?page_id=4519&lang=en
parseSoundInfo(text) {
parseSoundInfo(text, custom = false) {
let lines = text.split("\n");
let headers = [];
for(let i = 0; i < lines.length; ++i) {
@ -315,10 +323,10 @@ class UtageInfo {
let s = read.FileName.split(',');
read.FileName = `${s[0].split('_').join('/')}/${s[1]}`;
}
read.FileName = `${this.rootDirectory}XDUData/Se/${read.FileName}`;
read.FileName = `${this.rootDirectory}${(custom ? "CustomData" : "XDUData")}/Se/${read.FileName}`;
break;
case 'bgm':
read.FileName = `${this.rootDirectory}XDUData/Bgm/${read.FileName}`;
read.FileName = `${this.rootDirectory}${(custom ? "CustomData" : "XDUData")}/Bgm/${read.FileName}`;
break;
}
}
@ -329,7 +337,7 @@ class UtageInfo {
}
//http://madnesslabo.net/utage/?page_id=4520&lang=en
parseTextureInfo(text) {
parseTextureInfo(text, custom = false) {
let lines = text.split("\n");
let headers = [];
for(let i = 0; i < lines.length; ++i) {
@ -340,10 +348,10 @@ class UtageInfo {
let read = commonFunctions.readLine(line, headers);
if(read && read.Label) {
if(!read.FileName.startsWith("file://")) {
read.FileName = `${this.rootDirectory}XDUData/Sample/Texture/BG/${read.FileName}`;
read.FileName = `${this.rootDirectory}${(custom ? "CustomData" : "XDUData")}/Sample/Texture/BG/${read.FileName}`;
} else {
read.FileName = read.FileName.replace("file://", '');
read.FileName = `${this.rootDirectory}XDUData/${read.FileName}`;
read.FileName = `${this.rootDirectory}${(custom ? "CustomData" : "XDUData")}/${read.FileName}`;
}
this.textureInfo[read.Label] = read;
}

查看文件

@ -1,7 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<meta name="theme-color" content="#393939"/>
<title id="title-tag"></title>
<link rel="stylesheet" type="text/css" href="Css/generic.min.css">
<link rel="stylesheet" type="text/css" href="Css/main.min.css">

查看文件

@ -53,7 +53,8 @@ gulp.task('dist', gulp.series(
buildJson,
buildJsonTranslations,
copyHtml,
copyImages
copyImages,
copyCustomData
),
)
);
@ -111,6 +112,11 @@ function copyImages() {
.pipe(gulp.dest('Dist/Images'));
}
function copyCustomData() {
return gulp.src('CustomData/**')
.pipe(gulp.dest('Dist/CustomData'));
}
function buildJson() {
return gulp.src(jsonFiles)
.pipe(jsonmin())