public static void Resolve <T>(command cmd, List <T> list) { Log("Which do you mean: "); foreach (var elem in list) { Log("- " + elem, Formats.Command); } Pathways.gameState = GameStates.Term; }
public static void Stow(command cmd) { if (holdall.Count == 0) { Terminal.Log("You have nothing to stow!", Formats.Command); return; } var temp = new List <invt::IWearable>(); if ((new Regex(@"\b(all)\b")).IsMatch(cmd.input)) { Player.Stow(); } else { foreach (var item in holdall) { if (item is invt::IWearable && item.desc.IsSynonymousWith(cmd.input)) { temp.Add((invt::IWearable)item); } } } if (temp.Count == 1) { Player.Stow(temp[0]); } else if (temp.Count != 0) { Terminal.Resolve(cmd, temp); } else { Terminal.Log("You don't have anything you can stow.", Formats.Command); } }
public static void Read(command cmd) { }
public static void View(command cmd) { Terminal.Log(" > " + cmd.input + ": You examine the thing.", Formats.Command); }
public static void Quit(command cmd) { Terminal.Alert("Quit Pathways into Darkness?", Formats.Alert); }
public static void Redo(command cmd) { intf::Parser.eval(cmd.input); }
public static void Sudo(command cmd) { }
} /*(s) => (s.Length>100)?(s.Substring(0,100)+"…"):(s); */ public static void Help(command cmd) { Terminal.Display((intf::Message)yaml.data["help"]); }
public static void Load(command cmd) { Terminal.Log("I/O Disabled."); }