Exemple #1
0
 protected override void InnerRespond(string userString)
 {
     if (!string.IsNullOrEmpty(userString))
     {
         string error = NewCharacterPrompt.ValidateCharacterName(userString);
         if (error != null)
         {
             User.sendMessage("That is not a valid name: " + error);
         }
         else
         {
             newChar.Name = userString;
         }
     }
     Cancel();
 }
 protected void SetUpOptions()
 {
     ClearOptions();
     AddOption("Create a new character.", () => { NextPrompt = new NewCharacterPrompt(this); }, "New");
     AddOption("Delete a character.", () => { NextPrompt = new DeleteCharacterPrompt(this); }, "Delete");
     AddOption("Log out to log into another account.", () => { User.LogOut(); Cancel(false); }, "Log");
     AddOption("Disconnect from the MUD.", () => { User.Disconnect(); }, "Disconnect");
     if (User.LoggedInAccount.IsAdmin)
     {
         AddOption("Modify MUD-wide settings", () => { NextPrompt = new AdminSelectModify(this, User, new GlobalValues()); }, "Modify");
     }
     MOB[] characters = User.LoggedInAccount.Characters;
     for (int i = 0; i < characters.Length; i++)
     {
         MOB nextMob = characters[i];
         AddOption(nextMob.Name, () => { NextPrompt = new GameplayPrompt(this.User, nextMob); Cancel(false); });
     }
 }