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:
parent
3f8f47e414
commit
58ab73c70e
1 changed files with 12 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue