* Allow "SC" packet to be used to refresh the character list even if the client is loaded in
Fix tree list of characters not being cleared properly between "SC" packets
Fix client theme breaking when joining a server with empty character select list
* Do my review suggestions on CW's behalf
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* try this reviewer
* test the reviewer with a very bad piece of code
* it can't handle spaces
* run cmake to find all the files
* file go brr haha
* cmake needs qt installed
* rename file once again
* use windows
* also doesn't like brackets
* can't use windows
* install qt the linux way
* try using cmake this way
* cmon cmake
* install qt before running cmake
* forgot catch2
* need to install as root
* add build dir
* delete test file
* fix 3 warnings
* enable clazy
* Revert "fix 3 warnings"
This reverts commit 7e64d4a546c397b5b69554ccf6765bf0a068f695.
* disable 3 warnings
* add a bracket for readability
* install clazy before
* get qt 5 real
* try lukkas cmake modules
* dupe courtroom again to test clang-tidy
* courtroom.cpp was a mistake
* remove magic number warning
* Effects follow offset, add ini option to disable offset for effect
This is pretty hacky, but the offset data is necessary to move the effect layer in relation to the character.
Fix evidence editing regressions caused by #587
Fix issues with "ok" button detecting itself as "changes from the server"
Fix "ok" button remaining after you press it once, allowing you to spam evidence update packets by spamclicking it
Current working theory is that setting the future opens a brief interval where it deconstructs the old future and returning an invalid QFuture,, causing a segmentation fault.
Since the MS chat has been disabled for quite some time now (and we aren't planning on bringing it back since Discord, Guilded etc. have better chat features), I decided to go ahead and change the pane into a debug log to keep it useful and avoid creating a gaping hole in themes.
Though, maybe it is worth removing the whole switcher and keeping the debug log hidden away where it can't scare people.
* Implement async music loading
* Simplify music filename parsing and fix "missing" on streams
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Apparently, people don't like logging demos because it takes up too
much space. It's possible to enable NTFS compression for demo files
(or the entire demos folder), though.
This piece of code from another era is not needed anymore thanks
to the message queue and decent server-side anti-flooding. Player
input won't be thrown away since the client waits for an
acknowledgement from the server before clearing the input box.
Remove OOC-Client commands that are already replaced by UI elements that are easily accessible.
Debatable if /save_case and /load_case should stay as they seem unused by most users/servers.
* Maintain backwards compatability with older servers.
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* user configurable timestamp format
* fix label making the entire settings window move jankily
* add a dropdown for sane timestamp formats
* streamline adding options to log timestamp format
According to profiling results, arup_append was being called around 90k times (!!) because it had been placed in the inner for loop. That's (tracks * areas)^2. Yikes!
By using hash tables, the algorithmic complexity of the case-insensitive
lookup has been reduced from O(n * k) to amortized O(k), where n is the
number of files in each level and k is the number of directory levels
that need to be traversed.
This massively improves performance on Linux when loading characters,
especially when there are many missing characters, since it is no longer
necessary to scan the entire character folder repeatedly.
To pull this one off, a new class called VPath was created that denotes
"virtual" paths that can exist anywhere among the list of mount points.
It is functionally identical to QString, except that implicit conversion
between QString and VPath is not allowed. This makes it easy to spot
errors in path resolution at compile time, since get_real_path must be
called to resolve a VPath into an absolute path that can be passed into
a Qt function as a QString.
Other functions, such as the get_*_suffix functions, also return an
absolute path QString for convenience.
As for the rest of the functions that return a VPath, you will need to
call get_real_path yourself.
Finally, a path resolution cache was added to try to avoid blowing
up what is already a massive lookup cost for assets. The cache
is invalidated when the mount path list is changed.
Currently, this cache isn't bounded. Might need to write an LRU cache
if issues arise.
Attempt Nr. 2 - Based on #548 and #501
+ Allows client to use a remote source as a last resort if the file can't be found locally.
+ Adds a check if the target file is missing.
This implementation assumed the streaming source to be structured like a webao content respository
Adds a new setting to config.ini to set a default showname. This works similarly to default username, but for IC shownames, setting the client's showname automatically. Like default username, this has a 30 character limit.
* Adds a new option to config.ini, default_showname.
* Adds this setting to the options dialog.
* Adds get_default_showname() for retrieving this showname.
* Sets the showname box to this value upon joining a server.
Fix an extremely weird case where CharLayer::Play() was not called even on the CharLayer class (I don't understand why inheritance was straight up just ignored)
Fix using preanims with static images just breaking everything
Deprecate weird insanity [Time] with the % sign BS (What was this for again? Literally no one used this nor was aware of it)
Fix text_stay_time timer firing even if we're immediate
Just in case, stop the text delay timer when start_chat_ticking is called
* Fix ic chatlog placeholder text not being translated
* Fix inconsistent/nonsensical path resolution for the backwards-compatibility misc/default/config.ini vs themes/current_theme/misc/default/config.ini
Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com>
* Implement a demo auto-fixing solution. If the client detects a pre-2.9.1 demo file, it will prompt the user if they wish to correct it, since otherwise the demo will be desynched from reality.
The aforementioned issue was fixed in https://github.com/AttorneyOnline/AO2-Client/pull/496 however 2.9.0 still has incorrect demo recording.
Fix potential memory leak by not flushing and closing the demo file after opening it for reading.
* backup broken demo file before fixing it
* comments ahoy
Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
* Add OOC logging to the .log files, making them infinitely more precious to GMs especially of ambitious multi-area RPs
Add [IC] and [OOC] tags to distinguish between the types of msg
* minor wording change for .log top line to make it clearer that it's the server address and not the user address
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Fix using objections against talking players not causing them to stop talking (with this method, they will only finish their current animation cycle unitl freezing in place)
Fix objections forcing a missingno to appear when you object to someone mid-preanim, and their preanim ends before objection shout finishes. This also resolves a crapton of other bugs related to preanim_done() signal.
Move evidence display from handle_ic_speaking to start_chat_ticking (makes more sense over here)
Remove a misplaced set_static_duration for ui_vp_player_char (must've got here over a strange merge conflict or smth)
Remove useless anim_state and text_state setters in reload_theme func, the func that calls the BG to display already handles everything needed for IC reset
ACTUALLY fix encoding errors, stop supporting the absolutely bonkers <and> exceptions just to support the previous bug instead of fixing the root issue
Reduce needless copy-pasting for shit that doesn't even need to be there
I actually made this fix but I stashed the older version when splitting the branches so you got the bugged verison instead.
When the demo skips by some number of seconds, the timer will also skip forward by that duration.
Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Fix demo playback being incorrectly timed due to the misplaced order of the wait#% packet (it should go BEFORE the appended message, not AFTER! We're delaying the message we're *writing*, not the *next message*!!!)
(cherry picked from commit 8319ebffe4c22c59c33d9c90161036d9c1ddddd5)
This will register any font (OTF/TTF) located in the base/fonts folder
recursively. They can be used for any purpose, without needing to
install them on the system.
Make pos dropdown ui editable for a custom pos
Keep track of the custom pos index
On switching from the custom pos, remove the entry at that index
Fix regression causing the "sort by name" lobby server list header disappearing
Expose column 0 for the # in the lobby server list header
("too ugly" just use lobby_stylesheets.css and pretty it up)
Split behavior for courtroom resizing into its own function
Use that function to optimize character changing screen
Fix reload theme breaking the background positioning
Fix changing character breaking the background positioning
Fix excessive set_widgets() calls that caused unnecessary lag
Fix unnecessary set_size_and_pos calls that didn't need to be there
Only call size_and_pos on the chatbox in the initialize_chatbox func
Remove checks for a boolean that will always be true
Simplify two functions that copy-paste code called set_size_and_pos into a single one
Fix "disable custom chat" setting not being used when setting chat sizes and pos
* Remove get_static_image_suffix (webp, gif etc. can be non-animated)
Replace QList<QString> with QStringList
* forgot to remove static image from aoimage
* Simplify get_theme_path, get_custom_theme_path and get_default_theme_path all into a single get_theme_path func
Add a default_theme variable which defines the currently recognized default theme
Add a new "get_asset_path" that will be used to simplify asset resolution considerably
* Simplify AOImage set_image function to use get_asset_path
Begin working on the subtheme system
* Add p_default_theme for get_asset_path
Implement get_asset_path for AOButton
* Condense aolayer path lookups into the get_asset_path function
* Get rid of get_font_name due to underuse (and it just does the same thing as get_design_element anyway)
Get rid of get_char_shouts (use chat= instead)
Use get_subtheme() instead of subtheme (because get_subtheme() can perform overrides based on the user's settings)
Make get_color() use get_asset_path()
Make get_design_element() use get_asset_path()
* Adapt a whole bunch of text_file_functions to the get_asset_path method, fixing an enormous amount of invalid path resolutions
Unfortunately I have to keep backwards compatibility for the backwards ass config.ini method for the chat markup (new way is chat_config.ini)
Get rid of get_theme_effects and implement the stacking behavior into get_effects instead
* Program doesn't run, color lists stop generating for some reason
Also implement safety checks for the asset path generator
* Fix a really tricky issue that popped up regarding char_color_rgb_list not being generated, causing segfaults
* Address the sfx player path resolution being really, really stupid and resolve major inconsistencies (such as the bug where objection sfx wouldn't be playing despite the default theme or default misc folder having them)
* Fix sfx path resolution being funky (apparently D:/Qt/Projects/AO2-Client/bin/base/themes/default//objection.wav is a valid qt5 path...)
* Implement:
get_asset_paths - Return an untested list of universal paths from the provided args
get_asset_path - Loop through the list of provided asset paths and return the first valid file
get_image_path - Loop through the list of provided asset paths, apply get_image_suffix and return the first valid image file
get_sfx_path - Loop through the list of provided asset paths, apply get_sfx_suffix and return the first valid sound file
get_asset - return an asset (must contain file extension) from the get_asset_path() applied on the get_asset_paths()
get_image - return an image with get_image_suffix() applied on the get_image_path() for the get_asset_paths()
get_sfx - return a sfx from provided args with the uniquely constructed asset path list for sounds
Rename old get_sfx to get_court_sfx for better clarity of its function
This replaces previous asset stuff I implemented, as I think this is a better solution lol
* Add a new get_config_value that obtains a value from the config that matches identifier
Adjust all calls to get_asset() to actually look for a config identifier value instead, so even if a config.ini is found if it doesn't contain the identifier we want we keep looking
* Fix effects.ini sounds not working
Remove debug text
* Make it so even if you miss the required asset, and don't have a missingno, the viewport still doesn't freeze up due to waiting on Objections etc. due to signals.
* Implement default_theme option for courtroom_design.ini, allowing you to make themes that inherit from other themes that are not default.
* move sounds folder lower in sfx pathlist
* fix realization sfx not being fetched from config
* Make aosfxplayer actually use get_sfx I made
Move sounds folder path check last in get_sfx
* I thought this would fix QSettings::value: Empty key passed but I guess not, that annoying error will keep pestering us :(((
* Remove silly .png exception for SplashLayer
Fix static image Objections freezing the viewport due to done(); signal that never arrives
* Make WTCE cooler by including a stop method for witness testimony indicator, and add support for custom WTCE
* Reduce code duplication for get_sfx
* Fix the program hanging/entering an infinite loop/segfaults/a number of nasty issues due to done(); signal being sent as soon as playback begins if the image is invalid.
This is done by removing the file_exists check, and letting the rest of the functionality handle this case - the system is robust enough and treats an invalid image as a static image.
* Fix segfaults with AOLayers by sanity checking using max_frames
Fix "Pixmap is null" console spam
* You'll hate me for this.
Make it possible to have fully animated AOButton and AOImage
* Add a settings option to toggle animated themes on or off
* Add a setting for animated theme elements
Add a "static image" toggle for get_image_suffix
* Fix custom chat and generally the chat boxes not having consistent behaivor with subthemes
Add a settings option for subthemes
Have AOImage keep track of its last valid path
* Add SubTheme (ST) packet. Pass subtheme as arg0, and "1" if you want the client's theme to be reloaded.
ST packet sets ao_app->subtheme no matter what. It will not reload theme unless the user has their subtheme set to "server".
Fix showname widths by rearranging font metrics to do its calculations *after* the showname font is set, and not before (making it lag behind the correct display size by 1 msg)
Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
* Add a Reload Theme button to the settings screen (works with both lobby and courtroom)
* Move all value updates on elements to "update_values" func in the settings screen
Add a "restore to defaults" option that allows you to restore all the configuration to its default values.
Set up a .temp settings file that allows you to undo the effects of restoring default options.
* wtf why didn't this error
Also fix backgrounds appearing off to the left if they are less wide than the viewport.
i am in agony
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Hide ~stop.mp3 and the stop category
Add an option to make it so when you double-click a category, it expands/collapses it without sending the stop-music command
Make right click stop music backwards compatible
Fix resizing the options dialog causing the save/cancel buttons to take up half the dialog box
Add suffixes to all gameplay tab spinboxes
Make size policy less suck