sm64coopdx/tools/copy_mario_sounds.py
Agent X 49bca1cc01 sm64coopdx
Co-Authored-By: Yuyake <140215214+AngelicMiracles@users.noreply.github.com>
Co-Authored-By: FluffaMario <50761036+FluffaMario@users.noreply.github.com>
Co-Authored-By: Gregory Heskett <gheskett@gmail.com>
Co-Authored-By: iZePlayzYT <69536095+iZePlayzYT@users.noreply.github.com>
Co-Authored-By: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com>
Co-Authored-By: eros71 <16540103+eros71-dev@users.noreply.github.com>
2023-10-30 01:03:36 -04:00

36 lines
1 KiB
Python

#!/usr/bin/env python3
import os
copy_directories = {
'sound/samples/sfx_mario/': [
'sound/samples/sfx_custom_luigi/',
'sound/samples/sfx_custom_wario/',
'sound/samples/sfx_custom_toad',
],
'sound/samples/sfx_mario_peach/': [
'sound/samples/sfx_custom_luigi_peach/',
'sound/samples/sfx_custom_wario_peach/',
'sound/samples/sfx_custom_toad_peach',
],
}
def copy_dir(source, destinations):
for filename in os.listdir(source):
if not filename.endswith('.aiff'):
continue
src = source + filename
shortened_name = filename.split('_')[0] + '.aiff'
for destination in destinations:
dst = destination + shortened_name
if os.path.exists(dst):
continue
print('Copying mario sounds to character sounds: ' + src + ' -> ' + dst)
os.system('cp ' + src + ' ' + dst)
def main():
for source in copy_directories:
copy_dir(source, copy_directories[source])
if __name__ == "__main__":
main()