- Remove question sorting on loading the Trivia plugin, since it is no
longer required
- Trivia game winners are chosen based on who answers first, not who
signs up first
- The Artist of the Day is no longer always the first artist to be
submitted
- Replace instances of foo > -1 with foo >= 0
Letting users that can't talk use the more important commands is fine
and all, until they find a way to spam with them.
- Remove redundant this.canBroadcast call in /aotd
- The response after changing the Quote of the Day uses the proper
broadcast style
- /aotd viewnoms sorts the prenomination list
- /trivia qs acknowledges that Video Games is a category
- Change suggestions to use the deprecated /trivia help command to /help
trivia
- Add style fixes used in the Trivia to the The Happy Place and The Studio
plugins
Binary searches are now used instead of linear ones when splicing
questions in and slicing all the questions in a category from the
questions arrays. Stalemates are now handled after scoring answers
instead of just before asking a question.
- the ladder is now saved in triviadata.json, and gets updated at the
same time ranks do instead of needing to loop through the leaderboard
once more
- Trivia.inactivityCounter clears properly on answer
- number and timer modes accept multiple answers again
- added question and intermission timeout consts
- Trivia property names are more specific
- /trivia rank now shows the user's rank for each of the three score
types
- Add /trivia ladder
- Fix crash in timer mode scoring
- Fix /trivia submit excluding all but the first answer in certain cases
- Fix /trivia accept and reject
- Consistent object notation
- participants are now stored in a map
- part of the score calculations are now handled on answer, rather than
all of them being done when the answering period ends
- the responders object has been removed in favour of storing more
information in participants
- /trivia qs with no argument returns question statistics
- some slight optimizations in the question commands
- /trivia help is now less verbose
- the code is now much more legible
Export triviaData, writeTriviaData, and trivia to a cache in the Trivia and
Question Workshop room objects, if they exist, and if they have already been
exported (i.e. /hotpatch chat reloaded the plugin), reassign their cached
values so games are no longer broken.
...over using an unreliable singleton to handle them.
Export triviaData to CommandParser imstead of the trivia room when the
first Trivia instance is created.
...which would've ruined participants' leaderboard rankings, stop
binding the Trivia object's context to timeouts now that they're no
longer needed, make question database commands exclusive to Question
Workshop
Fix number and timer modes' question timeouts looping until no questions
are left, refactor Trivia object to only make methods the commands use
public, optimize /triviaaccept and /triviareject
Stop the Q/A loop from clearing timeouts constantly so games can be
ended in case it still loops endlessly, refactor game commands and
config vars, minor bug fixes in /triviasubmit and /triviastatus
This whole time I thought negative values were falsey. At least I caught it before it could crash anything again.
Also fix /triviarank picking up the wrong alt's rank
Timer mode now gives points to all who answer within the time limit
instead of the first, and /ta works more straightforwardly. sleep should
no longer cause the Q/A loop to ignore any commands until it runs out of
questions.
Fix scores broken from commit 6d7a3cf333,
remove unused curQ variable, remove unused parameters in the
commands, and lower the rank required to edit questions to %.
Fix bug in the question/answer loop that would assign undefined to
either curQ, curA, or phase, preventing anyone from answering any
questions until this.curQs was empty, by changing all of the game
variables from global variables to Trivia properties. Created a
constructor for Trivia so its methods could be kept in its prototype
object to reduce property lookup times and later to allow me to refactor
parts of the commands that deal with these properties as prototype
methods.
Fix room.addRaw not updating chat.