/** `Quit` : **`Parse`** * * Prompts user through `Terminal` to quit the game. **/ public static bool Quit( adv::Person sender, EventArgs e, Command c, string input) { Terminal.Alert(Pathways.messages["quit"]); return true; }
/** `Load` : **`Parse`** * * Loads a game from a `*.yml` file. Currently broken. **/ public static bool Load( adv::Person sender, EventArgs e, Command c, string input) { Terminal.Clear(); Terminal.LogImmediate( "I/O Disabled, restarting level."); SceneManager.LoadScene(0); return true; }
/** `Save` : **`Parse`** * * Saves a game from a `*.yml` file. Currently broken. **/ public static bool Save( adv::Person sender, EventArgs e, Command c, string input) { if (File.Exists(input)) Terminal.Alert("Overwriting file..."); using (StreamWriter file = new StreamWriter(input)) { file.WriteLine("%YAML 1.1"); file.WriteLine($"--- # Saved Game\n"); file.WriteLine("player:"); var pos = new Vector3(0f,0f,0f); // Player.Position.x, // Player.Position.y, // Player.Position.z); file.WriteLine($" position: {pos}"); //file.WriteLine($" area: {Player.area}"); //file.WriteLine($" room: {Player.Room}"); file.WriteLine(" items:\n"); //foreach (var elem in Player.Items) // file.WriteLine($" - {elem.Name}"); file.WriteLine("\n...\n"); } return true; } /*(s) => (s.Length>100)?(s.Substring(0,100)+"…"):(s); */
/** `Redo` : **`Parse`** * * Runs the prior command issued to the `Parser` again. **/ public static bool Redo( adv::Person sender, EventArgs e, Command c, string input) => true;
public static bool Hide( adv::Person sender, EventArgs e, Command c, string input) => false;
public static bool Pull( adv::Person sender, EventArgs e, Command c, string input) => Player.Current.Pull(Player.Current,e,c,input);
} /*(s) => (s.Length>100)?(s.Substring(0,100)+"…"):(s); */ /** `Help` : **`Parse`** * * Shows the help menu via `Window`. **/ public static bool Help( adv::Person sender, EventArgs e, Command c, string input) { Window.Display(Pathways.messages["help"]); return true; }