Commit Graph

1395 Commits

Author SHA1 Message Date
Crystalwarrior
2d1de1fb54
Desynchronize viewport from the IC chat log so that users have a smooth 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-12 11:24:11 +03:00
oldmud0
189b092117
Merge pull request #396 from skyedeving/fix-spectator-mute
Set music and objection players to volume slider in update_character
2021-01-11 12:02:07 -06:00
in1tiate
967f17a53f
Allow button generator to generate both on and off buttons (#320)
We'll see how cursed this is.
2021-01-11 12:01:09 -06:00
oldmud0
d54d1c1b72
Merge pull request #397 from skyedeving/rename-log
Set log filename to a more sortable format
2021-01-11 11:54:21 -06:00
Skye Deving
2ee2cd8bf2 Set log filename to a more sortable format 2021-01-11 04:36:32 -06:00
Skye Deving
90bd02a3e9 Set music and objection to volume slider in update_character 2021-01-11 02:27:10 -06:00
oldmud0
812d04d969
Merge pull request #393 from skyedeving/fix-empty_sm_packet-crash
Add arup_clear() and clear arup when fetching new areas
2021-01-10 10:44:07 -06:00
Skye Deving
4f2ac31456 Add arup_clear() and clear arup when fetching new areas
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-10 06:38:26 -06:00
oldmud0
e65072f8f1
Merge pull request #392 from AttorneyOnline/in1tiate/label-truncation
Reimplement #149 (label truncation)
2021-01-09 15:51:22 -06:00
in1tiate
057353e9f6 more comments 2021-01-09 15:19:50 -06:00
in1tiate
3a207dccf0 i barely had to modify this 2021-01-09 15:13:19 -06:00
Skye Deving
ee8c6e3df7
Remove redefinition of variable in same scope (#391) 2021-01-09 22:41:52 +03:00
oldmud0
41c134b1be
Merge pull request #387 from AttorneyOnline/feature/immediate
Rename noninterrupting bonanza to consistent and short "immediate" instead
2021-01-09 12:35:09 -06:00
in1tiate
3993ba47e5
Add desk_mods 2 -5 for more flexibility in emotes (#353) 2021-01-09 12:32:24 -06:00
in1tiate
10fb54db61
correct my widdle fucky wucky (#390) 2021-01-09 21:00:26 +03:00
Skye Deving
05dd086fff
Fix segfault in server list without a server selection (#374)
Also bumps C++ version to C++17 (C++1z).
2021-01-09 11:59:51 -06:00
Crystalwarrior
5b34df1c5a Rename noninterrupting_preanim and all its associated bullshit with more 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-09 18:43:24 +03:00
in1tiate
883fa8547d
replace "gender" with "blips" (#386)
Co-authored-by: Crystalwarrior <Varsash@Gmail.com>
2021-01-09 18:24:06 +03:00
in1tiate
5b09dd45d5
Populate non-default background positions from design.ini, allow 2.8-style default positions (#352)
* populate pos dropdown from design.ini

* add sane default, remove hardcode bs
2021-01-09 18:21:35 +03:00
in1tiate
15c3d607c6
Log objections IC, overhaul custom objections context menu, add more 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-09 18:17:12 +03:00
in1tiate
7bac3c9514
only play expanded songs, music_random (#376) 2021-01-09 18:14:56 +03:00
Crystalwarrior
1da6e37e04
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 (#383) 2021-01-09 18:14:04 +03:00
in1tiate
fc4e707381
Move user-made iniswaps to a global configuration file and make character folder iniswap files immutable (#350)
* add default iniswap file

* switch to using base/iniswaps.ini for user iniswaps
2021-01-09 18:11:57 +03:00
in1tiate
079c45e298
Define IC Log colors independent of character, define message colors 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-09 18:09:18 +03:00
oldmud0
b36263934c
Merge pull request #382 from skyedeving/fix-more-leaks
Fixing more leaks from orphaned QWidgets
2021-01-08 11:00:12 -06:00
Skye Deving
512b7a37de Adopt the orphaned msgBox's and add delete on close attribute 2021-01-07 23:32:00 -06:00
Skye Deving
df24961c0d Set delete on close attribute for orphaned widgets 2021-01-07 23:31:08 -06:00
Skye Deving
c46ab13c62 Adopt the scroll widget in the options dialog 2021-01-07 23:30:46 -06:00
Skye Deving
86fd030ef0 Adopt the poor orphaned QWidgets 2021-01-07 23:30:10 -06:00
Skye Deving
cbf8391a65
Add QMenu delete on close attributes (#381)
Fixes a minor memory leak with context menu creation.
2021-01-07 20:44:58 -06:00
Skye Deving
e2c447f1d7
Set emote format to apng if png supports animation (#379) 2021-01-07 16:21:56 -06:00
oldmud0
d308fc83de
Merge pull request #316 from AttorneyOnline/messagebox
add BB packet for a MessageBox popup
2021-01-06 12:41:52 -06:00
oldmud0
c4b739292a
Use call_error() for character load error message 2021-01-06 11:43:31 -06:00
oldmud0
f2a957f850
Merge pull request #364 from AttorneyOnline/issue-template
Update issue templates
2021-01-06 11:39:17 -06:00
oldmud0
6e57e170e7
Merge pull request #362 from skyedeving/fix-casedoc-loading
Encode doc contents with hash sign
2021-01-06 11:23:37 -06:00
oldmud0
5c270fc0b0
Merge pull request #377 from skyedeving/fix-has-apng
Checking for apng should be lower case
2021-01-06 11:15:58 -06:00
Skye Deving
cb19f55a06 Checking for apng should be lower case 2021-01-06 00:59:22 -06:00
oldmud0
9486f44770
Merge pull request #369 from skyedeving/fix-showname-toggle
Fix timestamps when toggling showname
2021-01-05 21:07:48 -06:00
oldmud0
9adfa29191
Merge pull request #372 from skyedeving/add-music-streaming
Add in support for streaming music with bass
2021-01-05 15:26:23 -06:00
Skye Deving
371ca313e6 Add in support for streaming music with bass 2021-01-05 12:36:17 -06:00
oldmud0
f77ae093e3
Merge pull request #370 from skyedeving/fix-evidence-loading
Sort case evidence numerically before adding in
2021-01-04 23:52:25 -06:00
Skye Deving
5abc685b47 Sort case evidence numerically before adding in
inventories get displayed lexigraphically too but it is assumed to not
matter
2021-01-04 19:58:30 -06:00
Skye Deving
8aaba6633e Change default parameter to be QDateTime::currentDateTime()
Print debug message if provided timestamp is invalid
2021-01-04 19:21:11 -06:00
Skye Deving
6570bcf066 Fix timestamps when toggling showname
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
2021-01-04 13:45:18 -06:00
Skye Deving
4d02cc8d68
Use QList::mid when constructing QStringList (#365)
The constructor with two iterators is too cutting edge from 5.14 to be
widely supported right now
2021-01-04 12:51:27 -06:00
oldmud0
ca88bd92fb
Merge pull request #366 from AttorneyOnline/update-xcode
Use Xcode 12
2021-01-04 12:49:01 -06:00
stonedDiscord
6c9a2234b8
use xcode 12 2021-01-04 18:54:48 +01:00
oldmud0
18e5f297f6
Update bug_report.md 2021-01-04 11:20:42 -06:00
stonedDiscord
714f54b9dc CI needs an extra include for bind 2021-01-04 18:05:03 +01:00
oldmud0
811db3f27c
Merge pull request #363 from skyedeving/aopacket-refactor
Refactor AOPacket
2021-01-04 11:02:37 -06:00