[Rules] Add World:MaximumQuestErrors Rule (#3349)

* [Rules] Add World:MaximumQuestErrors Rule

# Notes
- Allows operators to display more than 30 errors with #questerrors if they want.

* Update quest_interface.h
This commit is contained in:
Alex King
2023-05-21 18:48:30 -04:00
committed by GitHub
parent 21755a9f9e
commit f0152cef66
3 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -11,8 +11,15 @@ void command_questerrors(Client *c, const Seperator *sep)
int error_index = 0;
for (auto quest_error : quest_errors) {
if (error_index >= 30) {
c->Message(Chat::White, "Maximum of 30 errors shown.");
if (error_index >= RuleI(World, MaximumQuestErrors)) {
c->Message(
Chat::White,
fmt::format(
"Maximum of {} error{} shown.",
RuleI(World, MaximumQuestErrors),
RuleI(World, MaximumQuestErrors) != 1 ? "s" : ""
).c_str()
);
break;
}