mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 05:57:32 -07:00
Better sfx
This commit is contained in:
parent
7002e829d1
commit
092a61e6a6
9 changed files with 32 additions and 10 deletions
|
@ -431,6 +431,7 @@ volume: "音量"
|
|||
|
||||
_sfx:
|
||||
note: "ノート"
|
||||
noteMy: "ノート(自分)"
|
||||
notification: "通知"
|
||||
chat: "チャット"
|
||||
chatBg: "チャット(バックグラウンド)"
|
||||
|
|
BIN
src/client/assets/sounds/syuilo/down.mp3
(Stored with Git LFS)
Normal file
BIN
src/client/assets/sounds/syuilo/down.mp3
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/pope1.mp3
(Stored with Git LFS)
BIN
src/client/assets/sounds/syuilo/pope1.mp3
(Stored with Git LFS)
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/pope2.mp3
(Stored with Git LFS)
BIN
src/client/assets/sounds/syuilo/pope2.mp3
(Stored with Git LFS)
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/up.mp3
(Stored with Git LFS)
Normal file
BIN
src/client/assets/sounds/syuilo/up.mp3
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/waon.mp3
(Stored with Git LFS)
BIN
src/client/assets/sounds/syuilo/waon.mp3
(Stored with Git LFS)
Binary file not shown.
|
@ -53,7 +53,9 @@ export default Vue.extend({
|
|||
(this.$refs.tl as any).prepend(note);
|
||||
|
||||
if (this.sound) {
|
||||
const audio = new Audio(`/assets/sounds/${this.$store.state.device.sfxNote}.mp3`);
|
||||
const audio = new Audio(note.userId === this.$store.state.i.id
|
||||
? `/assets/sounds/${this.$store.state.device.sfxNoteMy}.mp3`
|
||||
: `/assets/sounds/${this.$store.state.device.sfxNote}.mp3`);
|
||||
audio.volume = this.$store.state.device.sfxVolume;
|
||||
audio.play();
|
||||
}
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxNote)" v-if="sfxNote"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxNoteMy">
|
||||
<template #label>{{ $t('_sfx.noteMy') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxNoteMy)" v-if="sfxNoteMy"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxNotification">
|
||||
<template #label>{{ $t('_sfx.notification') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
|
@ -87,6 +92,8 @@ import { langs } from '../../config';
|
|||
|
||||
const sounds = [
|
||||
null,
|
||||
'syuilo/up',
|
||||
'syuilo/down',
|
||||
'syuilo/pope1',
|
||||
'syuilo/pope2',
|
||||
'syuilo/waon',
|
||||
|
@ -170,6 +177,11 @@ export default Vue.extend({
|
|||
set(value) { this.$store.commit('device/set', { key: 'sfxNote', value }); }
|
||||
},
|
||||
|
||||
sfxNoteMy: {
|
||||
get() { return this.$store.state.device.sfxNoteMy; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxNoteMy', value }); }
|
||||
},
|
||||
|
||||
sfxNotification: {
|
||||
get() { return this.$store.state.device.sfxNotification; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxNotification', value }); }
|
||||
|
|
|
@ -42,10 +42,11 @@ const defaultDeviceSettings = {
|
|||
showFixedPostForm: false,
|
||||
useNotificationsPopup: true,
|
||||
sfxVolume: 0.3,
|
||||
sfxNote: 'syuilo/pope1',
|
||||
sfxNote: 'syuilo/down',
|
||||
sfxNoteMy: 'syuilo/up',
|
||||
sfxNotification: 'syuilo/pope2',
|
||||
sfxChat: 'syuilo/waon',
|
||||
sfxChatBg: null,
|
||||
sfxChat: 'syuilo/pope1',
|
||||
sfxChatBg: 'syuilo/waon',
|
||||
userData: {},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue