Commit Graph

1479 Commits

Author SHA1 Message Date
Crystalwarrior
7877739146 Simplify the logic behind last message = blankpost detection
I need to stop overcomplicating things.
2021-01-18 18:54:11 +03:00
Crystalwarrior
ea94644cf5 Attempt a theoretically safer method of tracking last displayed message 2021-01-18 17:56:21 +03:00
stonedDiscord
ed9ecfda47
forgot to return after destroying the connection (#412)
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-18 17:39:35 +03:00
Crystalwarrior
5786694b53
Stack default soundlist after the character soundlist instead of making the character soundlist overwrite the default (#411) 2021-01-18 15:39:13 +01:00
Crystalwarrior
c42496e204
Make chat rate limit configurable (#398)
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-14 15:45:30 -06:00
oldmud0
31798583a9
Merge pull request #405 from AttorneyOnline/lupdate1
update all but the german translation
2021-01-13 18:29:26 -06:00
stonedDiscord
a4a24e372d
Update German translation (#401)
* voranimation

klingt wie vorhaut

* run lupdate and add missing strings

Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-13 18:27:30 -06:00
stonedDiscord
096f68288b update all but the german translation 2021-01-14 00:29:24 +01:00
Skye Deving
9965d1603e
Add some translations for jpn (#402) 2021-01-14 00:25:31 +01:00
Crystalwarrior
147892bae9
Overhaul sound lists to introduce aliases, rethink editing behavior (#389)
* 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

* Overhaul sound list:
* Allow aliases. .ini file syntax is "filename = alias".
* Do not allow editing the .ini files from the client anymore.
* The sound list dropdown is still editable, but all it does is play your custom sfx without adding it to any files.
* Overhaul get_char_sfx

* Fix aliases not working properly with a rather tricky solution

* save character soundlist in base and drop the character_ from the filename

Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-13 23:34:20 +01:00
oldmud0
8fb87c9f3a
Merge pull request #403 from Pyraqq/master
Polski translation update
2021-01-13 16:00:27 -06:00
Crystalwarrior
2f84055af9
[2.8.6] Demo Recording/Playback (#337)
* initial commit with horrible code dupcliation haha lol
Set up elapsedtimer to generate wait# stuff between packets recorded

* implement groundwork for internal demo server

* add core playback functionality

* make it work kinda by including SC packet in demo

* Add a file dialog for loading a demo file instead of a hardcoded path

* Change /play to > in OOC to begin playback or skip to next element
Pop up file dialog box *before* establishing the connection, not after.
TODO:
* Fix having to load the same file *twice* to be able to connect to the demo server for some reason
* Fix the segfault caused by calling the playback() function when there's no remaining data, it's almost like demo_data.isEmpty() is ignored for whatever reason???

* Clear demo data when loading a demo file to prevent stacking demos

* Properly disconnect the client when sending the request for file browser fails to obtain a good demo file

* Fix append_to_file newlining even if file didn't exist prior to calling this function

* Add a very scuffed exception to not log or demo record anything that happens in the Demo playback local server

* Reduce invalid file spam by checking for non-logging server better
Use file_exists() to be more consistent in append_to_file

* Fix the client crashing when receiving loading packets etc. at runtime such as SC, SM, CI etc. (TODO: parity???)
Remove useless debug stuff

* Preserve newlines for demo packets such as "CT", "MS" etc.

* Implement /max_wait, /min_wait for adjusting the maximum and minimum wait in milliseconds between wait packets
Add /pause or | shorthand to pause playback
Re-add /play and keep > as a shorthand
Remove clientside restrictions from sending empty OOC messages and sending OOC messages without a name - these should be serverside.

* Empty music list
Default the character to Spectator char no matter the selection in CSS

* Allow -1 character ID or character ID that does not fit into the local Character Select Screen list to still be parsed corectly, using the character folder in the MS packet as reference.
Allow servers with no selectable characters to still be properly loaded
Bypass the Character Select Screen when joining a server with no character select screen and automatically become a spectator

* Properly handle demo files without SC packet to dictate which chars exist
Add a /load command letting you load a demo file without rejoining the demo server (the CS packet will not be properly handled but I cannot think of a single tangible problem this causes lol)
Make sure all DEMO CT messages are colored properly

* Fix logs bleeding into each other if you disabled logging or you joined a demo server after leaving another

* Prevent logging even if log_filename is defined because a user might disable auto logging when running the game

* Fix custom shownames not appearing in the IC logs

* Set up new logic for max_wait, meaning that dead air being skipped is prioritized with MS (IC chat) packets being used as the anchor.

* Better logic for min_wait to only affect important packets (IC Chat)

* Fix encoding not being performed on packets that are saved to the .demo file, resulting in characters having something like "#1" in their message breaking that specific message

* Fix a weird setup in courtroom.cpp that happened out of the merge and bugged the code
Fix aopacket being busted up as well

* add missing feature flags to the demoserver

* use random port

* move writing to the demo file to a function

* only listen on localhost

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>

* remove copypasta

* add a help to the demo server

* fix empty demo disconnecting the server

* tell the user how to begin

Co-authored-by: scatterflower <marisaposs@gameboyprinter.moe>
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
Co-authored-by: stonedDiscord <stoned@derpymail.org>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-01-13 22:25:24 +01:00
stonedDiscord
dda459ceaa
behaivor (#404)
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-13 22:23:31 +01:00
Pyraq
26c934db37 Polski translation update 2021-01-13 21:24:29 +01:00
Crystalwarrior
96fcb75c4c Make sure blankposts are properly displayed unless repeats, playing nice with view desync 2021-01-12 13:46:39 +03:00
in1tiate
74a1b38949
Allow user themes to customize ui_music_list's indentation and animation (#395)
* add music list indent property

* add "animated" property to musiclist

* switch from qstring to int
2021-01-12 12:41:03 +03:00
Crystalwarrior
07993a621b Better place to check invalid ID's 2021-01-12 12:02:07 +03:00
Crystalwarrior
f96bd6cc3c Didn't notice I removed this from the mergening when I resolved merge conflicts, oops 2021-01-12 11:59:07 +03:00
Crystalwarrior
49c3dcdee5 Merge branch 'master' into feature/timerclock
# Conflicts:
#	include/courtroom.h
2021-01-12 11:55:08 +03:00
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
425c17a42b Update credits 2021-01-11 19:02:12 -06:00
oldmud0
4c3c2ffaac Remove raidensnake from credits per request
Who knows what's up with him.
2021-01-11 18:44:11 -06:00
oldmud0
5f38fd6246 Bump version to 2.9.0 2021-01-11 18:42:28 -06: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
Crystalwarrior
98da2698a6 Screw it, let there be clock_0 2021-01-11 17:52:23 +03:00
Crystalwarrior
45c78ea5ca Add "id" variable to the clock functions and properly parse the ID
Implement scalable maximum clock count, right now it's at 5 clocks a theme can have max
Theme "clock_" starts from 1 instead of 0 since users don't know when stuff starts at index 0
TODO: testing lol
2021-01-11 17:38:08 +03: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
oldmud0
62532f0b64
Trivial comment change 2021-01-10 10:41:34 -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
Crystalwarrior
1ad8f3bf24 Merge branch 'master' into feature/timerclock
# Conflicts:
#	include/courtroom.h
#	src/courtroom.cpp
2021-01-10 14:27:27 +03: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