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:
@@ -130,6 +130,8 @@ public partial class CodingWindow : PanelContainer
|
||||
|
||||
public void LoadProgram(int index)
|
||||
{
|
||||
if (index <= 0) return;
|
||||
|
||||
ClearWindow();
|
||||
string scriptContent = FileHandler.LoadProgram(availableScripts.GetItemText(index));
|
||||
string[] nodes = scriptContent.Split(";");
|
||||
@@ -151,6 +153,22 @@ public partial class CodingWindow : PanelContainer
|
||||
availableScripts.Select(0);
|
||||
}
|
||||
|
||||
public void DeleteProgram()
|
||||
{
|
||||
string filename = scriptName.Text;
|
||||
int selectedIndex = availableScripts.GetSelectedId();
|
||||
if (selectedIndex > 0)
|
||||
{
|
||||
filename = availableScripts.GetItemText(selectedIndex);
|
||||
}
|
||||
|
||||
if (filename.Length <= 0) return;
|
||||
if (!FileHandler.DeleteProgram(filename)) return;
|
||||
|
||||
ClearWindow();
|
||||
SetupScriptOptions();
|
||||
}
|
||||
|
||||
public void SaveProgram()
|
||||
{
|
||||
string result = "";
|
||||
|
||||
@@ -89,6 +89,14 @@ public partial class NodeDisplay : PanelContainer
|
||||
result.node = new ElseNode();
|
||||
result.LoadElse(nodeSanitized);
|
||||
break;
|
||||
case "maintain":
|
||||
result.node = new MaintainNode();
|
||||
result.LoadMaintain(nodeSanitized);
|
||||
break;
|
||||
case "sacrifice":
|
||||
result.node = new SacrificeNode();
|
||||
result.LoadSacrifice(nodeSanitized);
|
||||
break;
|
||||
default:
|
||||
result.QueueFree();
|
||||
return null;
|
||||
@@ -99,6 +107,10 @@ public partial class NodeDisplay : PanelContainer
|
||||
|
||||
private void LoadElse(string content) { }
|
||||
|
||||
private void LoadMaintain(string content) { }
|
||||
|
||||
private void LoadSacrifice(string content) { }
|
||||
|
||||
private void LoadIf(string content)
|
||||
{
|
||||
HBoxContainer valueContainer = GetNode<HBoxContainer>("./EditorDisplay/VBoxContainer/Values");
|
||||
|
||||
Reference in New Issue
Block a user