Commit Graph

1930 Commits

Author SHA1 Message Date
in1tiate
4fe4e6ad54 remember past search term when switching between area and music list 2021-06-06 22:54:14 -05:00
oldmud0
2ef7b206e2 Scan themes in all mount paths 2021-06-06 22:42:16 -05:00
oldmud0
387233e9e3 Don't store key in asset lookup cache 2021-06-06 22:41:40 -05:00
oldmud0
7a1c3f385e Greatly improve case-insensitive lookup speed
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.
2021-06-05 22:27:56 -05:00
oldmud0
037d96a5d9 Use intuitive behavior for loading assets with ambiguous extensions 2021-06-05 20:28:55 -05:00
oldmud0
d27501313c Finish mounting feature
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.
2021-06-05 14:58:40 -05:00
oldmud0
97f3d7a8bc
Merge pull request #549 from Salanto/asset-packet-musiclist
Music list streaming support over ASSet packet
2021-06-02 22:50:19 -05:00
oldmud0
a023657348 Partial: Add mount list to options dialog 2021-05-29 10:43:53 -05:00
oldmud0
e3730b5497
Merge pull request #552 from AttorneyOnline/fix/effects2
Account for the difference between theme and misc pathing when getting image and sound data for effects
2021-05-16 17:32:39 -05:00
in1tiate
167aae750f account for both theme and misc pathing which are different because this program is well made and does not make me want to pull my hair out 2021-05-16 00:41:41 -05:00
Salanto
c6207a5478 Commit suggestion 2021-05-12 13:42:41 +02:00
Salanto
c056182ba0 Merge branch 'add-asset-packet' into asset-packet-musiclist 2021-05-12 01:56:33 +02:00
Salanto
8fc75f29a7 Prevent crash when sending empty ASS packet 2021-05-12 01:56:15 +02:00
Salanto
b8b6d3cbb3 Add musclist streaming support
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
2021-05-05 00:42:48 +02:00
Salanto
004bf12428 Merge remote-tracking branch 'origin/handle-music-refactor' into asset-packet-musiclist 2021-05-05 00:24:57 +02:00
Salanto
8a9bb6dc69 Add Asset Packet
This packet is used to send the client the URL of an online content repository, if available.
2021-05-04 05:39:50 +02:00
oldmud0
bea9fc1a05
Merge pull request #526 from AttorneyOnline/crystalwarrior/demo-reload
Add a /reload command that quickly reloads the current demo
2021-04-29 01:29:11 -05:00
oldmud0
75da07d190
Merge pull request #545 from MangosArentLiterature/default-shownames
Add default shownames
2021-04-29 00:53:57 -05:00
oldmud0
1d809726a9
Merge pull request #542 from AttorneyOnline/fix/aolayer-crap
Fix AOLayer-related regressions, deprecate BS no one uses and return sane behavior
2021-04-29 00:44:50 -05:00
MangosArentLiterature
99d083d114 Add default shownames
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.
2021-04-28 00:43:06 -05:00
oldmud0
f08a293a2f
Merge pull request #543 from AttorneyOnline/fix/effects-pathing
Fix effects in misc folders not being detected by get_effects
2021-04-26 18:31:24 -05:00
in1tiate
0ced99c966 check for effects without path in p_misc 2021-04-26 12:14:16 -05:00
oldmud0
2379c5aaff
Merge pull request #541 from AttorneyOnline/feature/default-scaling-option
Add setting for default scaling method
2021-04-25 00:38:42 -05:00
Crystalwarrior
8d9331a3ea fix interfacelayer not applying stretching when load_image is called (reload theme, chat arrows, etc.) 2021-04-24 02:28:24 +03:00
Crystalwarrior
433b7f3315 Deprecate tick_ms and use actual milliseconds rather than arbitrary 60ms ticks for char.ini [Time]
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
2021-04-24 01:44:52 +03:00
oldmud0
6e3435ddba Add setting for default scaling method 2021-04-23 16:09:25 -05:00
oldmud0
60daac3823 Move other duplicate reset calls to their own method 2021-04-23 14:29:16 -05:00
Crystalwarrior
0a1a47c920
Expand .css power by giving object names to all AO UI elements (#534)
* 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>
2021-04-23 14:20:31 -05:00
Crystalwarrior
31abe0c848
Fix get_court_sfx using latin1 instead of utf-8 (#540)
Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com>
2021-04-23 14:17:45 -05:00
Crystalwarrior
de4115e20a Merge branch 'master' into crystalwarrior/demo-reload 2021-04-23 16:12:35 +03:00
oldmud0
5fca08537b
Update themes submodule (#539) 2021-04-23 15:53:59 +03:00
in1tiate
66f2369af2
Fix Cyrillic characters not being read correctly from QSettings inis (#535)
* set ini codecs to utf8

* fix color config reading in Latin1 rather than Utf8
2021-04-23 02:18:56 -05:00
oldmud0
93c8befece
Merge pull request #538 from AttorneyOnline/fix/showname-enable
Fix shownames disappearing forever if a message is sent while the shownames checkbox is unticked
2021-04-23 01:58:55 -05:00
oldmud0
b7585a1c6f
Merge pull request #533 from AttorneyOnline/fix/regression-charlayer-path
Fix regression that won't allow us to give a direct base/ path to a char emote
2021-04-23 01:57:24 -05:00
Crystalwarrior
9fbe899c0e
Automatically fix desynced demo files with issues pre-#496 PR (#532)
* 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>
2021-04-23 01:55:04 -05:00
in1tiate
9359ed7f54 make sure we save the shownames even when theyre disabled 2021-04-23 00:30:50 -05:00
in1tiate
43340e8869 move timer reset to its own method 2021-04-22 23:46:55 -05:00
Crystalwarrior
2c259a6337 Do the same as previous commit for the get_asset_paths func - only check for the direct file path before missingno 2021-04-22 19:11:39 +03:00
Crystalwarrior
d3e5cb933c Charlayer - only check for direct path after the previous checks fail but before missingno 2021-04-22 19:09:44 +03:00
Crystalwarrior
d2c0c4fa0d Fix charlayer regression not allowing us to *directly* refer to an emote we want to use with a file path (base/misc/blank for example)
Actually use the helper funcs for searching images instead of reimplementing the same thing
2021-04-22 19:02:07 +03:00
oldmud0
3e4de5da62
Merge pull request #531 from AttorneyOnline/fix/broken-demos
Fix demo playback max_wait -1 incorrect behavior when non-IC is processed
2021-04-21 01:04:45 -05:00
Crystalwarrior
fb4a5e0656
Fix log_chatmessage referring to the global m_chatmessage instead of the local variables that should be sent to it at the point of the func being called. (#530) 2021-04-21 02:54:08 +03:00
Crystalwarrior
7b058d1401 Fix last line in the .demo file not being processed
Fix timings for OOC being really busted if max_wait is -1 (dunno at which point this bug was introduced)
2021-04-21 02:14:49 +03:00
Crystalwarrior
86b342badc Reset timers, evidence list and background whenever /load or /reload is used 2021-04-20 15:08:24 +03:00
oldmud0
d0ef4831de
Merge pull request #504 from AttorneyOnline/fix/css-lag
Fix character select screen lag/performance overhead
2021-04-20 00:20:54 -05:00
oldmud0
56ca90d322
Merge pull request #529 from AttorneyOnline/crystalwarrior/coolchat-plus
Narrator IC chat support
2021-04-20 00:19:51 -05:00
Crystalwarrior
81c0f9a569
Better logs with OOC logging, [IC] and [OOC] tags (#519)
* 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>
2021-04-20 00:13:56 -05:00
oldmud0
31073d090f
Merge pull request #528 from AttorneyOnline/crystalwarrior/coolchat
Tons of bug fixes for IC chat parsing
2021-04-20 00:11:50 -05:00
oldmud0
445d47c5b5
Merge pull request #527 from AttorneyOnline/fix/523
Fix ~~, ~> and <> breaking tick pos
2021-04-20 00:05:41 -05:00
in1tiate
e517a365d5
don't set a mask on elements affected by offsets (#524) 2021-04-20 03:27:25 +03:00