-- This section mounts sounds from the mods directory to allow mods to add custom sounds to the game
function mount_mod_sounds(MODFOLDER)
-- searching for mods inside the modfolder
for _,mod in io.dir( MODFOLDER..'\\*.*') do
-- do we have a true directory ?
if mod != '.' and mod != '..' then
-- searching for sounds inside mod folder
for _,folder in io.dir(MODFOLDER..'\\'..mod..'\\*.*') do
-- if we found a folder named sounds then mount it
if folder == 'sounds' then
LOG('Found mod sounds in: '..mod)
mount_dir(MODFOLDER..'\\'..mod..'\\sounds', '/sounds')
break
end
end
end
end
end
mount_mod_sounds(SHGetFolderPath('PERSONAL') .. 'My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods')
mount_mod_sounds(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods')
Statistics: Posted by Uveso — 20 May 2018, 22:54
Statistics: Posted by HorizonPulse — 20 May 2018, 21:02