Skip to content

Commit

Permalink
FFNx: Add support for the new ambient layer
Browse files Browse the repository at this point in the history
  • Loading branch information
julianxhokaxhiu committed Feb 8, 2021
1 parent 76ff263 commit ed64e04
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 7thHeaven.Code/ConfigSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ private void OverrideKnownInternals()
_toml["external_music_ext"] = "ogg";
_toml["external_voice_path"] = "voice";
_toml["external_voice_ext"] = "ogg";
_toml["external_ambient_path"] = "ambient";
_toml["external_ambient_ext"] = "ogg";
_toml["ffmpeg_video_ext"] = "avi";
_toml["mod_path"] = "mods/Textures";
_toml["direct_mode_path"] = "direct";
Expand Down
1 change: 1 addition & 0 deletions 7thHeaven.Code/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public static Settings UseDefaultSettings()
defaultSettings.ExtraFolders.Add("music");
defaultSettings.ExtraFolders.Add("sfx");
defaultSettings.ExtraFolders.Add("voice");
defaultSettings.ExtraFolders.Add("ambient");

defaultSettings.FFNxUpdateChannel = FFNxUpdateChannelOptions.Stable;

Expand Down
1 change: 1 addition & 0 deletions SeventhHeavenUI/Classes/GameConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ public void CreateMissingDirectories()
Path.Combine(InstallPath, "sfx"),
Path.Combine(InstallPath, "shaders"),
Path.Combine(InstallPath, "voice"),
Path.Combine(InstallPath, "ambient"),
};

foreach (string dir in requiredFolders)
Expand Down
7 changes: 6 additions & 1 deletion SeventhHeavenUI/ViewModels/GeneralSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ internal bool SaveSettings()
Sys.Settings.Subscriptions = GetUpdatedSubscriptions();
Sys.Settings.ExtraFolders = ExtraFolderList.Distinct().ToList();

// ensure 'direct', 'music', 'sfx' and 'voice' folders are always in ExtraFolders list
// ensure required folders are always in ExtraFolders list
if (!Sys.Settings.ExtraFolders.Contains("direct", StringComparer.InvariantCultureIgnoreCase))
{
Sys.Settings.ExtraFolders.Add("direct");
Expand All @@ -532,6 +532,11 @@ internal bool SaveSettings()
Sys.Settings.ExtraFolders.Add("voice");
}

if (!Sys.Settings.ExtraFolders.Contains("ambient", StringComparer.InvariantCultureIgnoreCase))
{
Sys.Settings.ExtraFolders.Add("ambient");
}

Sys.Settings.FF7Exe = FF7ExePathInput;
Sys.Settings.LibraryLocation = LibraryPathInput;
Sys.Settings.MovieFolder = MoviesPathInput;
Expand Down

0 comments on commit ed64e04

Please sign in to comment.