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.
* 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>
* 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
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
I'm somewhat confused as to why this wasn't enabled to begin with, since all the necessary code is here.
Closes#306, and fixes the issue with realizations being cut off by other sounds.
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
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>
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)
Remove qElapsedTimer method of blip earrape protection due to major inconsistency issues with this method (the same message would produce wildly different blip sounds - consistency is preferred)
More sophisticated blip earrape prevention is calculated in the chat ticker function itself, it also properly adjusts itself depending on the blip_rate used.
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.
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
* 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>
* 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)
* 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👌
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!
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
When an `_off` emote button exists without an `_on` counterpart, the client will automatically generate the `_on` button and save it to disk.
Co-authored-by: Cents02 <Cents02@Cents0.me>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* 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>
This occurs due to BASS not having any private variables of its own, so it was simply using the public variables loop_start and loop_end as reference - since those changed for any new song playing on another channel, the old looping points got replaced, and the seamless looping stops working.
The solution was easy - just make a loop_start/loop_end variable for every supported channel - so 4 variables in our case.
* Add a new "Custom Chatboxes" settings option to enable/disable char.ini setting custom chat box designs per-character
* Fix chat_arrow being incorrectly updated between character messages if the custom chatbox modified the chat arrow positioning/size in any way
* brackets matter
Due to a countless number of changes made to the core that were not
fully understood, tested, or documented, it was decided to roll
everything back to the last known stable version (2.6.2).
Changes dropped include:
- Witness needed
- Shake
- Frame SFX
- Multiple custom objections
- Multithreaded thumbnail generation
- Looping
- Various translation additions
- "Mirror IC"
- Color in IC log
- An invocation of clang-format
Next time, work together and split your big fork into independently
testable feature branches.
{ 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)
Indentation fixed to 2 spaces per tab. Braces set to Stroustrup style.
Lines reflow at 80 characters. One-line method bodies are on the same
line as the signature. Space always after `//`. No indentation
on preprocessor macros. Includes are sorted lexicographically.
If you don't want to see this commit on blames, use the hidden
whitespace option on GitHub, or use `-w` in git-blame.
CR likely stands for "CentsRaidensnake." Like the Case Cafe mega-merge
before it, this was not a clean merge, and it had to be split up into
two parts: the actual changes, and the attempt it made to reformat the
entire code via clang-format.
This branch had a complicated set of changes that would be difficult to
describe in this commit message. It would be better described in a
proper changelog.
(e.g. a 16:9 theme would not stretch a 4:3 bg and instead have a letterboxing effect. A 4:3 theme using a 16:9 BG will not stretch the BG but instead center it, making it look like the BG is 4:3 all along.)
Add options for sticky sounds, sticky effects and sticky preanims
Optimize the search for areas and music (previously, area search also searched for music in the background, causing lag with huge music lists)
Make sfx player able to play sfx without the file extension provided
Allow blipsounds to seek in blips/ folder to allow better categorization, as well as direct sound references
add get_emote_blip for detecting the blipsound used by an emote. Currently unused.
Less strict/hardcoded custom objection detection system
Allow system (charid -1) messages, and don't do the same message detection on blankposting
Allow objection, hold it, take that and custom sound players to detect sounds that are not exclusively .wav
Fix "prezoom" packet being ignored
Allow char.ini's to indicate a zoom w/ preanimation by using emote_mod=4
((ALL OF THESE ARE UNTESTED - TESTING NEEDED!))
BEHOLD, LOOP_START AND LOOP_END MUSIC POINTS! It reads the songname.mp3.txt file, looking for loop_start, loop_length and loop_end in samples
MUSIC EFFECTS SYSTEM THAT CAN ***COMMUNICATE WITH THE SERVER***, WOAHHHHHHHHH!
RIGHT-CLICK CONTEXT MENUS TO ENABLE/DISABLE SPECIFIC MUSIC EFFECTS
MUSIC EFFECTS ENUMS
Fix an issue with music looping
Add a new get_qfont function
Fix message box font being different from every other font due to incorrect font loading scheme
Fix ui_evidence_save and ui_evidence_load tooltips being wrong
Fix current charmovie breaking offsets
Make pairing offsets applicable even without a pairing partner, making it a generic offset
Fix the chat message hardcoding max colors to 8 (when it should be max_colors)
Come up with a way to convey the ordering information without creating an extra new packet in a cool way (backwards compatibility AND less clutter!)
More info on the evidence_x and evidence_ok tooltips
Don't mute music when you switch to CSS anymore
Make FM packet only fetch music, and new FA packet to fetch areas (this way you don't have to reload the entire music list just to get new areas)
Fix a possible segfault with emote lists if emote list size is bad
Hide casing button if server doesn't support casing
Hide the remove buttons by default for iniswaps and sfx list so they're not clickable when they shouldn't be
Prevent background from being displayed unless the server asked us to
Fix some redundancy surrounding current_side
Rework music list so list_music doesn't care about search bar and the hiding is actually done in the search function
Implement text centering, rightening and justifying
Fix text scrolling meme that happened with \n and skipped chars
Fix the pos dropdown not actually caring if you selected jur and sea pos.
Fix the pos dropdown sending like a million packets when scrolled through.
Prevent characters from being incorrectly resized if a different-scaled character speaks
Fix character select screen letting you choose characters that the server doesn't want us to be
You can now press the checkmark to save evidence. The checkmark only appears when your edited evidence differs from evidence on the server.
You will now be alerted if you try to exit out of the evidence with unsaved changes (pressing "X")
Fix double-clicking on image name not doing anything
You will now be alerted if the evidence changed as you were editing it
Add tooltips
Make an evidence_close function that can be referred to from multiple places
i did the thing
Final overhaul of filter_ic_text
Fix spoken colors not being actually spoken
Fix a message of ()()()() spamming idle/talking animations (instead it just does the idle animation until you feed it an actual character)
Prevent spamming of play_idle and play_talking on the fastest text speed
Properly escape html and construct a message that works with characters &, <, >, ", etc. for filter_ic_text
Turn whitespace into html entities to prevent html from eating it up (alternative/better solution would be to erase excessive whitespace entirely but yaknow, some niche applications, whatever)
Fix filter_ic_text not displaying the best string it could in ic logs (strip html, display newlines as \n, etc.)
Scroll the scrollbar of the message box correctly according to some real wacky magic stuff I'm doing here. Let's hope there's no situations where it desyncs from the actual text.
Create two new helper functions - get_chat_markdown and remake read_char_ini_tag to be read_ini_tags for more general purpose
Modify aolineedit to support preserving selection after unfocusing (building this for using dropdown list for setting colors), as well as remove the setReadOnly functionality and use it in signals instead
Overhaul the color system to get rid of inline colors, allow full customization of colors and usage of configuration files for every facet of how a color functions (should we be talking, should we remove that markdown char, etc.)
Complete overhaul of color markdowns system
TODO: Make this thing not lag to hell, fix chat messages hogging the IC as the animation never ends apparently
Overhaul inline colors system to properly support additive text and further expansion
Add two new colors - Gray and Blank, the latter being used for IC parsing.
Instead of adding text symbol by symbol, reveal more of the already-rendered text instead so that it properly anticipates words that need to be on the newline.
Changed the append_ic function slightly so it appends ": " to text only after it's no longer needed.
Made gray color less inconsistent with everything else
Temporarily allow music suffix until I let the client perform a fileExists check similar to how images are handled (.mp3? play mp3, if not mp3, play .ogg, etc. etc.)
Fix music not being looped sometimes
Prevent channel less than 0 from being passed
Set up a new music display element with an attached music name, it displays a scrolling text of the currently playing music
Fix music packet processing issues
Make SFX slider responsible for all music channels besides 0 (actual music)
scrolltext.cpp code recipe was taken from https://stackoverflow.com/questions/10651514/text-scrolling-marquee-in-qlabel - thanks to leemes for that one, I only adapted it for newer C++ version and tweaked some stuff.
Fix aolineedit not sending the double_clicked signal
Add tooltips for emotes that display the number and the emote_comment (name)
Add similar tooltips to evidence buttons
Resolve an issue where you could edit evidence name without double-clicking a piece of evidence first
Update evidence a bit and change the way it sets images to something much better and less confusing
Update the hovering logic a bit so there's less weird occurences happening e.g. evidence button is deleted
It tries to read soundlist.ini in the character folder first. If it can't find it, it will fall back to the theme's character_soundlist.ini.
It will only save the soundlist.ini if it differs from the character.soundlist.ini.
There is currently no way to dynamically change sound delay atm but the function for it is there.
Add more tooltips, my favorite!
This will save to the character folder's iniswaps.ini. You can click on the dropdown and edit the text inside to add an iniswap, and press the [X] button that'll appear next to it to remove the ini swap.
Recode the enter_courtroom and add a new update_character feature - the two are now separate and responsible for different things. The courtroom will reload the whole theme and widgets while the character is only responsible for all ui elements related to the character. This drastically improves performance when switching characters using /switch or something
Add a set_char_ini helper function that allows you to modify the character variables. For now only used to set name= field when iniswapping
Remove some useless/unused ui elements
Implement stylesheet for courtrooms in a way that lets the end user modify a lot of its elements
Use get_image_suffix for evidence_appear images
Modify all set_image calls to utilize said suffix helper function
Dynamically change betweehn chatblank, chat, chatmed, chatbig based on the showname's length
Use char.ini showname if showname is set to whitespace (doesn't yet check if char.ini showname is also whitespace)
Scream at the coders that decided hard-coding fonts and colors was a good idea (gotta properly let the themes modify that later)
Fix a lot of ui elements not properly respecting the themes and their colors
add a set_qfont method for those situations that need it
Allow the theme to change sender colors for ooc and ms chatlogs
rename url parser variable to something more immediately apparent as to what it is for readability's sake
Fix server_address not being properly created in packet distribution
Create a log file when you join a server in the logs/<server name>/<logname>.log and update it every time there's a new chat entry
minor refactor of chatlogpiece
Fix moderation guard button not doing what it's supposed to (enable/disable modcalls)
Fix moderation guard button appearing with failed logins
Fix the option to toggle looping sfx not doing anything
Reorganize charmovie.h a bit and make some functions private
Add a new helper function "read_char_ini_tag" which returns a qstringlist of all key=value strings associated with the tag
Fix screenshake animation modifying the default positions of shook elements
Fix aomovie sometimes not playing the last frame and causing lagspikes due to the delay() method
Partially bring back the differing [Time] duration variable, however, the speed of the image will not be adjusted to accomodate it due to the need for using m_reader to read through every frame to determine the final full delay value (which tanks performance).
Comment all the functions for the charmovie in aocharmovie.h
Implement Goofball's AOV loopable music server message where any value that's not -1 when the length of the handle_message packet is longer than 3 will not loop the music (still confused about this but w/e)
Rewrite Goofball's doScreenshake() function to be much more modular and multi-purpose (also rename to do_screenshake() to match other functions)
Add networking needed to make screenshake work. Works with AOV version of tsuserver3 (button screenshake only so far).
Add get_theme_pos helper function, currently unused.
Rename kill_music_on_object to objection_stop_music for readability
Update blip rate (faster overall, more accurate to the trilogy) - based on AOV values
Update default blip rate to be "once every two symbols"
Allow realization flashes to be animated images by making them AOMovies
Eploit the newly added 'duration' system for realization AOMovie
(cherry picked from commit bb98f79083)
Make the witness testimony use AOMovie instead of AOImage
Remove pointless "testimony_in_progress" variable
CONTROVERSIAL: Make the witness testimony indicator be position-ignorant so as to reduce the amount of hardcoding and allow broader usage of the witness testimony system (For example, Danganronpa investigation indicator, etc.) - This should not affect how the testimony indicator is received currently, as witness testimony usually requires the entire rest of the court to shut up until the cross-examination either way.
(cherry picked from commit 932f430b68)
Set it up so feeding the timer value when playing the AOMovie would use the timer but only in cases where a non-animated image is used
Update shouts and wtce to pass the 'duration' argument which will be used if the image used is non-animated. Otherwise, prioritize the animated image duration.
Make the witness testimony use AOMovie instead of AOImage
Remove pointless "testimony_in_progress" variable
CONTROVERSIAL: Make the witness testimony indicator be position-ignorant so as to reduce the amount of hardcoding and allow broader usage of the witness testimony system (For example, Danganronpa investigation indicator, etc.) - This should not affect how the testimony indicator is received currently, as witness testimony usually requires the entire rest of the court to shut up until the cross-examination either way.
Set it up so feeding the timer value when playing the AOMovie would use the timer but only in cases where a non-animated image is used
Update shouts and wtce to pass the 'duration' argument which will be used if the image used is non-animated. Otherwise, prioritize the animated image duration.
Reorganize the file_exists checks to be an array iterator instead for much less code duplication and easier ordering of priority
Reorganize desk and set_image loading on AOScene class, resolve issues with last_image setting to prevent animations from being restarted when characters talk on the same pos in succession
Apply get_image_suffix for seancestand and jurystand searches
TODO: At the moment, if you feed a .png shout, it will send the "Done" signal on the first frame (frame 0), not showing you the .png image at all. The shout code should be reorganized to allow static images to be displayed for exactly 720ms - the standard AA objection length. Usage of the timer similarly to the realizationflash.png might be possible.
Comment out the index as it can be potentially confusing alongside "true" area numbers
Add "FM" to Packet Received that would reload the areas and music list
TODO: Test this with arup systems
Add get_image_suffix for all .gif's so that all animated pieces can be .webp or .apng instead
Expand on .webp .apng support and clean up the code somewhat