33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
// Clear Audio Storage Script - Reset all audio data to start fresh
|
|
|
|
console.log('🧹 Clearing all audio storage data...');
|
|
|
|
// Clear all audio-related storage
|
|
if (window.game && window.game.dataManager) {
|
|
console.log('🗑️ Clearing customAudio storage...');
|
|
window.game.dataManager.set('customAudio', { background: [], ambient: [] });
|
|
|
|
console.log('🗑️ Clearing audio library cache...');
|
|
if (window.game.audioManager) {
|
|
window.game.audioManager.audioLibrary = {
|
|
background: { general: [] }
|
|
};
|
|
}
|
|
|
|
console.log('🔄 Refreshing audio library...');
|
|
if (window.game.audioManager) {
|
|
window.game.audioManager.refreshAudioLibrary().then(() => {
|
|
console.log('✅ Audio library refreshed');
|
|
|
|
// Refresh the UI
|
|
if (window.game.loadAudioGallery) {
|
|
window.game.loadAudioGallery();
|
|
console.log('✅ Audio gallery refreshed');
|
|
}
|
|
});
|
|
}
|
|
|
|
console.log('✅ All audio storage cleared successfully');
|
|
} else {
|
|
console.error('❌ Game or dataManager not available');
|
|
} |