Added final features for this release. Now only polishing (if needed) remains.
Features: Sacrifice-Node, Maintain-Node, Options for screen type, lightcolor and soundvolume, tied in sound effects, game pause when menu is open, visibly open up gate when opening it.
This commit is contained in:
@@ -62,6 +62,25 @@ public class FileHandler
|
||||
return file.GetAsText();
|
||||
}
|
||||
|
||||
public static bool DeleteProgram(string name)
|
||||
{
|
||||
CreateScriptDirectory();
|
||||
string path = GetProgramPath(name);
|
||||
|
||||
if (!FileAccess.FileExists(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DirAccess dir = DirAccess.Open(ScriptDirectory);
|
||||
if (dir == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return dir.Remove($"{name}{ScriptExtension}") == Error.Ok;
|
||||
}
|
||||
|
||||
private static string GetProgramPath(string filename)
|
||||
{
|
||||
return $"{ScriptDirectory}/{filename}{ScriptExtension}";
|
||||
|
||||
Reference in New Issue
Block a user