1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-10 15:20:29 +01:00

Added check for ini file

This commit is contained in:
Rich Dunne 2021-07-24 07:34:59 -06:00
parent 3f8f47e414
commit 58ab73c70e

View file

@ -2,10 +2,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace SceneManager.Utils
{
@ -13,7 +10,7 @@ namespace SceneManager.Utils
{
internal static bool DependenciesInstalled()
{
if (!InputManagerChecker() || !CheckRNUIVersion())
if (!InputManagerChecker() || !CheckRNUIVersion() || !IniFilePresent())
{
return false;
}
@ -59,5 +56,16 @@ namespace SceneManager.Utils
}
return true;
}
private static bool IniFilePresent()
{
var exists = File.Exists("Plugins/SceneManager.ini");
if (!exists)
{
Game.LogTrivial($"SceneManager.ini was not found in the Plugins folder.");
Game.DisplayNotification($"~o~Scene Manager ~r~[Error]\n~w~SceneManager.ini was not found in your Plugins folder. Please install SceneManager.ini and try again.");
}
return exists;
}
}
}