Beispiel #1
0
    /// <summary>
    /// Print out a list of argument
    /// </summary>
    /// <param name="arg">The argument.</param>
    new public void List(string arg)
    {
        CheckString("List", arg);
        if (NoInput)
        {
            return;
        }
        if (arg.ToUpper() == "ALIAS")
        {
            //Make sure that the Player has actually saved an alias
            if (CommandListScript.AliasDictionary.Count != 0)
            {
                //Inform the Player that these are the aliases created
                DialogueScript.GameInformationText(
                    "Here's a list of aliases. ");
                //Iterate through the dictionary and print out each alias alongside the function
                foreach (string s in CommandListScript.AliasDictionary.Keys)
                {
                    string value = CommandListScript.AliasDictionary[s];
                    DialogueScript.MovementText(s + " : " + value);
                }
            }
            else
            {
                DialogueScript.ErrorText("No aliases saved.");
            }
        }

        if (arg.ToUpper() == "COMMANDS")
        {
            StringBuilder builtString = new StringBuilder();
            foreach (var list in CommandListScript.ValidCommandsList)
            {
                foreach (string s in list)
                {
                    builtString.Append(s).Append(" | ");
                }
            }
            foreach (string s in CommandListScript.CommandsList)
            {
                builtString.Append(s).Append(" | ");
            }
            foreach (string s in CommandListScript.CombatCommands)
            {
                builtString.Append(s).Append(" | ");
            }
            InterfaceScript.PlaceText(builtString.ToString(), new Color(0, 255, 200), 15);
        }

        if (string.Equals(arg, "emotes", StringComparison.CurrentCultureIgnoreCase))
        {
            var builtString = new StringBuilder();
            foreach (string s in CommandListScript.EmoteList)
            {
                builtString.Append(s).Append(" - ");
            }
            InterfaceScript.PlaceText(builtString.ToString(), new Color(0, 255, 200), 15);
        }
        if (GameTurnController.CurrentState == GameTurnController.PlayerState.Combat)
        {
            InterfaceScript.ActivateInput();
        }
    }
Beispiel #2
0
 // These five functions will print out text to the GUI.
 //The colour of the text varies based on what information is to be given.
 public void GameInformationText(string text)
 {
     _uScript.PlaceText(text, Color.white);
 }