-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
805095c
commit ed15332
Showing
3 changed files
with
55 additions
and
48 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,60 @@ | ||
// 修改千织语音台词 | ||
console.log('已Hack语音') | ||
const funcBackup = cfg.voice.sound.getGroup | ||
cfg.voice.sound.getGroup = function(soundID) { | ||
const soundGroup = funcBackup.call(this, soundID) | ||
if (soundID === 4) { | ||
const changeMap = { | ||
大厅交互语音1: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音2: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音3: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音4: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音5: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音6: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音7: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音8: { | ||
words: '呱!', | ||
path: 'audio/sound/mallard/quack' | ||
} | ||
let raf = requestAnimationFrame(function autoRun() { | ||
try { | ||
const arrBackup = cfg.voice.sound.groups_ | ||
if (!arrBackup || arrBackup.length === 0) { | ||
throw new Error() | ||
} | ||
const keyArray = Object.keys(changeMap) | ||
Object.entries(soundGroup).forEach(([soundKey, soundObject]) => { | ||
// soundObject.level_limit = 0 | ||
if (keyArray.includes(soundObject.name)) { | ||
soundGroup[soundKey] = { | ||
...soundObject, | ||
...changeMap.soundObject.name | ||
console.log('Hacked语音') | ||
Object.entries(cfg.voice.sound.groups_).forEach(([soundID, soundGroup]) => { | ||
if (soundID == 4) { | ||
const changeMap = { | ||
大厅交互语音1: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音2: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音3: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音4: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音5: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音6: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音7: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
}, | ||
大厅交互语音8: { | ||
words: '嘎!', | ||
path: 'audio/sound/mallard/quack' | ||
} | ||
} | ||
const keyArray = Object.keys(changeMap) | ||
soundGroup.forEach((soundObject, index) => { | ||
// soundObject.level_limit = 0 | ||
if (keyArray.includes(soundObject.name)) { | ||
soundGroup[index] = { | ||
...soundObject, | ||
...changeMap[soundObject.name] | ||
} | ||
} | ||
}) | ||
} | ||
}) | ||
} catch (error) { | ||
raf = requestAnimationFrame(autoRun) | ||
} | ||
return soundGroup | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters