Go to file
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
.github Update bug_report.md 2021-01-04 11:20:42 -06:00
android Bring back Android project files 2020-05-22 19:37:12 -05:00
base Rename serverlist.txt -> serverlist.sample.txt 2020-08-20 15:03:30 -05:00
include Desynchronize viewport from the IC chat log so that users have a smooth viewing experience as an option (#385) 2021-01-12 11:24:11 +03:00
lib adjusted gitignore files 2018-12-26 18:11:08 +01:00
resource Desynchronize viewport from the IC chat log so that users have a smooth viewing experience as an option (#385) 2021-01-12 11:24:11 +03:00
scripts Add missing bassopus to the configure script (#361) 2021-01-04 14:27:09 +01:00
src Desynchronize viewport from the IC chat log so that users have a smooth viewing experience as an option (#385) 2021-01-12 11:24:11 +03:00
.clang-format Perform clang-format 2020-05-22 17:13:37 -05:00
.gitignore gitignore: Ignore base/serverlist.txt 2020-08-21 00:03:00 -06:00
.gitlab-ci.yml Merge some various CI changes 2020-08-19 23:07:45 -05:00
.gitmodules Bring back AO themes submodule 2020-05-31 17:05:55 -05:00
.travis.yml use xcode 12 2021-01-04 18:54:48 +01:00
Attorney_Online.pro Fix segfault in server list without a server selection (#374) 2021-01-09 11:59:51 -06:00
CONTRIBUTING.md Update readme (#172) 2020-06-28 19:53:42 -05:00
LICENSE.GPLv3 Relicense/dual-license under MIT 2018-03-15 20:38:58 -05:00
LICENSE.MIT Update readme and license 2018-12-06 14:38:02 -06:00
README_BUILD.md Mac improvements 2019-06-29 00:27:31 +00:00
README.md Update readme (#172) 2020-06-28 19:53:42 -05:00
resources.qrc include the translations with the client or they can't get loaded 2020-05-23 21:01:43 +02:00

Attorney Online

Attorney Online is an online version of the world-renowned courtroom drama simulator that allows you to create and play out cases in an off-the-cuff format.

Refer to the docs for more information.

Credits

This is a open-source remake of Attorney Online written by OmniTroid. The original Attorney Online client was written by FanatSors in Delphi.

The logo (logo.png and logo.ico) was designed by Lucas Carbi. The characters depicted in the logo are owned by Capcom.

Project

The project is dual-licensed; you are free to copy, modify and distribute AO2 under the GPLv3 or the MIT license.

Copyright (c) 2016-2018 David "OmniTroid" Skoland

Modifications copyright (c) 2017-2018 oldmud0

Case Café additions copyright (c) 2018 Cerapter

Killing Fever Online additions copyright (c) 2019 Crystalwarrior

Qt

This project uses Qt 5, which is licensed under the GNU Lesser General Public License with certain licensing restrictions and exceptions. To comply with licensing requirements for static linking, object code is available if you would like to relink with an alternative version of Qt, and the source code for Qt may be found at https://github.com/qt/qtbase, http://code.qt.io/cgit/, or at https://qt.io.

Copyright (c) 2016 The Qt Company Ltd.

BASS

This project depends on the BASS shared library. Get it here: http://www.un4seen.com/

Copyright (c) 1999-2016 Un4seen Developments Ltd. All rights reserved.