public void RunCommand(string command, ICommandSender sender) { try { ICommand commandObj = Parser.Parse(command, sender); commandObj.Execute(); } catch (CommandNotFoundException) { sender.SendLine("Invalid command."); } catch (UsageException) { sender.SendLine("Invalid usage."); } catch (InsufficientPermissionException) { sender.SendLine("Invalid permissions."); } }
public void Examine(ICommandSender examiner) { examiner.SendLine(RantEngine.RunPattern("You are on \\a {0} tile.", Adjective)); }
protected void ExamineBasic(ICommandSender examiner) { examiner.SendLine(this.GetFullName().FirstCharToUpper() + ". " + Gender.ToSymbol()); }
protected void ExamineInjury(ICommandSender examiner) { if (!Alive) { examiner.SendLine(); examiner.SendLine("{0}'s dead.", Pronoun.FirstCharToUpper()); } else if (Hp < Attributes.MaxHp / 2) { examiner.SendLine(); examiner.SendLine("{0} looks injured.", Pronoun.FirstCharToUpper()); } }
public void Examine(ICommandSender examiner) { examiner.SendLine("[{0}]: {1}", Identifier, Description); }
public override void Examine(ICommandSender examiner) { ExamineBasic(examiner); examiner.SendLine("Level {0} {1}.", Level, Race.Name); ExamineInjury(examiner); }
public void Examine(ICommandSender examiner) { examiner.SendLine(Description); }