aboutsummaryrefslogtreecommitdiff
path: root/include/courtroom.h
AgeCommit message (Collapse)Author
2021-01-13Overhaul sound lists to introduce aliases, rethink editing behavior (#389)Crystalwarrior
* Resolve https://github.com/AttorneyOnline/AO2-Client/issues/275 by adding a "Nothing" option to play no SFX even when playing a preanimation that behaves similar to the Default option * Overhaul sound list: * Allow aliases. .ini file syntax is "filename = alias". * Do not allow editing the .ini files from the client anymore. * The sound list dropdown is still editable, but all it does is play your custom sfx without adding it to any files. * Overhaul get_char_sfx * Fix aliases not working properly with a rather tricky solution * save character soundlist in base and drop the character_ from the filename Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-12Make sure blankposts are properly displayed unless repeats, playing nice ↵Crystalwarrior
with view desync
2021-01-12Didn't notice I removed this from the mergening when I resolved merge ↵Crystalwarrior
conflicts, oops
2021-01-12Merge branch 'master' into feature/timerclockCrystalwarrior
# Conflicts: # include/courtroom.h
2021-01-12Desynchronize viewport from the IC chat log so that users have a smooth ↵Crystalwarrior
viewing experience as an option (#385) * Begin trying to understand handle_chatmessage monstrosity Rearrange some functionality to be more consistent with what the particular handle_chatmessage is *supposed* to be responsible for Single responsibility principle doesn't apply not just to script files but even functions in this goddamned program apparently. * Fix some oversights relating to "has presented evidence" logs * Fix an edge case crash with negative evidence, idk why this didn't happen before. * Completely refactor handle_chatmessage hell and split it up into single-responsibility-principle functions like a sane and organized coder would. This will break any PRs that touch handle_chatmessage and will have to conform to the new standard, but it's very good in the long run. Functions have also been meticulously commentated to make sure that everyone can understand at a glance what everything does. This refactor is done to pave way for smooth viewport, making characters no longer randomly interrupt each other when speaking. * Rename confusingly named "handle_chatbox" to "handle_ic_speaking" Add a new function "handle_callwords" * Parse blankposts in the packet unpacking phase log_chatmessage is now an argument-based funciton instead of using m_chatmessage monstrosity Commentate the heck out of log_chatmessage Fix showname displaying logic being bonkers for log entries Fix -1 char_id most likely crashing client, even tho they're supposed to be system messages Fix [CHARID] being referenced instead of [OTHER_CHARID] in the pair display func Fix chat message color being used for "has played a song" even though it shouldn't * Move setting emote_mod from the objection thing to the packet unpacking thing handle_emote_mod has become argumented * Make display_pair_character take in only vars it needs * Add functionality for message stacks (does not handle logging separately yet) Currently segfaults at line 1823 if stacking behavior actually occurs. Plz help I'm poopie brain at this * Make sense of pointers and dereference some pointers to prevent wacky errors Replace _stack with _queue, and turn it into a QQueue * Implement a minimum text delay queue timer so that each msg must stay on screen for a specified amount of time Chat_arrow only shows up when the minimum text delay has expired Check if target is muted in the enqueueing, as well as the validity of the character id, so we don't even bother adding it to the queue Add a settings option to set text stay time (minimum amount of time to pass before displaying the next message). TODO: Handle queued interjections in a cooler way * Adjust default option for stay_time to be 200ms Make the stay_time setting of 0 disable the queue system entirely * Make interjections force-clear the message queue Use interjections to instantly process those messages - objections are usually extremely important and must have everyone's immediate attention. TODO: Add a settings option for interjection behavior * Clear message queue when bg display packet is received * Add an instant objection setting which, when enabled, will interrupt and skip the message queue on objections (effectively bypassing text_delay system) * Stop using AOPacket for the queue and use QStringList instead (packet contents, we don't care for the header) Implement objection threshold which works in a queue if instant objections are disabled (not exposed to the settings yet) Modify packet contents directly instead of waiting for m_chatmessage shenanigans (we should deprecate this soon) Rename isinstant_objection_enabled options check to be more consistent * Make it so objections display as soon as the message is over if instant_objection is disabled * Remove emote_mod = "1" thing that had no real purpose Implement desynchronized logs settings option, which is false by default, meaning users' messages and display IC logs are going to be in sync. Split up display and logging behavior, meaning IC logs will be saved with accurate timings on the .logs file, while display can be slower. Remove dumb "System" showname thing cuz it was dumb * Bring back minimum packet size safety check * Make sure shouts are properly logged. I am very sorry for this horrible amount of code duplication though. * fix compile errors * fix html parsing error * Rearrange the order of logging so IC messages go like this: * shouts go first * evidence goes second * chat message goes last * Fix No Interrupt coming back, go away you foolish beast * fix borked options dialog * Crank down "press enter delay" from 600ms to 200ms so it's not as harsh Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu> Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-01-11Add "id" variable to the clock functions and properly parse the IDCrystalwarrior
Implement scalable maximum clock count, right now it's at 5 clocks a theme can have max Theme "clock_" starts from 1 instead of 0 since users don't know when stuff starts at index 0 TODO: testing lol
2021-01-10Trivial comment changeoldmud0
2021-01-10Add arup_clear() and clear arup when fetching new areasSkye Deving
Theoretically fixes #313 The "FA" packet from the server invalidates the client's previous area list so it makes sense for the arup information tied to that list to be invalidated as well (especially seeing that the area and arup share the same index). As we repopulate the client's area list, we do the same for the arup list.
2021-01-10Merge branch 'master' into feature/timerclockCrystalwarrior
# Conflicts: # include/courtroom.h # src/courtroom.cpp
2021-01-09i barely had to modify thisin1tiate
2021-01-09Merge pull request #387 from AttorneyOnline/feature/immediateoldmud0
Rename noninterrupting bonanza to consistent and short "immediate" instead
2021-01-09Add desk_mods 2 -5 for more flexibility in emotes (#353)in1tiate
2021-01-09Rename noninterrupting_preanim and all its associated bullshit with more ↵Crystalwarrior
cooler and nicer bro immediate In themes, pre_no_interrupt old-style name is still supported if we cannot find "immediate" Resolves https://github.com/AttorneyOnline/AO2-Client/issues/64
2021-01-09Log objections IC, overhaul custom objections context menu, add more ↵in1tiate
configuration options per-character (#356) * initial commit * The Quick-Fix is a secondary weapon for the Medic. It is a prototype Medi Gun with a group of three gauges on one side, a (cosmetic) ÜberCharge gauge on the other side, and what appears to be a blender for a body. The main gun is coupled with a medicinal reactor backpack with glowing portions that replaces Medic's default backpack. * fixed settings dialog * slightly less stupid custom objection default Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com> Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-01-09Define IC Log colors independent of character, define message colors ↵in1tiate
according to character (#323) * IC Log colors now defined independent of character * Fix regression causing incorrect colors in the viewport * fix goof that broke chat scrolling * Only regenerate color vector when it's needed
2021-01-09Rework timer and ping logicoldmud0
The timer's time as received by the server is clarified to be the actual numerical time, in milliseconds, to be shown on the clock.
2021-01-05Merge pull request #369 from skyedeving/fix-showname-toggleoldmud0
Fix timestamps when toggling showname
2021-01-04Sort case evidence numerically before adding inSkye Deving
inventories get displayed lexigraphically too but it is assumed to not matter
2021-01-04Change default parameter to be QDateTime::currentDateTime()Skye Deving
Print debug message if provided timestamp is invalid
2021-01-04Fix timestamps when toggling shownameSkye Deving
On toggling shownames, regenerate_ic_chatlog() gets called to reprint the entire chatlog with append_ic_text(). The issue is that append_ic_text() uses QDateTime::currentDateTime() for the timestamp when it's called. Therefore the fix is adding a new timestamp parameter to the append_ic_text() which we supply from the datetime provided by each chatlogpiece
2020-11-10Merge pull request #305 from Crystalwarrior/bugfix/blip-accuracyoldmud0
More accurate/consistent blip rate functionality + punctuation slowdown fixes
2020-11-10Add vertical offset feature (#333)in1tiate
2020-11-09Add context menu entry to stop music (#301)in1tiate
Also included in this commit are changes to the music packet handler that change the text from "has played a song" to "has stopped the music" in the case that the special "stop song" track is played, as well as a condition stopping music categories from triggering a music packet when double-clicked. Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2020-09-19add variable check for evidence presentingin1tiate
2020-09-11Revert the meme of instant text.Crystalwarrior
Instant text using }}} is not only meme-worthy in how limited it is in practice, it also makes the blip ticker completely confused how and when to play the blips (to make instant text possible, the entire system needs rewriting (again)
2020-09-11More accurate/consistent blip rate functionality inspired by ↵Crystalwarrior
https://youtu.be/Min0hkwO43g
2020-08-25forgot to ctrl+s header definitions fuckCrystalwarrior
2020-08-25Implement clock pausingCrystalwarrior
Implement clock setting w/o starting or stopping Both of these should make it possible for the server to start/stop/pause/resume the clock with perfect synchronization to the true time.
2020-08-25Introduce the timer packet - "TI".Crystalwarrior
This timer will start the clock accounting for latency! Cool, right? Remove useless qDebug() for music looping
2020-08-25Actually make use of the completely useless CHECK and CH keepalive timer and ↵Crystalwarrior
use them to determine the client's ping. Display ping in the application window title. keepalive timer now fires every second instead of every minute Remove meme clock starting on set_widgets() implement get_ping() on w_courtroom
2020-08-21Proof of concept complete. The timer will now take int msecs to start, and ↵Crystalwarrior
will properly display the time remaining until target time in hh:mm:ss.zzz Clock can be defined in courtroom_config.ini and its font set in courtroom_fonts.ini Pause and resume functions will not work as expected atm.
2020-08-19Reset BASS when switching devices; drop Qt Multimedia support (#262)scatterflower
* Allow changing audio device on the fly while in a server * Use default audio device if device in config doesn't exist * Automatically change audio device to default when current one is invalid * Destroy Qt Multimedia support It was decided that there was not enough attention being given to Qt Multimedia support to justify its continued maintenance simply as a libre alternative to BASS. While substantial changes to audio were being made in 2.8, the Qt Multimedia support code fell behind in disrepair. It's clear that there is no vested interest in implementing audio features twice for the sake of licensing. When it's time to switch to another audio library, it will be done unilaterally. * CI: Use BASS for Linux build Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2020-08-19IC log rewrite (#259)Crystalwarrior
* Rewrite the IC Log code to drastically reduce code duplication and have both downward and upward mode in the same function Regenerate the IC Log in set_widgets() function, making sure the maximum_blocks is accounted for and clearing the log to prepare for different log mode (upwards/downwards) if it's different from previous Add placeholder text telling the user the direction in which the log will go Remove useless first_message_sent global boolean, a remnant from a w e a k e r c o d e r m a n * Add log_colors boolean to reduce color I/O happening in append_ic_text (optimization meme) Clear the IC log when log_colors setting changes and reload theme is pressed Fix https://github.com/AttorneyOnline/AO2-Client/issues/221 * Add configurable margin between IC log entries Add configurable newline/singleline log mode Options in settings for these * Add optional timestamps * Un-hardcode "played music" from the chatlogpiece and introduce the "action" argument so that "presented evidence" is fully supported now Translate "has presented evidence" Regenerate IC chatlog instead of clearing it, properly updating every element with the new configurations * Go away *temp, code duplication making me shid and cry rn Why is this not done in append_ic_text, or why isn't there a dedicated ic logging func aAAAaaaaAAAaa Fix presenting evidence not being properly logged Fix timestamp being UTC instead of local time (local time will not be as confusing) * okok it was a joke a big ol bamboozle you got gnomed haha rick rolled beaned stickbugged I did NOT copy paste code, no, I actually intended to fix copy pasted code all along. log_ic_text was always planned. (Fix copypasted code for ic_chatlog_history and consolidate it into a single log_ic_text func)
2020-08-18Improved blankposting (#256)Crystalwarrior
* Consolidate blankposting into singular log entries of "no message" instead of spamming the logs repeatedly when someone decides to keep switching emotes Return proper blankpost checking to 2.8.5 (chatmessage_is_empty bool makes sure the chatbox doesn't appear - branch broke that behavior by never setting it) More robust blankpost checking, meaning that passing a competely empty "" string will also count as a blankpost Fix screenshake not working with blankposting by moving it before the chatmessage_is_empty check in start_chack_ticking() stage of the message parsing * Allow user to send blankposts without even having to input a single spacebar, but only if last m_chatmessage CID matches ours. * Reviews are cool and good:ok_hand: allow sending no-text chat message to server without weird cid checks (let the server validate if they want to do STR_OR_EMPTY or just STR) - doesn't break existing behavior and lets servers introduce the new one if they want to Treat all blank/whitespace messages as blankposting and not just single-whitespace. Remove chatmessage_is_empty bool because why the fuck would you even need it if you have m_chatmessage[MESSAGE] already Simplify chatlogpiece log entry to not be a *temp pointer by suggestion * another useless bool destroyed Make "additive" have a very awesome emergent behavior with blankposting - keep showing the chatbox+message while only changing the emotes. Works with preanims too!
2020-08-16clang formatscatterflower
2020-08-16further cleanup of chat handlerscatterflower
2020-08-16Merge branch '2.8' into ic_fixesscatterflower
2020-08-16Ensure consistent behavior in IC log, clarify showname logic, and define ↵scatterflower
constants for minimum and maximum packet sizes
2020-08-15Create brushes for area list oncescatterflower
2020-08-15Only regenerate the area list once per ARUP packetscatterflower
2020-07-31Add "Play Random Song" option (#200)Crystalwarrior
It also respects the search string, so only visible tracks are chosen from the pool. Categories (i.e. entries with children) are also ignored.
2020-07-31Add a p_char optional argument to set_fonts() (#209)Crystalwarrior
Add overrides to set_font for font name and size (this is to preserve the chat_size and chat_font char.ini arguments that were implemented way earlier) Cease the baddening with set_font that was there before and condense it into a proper set_font function call Implement set_font for custom showname shenanigans from the misc folder
2020-07-29Add support for multiple custom interjections via context menu (#162)in1tiate
* YOU DO NOT BELONG IN THIS PR GET OUT Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com> Co-authored-by: likeawindrammer <31085911+likeawindrammer@users.noreply.github.com> Co-authored-by: Crystalwarrior <Varsash@Gmail.com>
2020-07-29Fix colors not persisting when refreshing IC log (#204)windrammer
Co-authored-by: Cents02 <Cents02@Cents0.me>
2020-07-29Hitting return on blank search box should collapse music list (#205)windrammer
* If enter is hit with no query it collapses the music list Co-authored-by: Cents02 <Cents02@Cents0.me>
2020-07-26Make music 'fade out previous' an effect enabled by default (#196)Crystalwarrior
Simply make the "FADE_OUT" music effect flag by default so more users experience the SMOOTH FADE OUT magic by accident and praise the based client.
2020-05-22clang 2 electric boogalooCrystalwarrior
{ BasedOnStyle: LLVM, BreakBeforeBraces: Stroustrup}
2020-05-22Clang-ify the code with this styling using Visual Studio Code:Crystalwarrior
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All } (this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
2020-04-13Add possibility for custom use text besides just "played music"Crystalwarrior
Implemented "presented evidence" message
2020-02-24Make pos dropdown more abstract and actually useful by letting servers send ↵Crystalwarrior
only pos you can actually access. Pos dropdown system also reads the actual bg folder of the current BG to see all the created pos.