Commit Graph

28 Commits

Author SHA1 Message Date
ivan tkachenko a69e46c6a3 Sync playback to the actual beat count rather than relying on BPM 2025-07-13 01:03:41 +03:00
ivan tkachenko caa4b9ccbd Reorder some statements to make them visually more grouped together
Postfix patch went from 5 if-blocks down to only 3 \o/

There is no need to stop the creatureVoice and start it delayed in two
separate condition blocks. Also, the code should only rely on state
transitions, and not on AudioSource.isPlaying property.
2025-07-13 01:03:41 +03:00
ivan tkachenko 3b055e3d91 Split config into sections per track language, add quick toggle per section 2025-07-12 19:33:12 +03:00
ivan tkachenko 13fd51c366 Add LethalConfig with suitable custom options
The custom callback attempts to prevent modifications mid-round. Use
IsHost to check for permissions, as IsClient is always true for
everyone even in local single-player setting.

There is a bug in LethalConfig which makes it possible to modify entries
bypassing the callback once per round, but it is pretty hard to abuse:
https://github.com/AinaVT/LethalConfig/issues/60
2025-07-12 17:32:31 +03:00
ivan tkachenko 34e72da748 Add config synchronization via CSync
It only synchronizes from host to clients.
2025-07-12 17:32:29 +03:00
ivan tkachenko aead762721 Add configuration weights for tracks
Range is [0..100] but it's relative to total/sum. The algorithm guards
against "all set to zero" scenario.

This is not usable without synchronization. This commit provides none.
2025-07-12 02:09:47 +03:00
ivan tkachenko 8dc897feba Move track choosing out of the Jester patch class 2025-07-11 23:58:48 +03:00
ivan tkachenko aba0f6bab5 Move NuGet.Config to the root
Otherwise it doesn't work in IntelliJ Rider
2025-07-11 22:39:14 +03:00
ivan tkachenko 9176e35344 Fix double triggering start of music
State transitions are only handled by changes to previousState on
per-frame basis, so only compare before/after of previousState.
2025-07-11 22:39:14 +03:00
ivan tkachenko 2284636576 Rename State member to make it less confusing
JesterAI::previousState updates on the next frame after
currentBehaviourStateIndex changes, while current- & previous-
BehaviourStateIndex only change when SwitchToBehaviourState() is
requested.
2025-07-11 22:39:14 +03:00
ivan tkachenko 38d4ddd7c6 Quick Fix: Object initialization can be simplified (IDE0017) 2025-07-11 22:39:14 +03:00
ivan tkachenko e82f2c5924 Consistently use equality operator for state indexes 2025-07-11 22:39:14 +03:00
ivan tkachenko 45bde29240 Auto format code 2025-07-11 22:39:14 +03:00
ivan tkachenko 066304a9fe Implement zip bundle as an after-build msbuild target, keep versions in sync 2025-07-11 22:39:11 +03:00
ivan tkachenko af45b958fd Make build config more portable with user-specified git-ignored paths 2025-07-10 19:06:14 +03:00
ivan tkachenko 2bd17424cd Speed up cranking timer in debug builds
The code does not appear to be in `dotnet build --configuration Release`
2025-07-10 18:55:34 +03:00
ivan tkachenko cb1002d339 Add support for WAV and OGG/VORBIS audio files 2025-07-10 18:55:34 +03:00
ivan tkachenko 68b4e120db Organize code into functions, add some comments, add a null check 2025-07-10 18:55:34 +03:00
ivan tkachenko a65dd56bc3 Convert mixed indentation to spaces 2025-07-10 18:55:34 +03:00
Nikita Vilunov 8518e0f62d fix track gap and durochka sound level 2024-10-29 15:18:44 +01:00
Nikita Vilunov 4558a4d942 new tracks 2024-10-29 00:47:48 +01:00
Nikita Vilunov 5d55467b9c new track and assets for the previous one 2024-10-28 22:57:52 +01:00
Nikita Vilunov f274513bb5 improve track selection entropy 2024-10-28 22:40:39 +01:00
Nikita Vilunov 89a41f9640 "new" track 2024-10-28 21:06:07 +01:00
Nikita Vilunov 987fe830c3 fix some stuff ok? 2024-04-26 23:40:35 +02:00
Nikita Vilunov 7e0ba2248f support multiple tracks 2024-03-10 03:19:17 +01:00
Nikita Vilunov 19a4cbff68 increase music radius to cover most of the dungeon but not the surface world 2024-03-10 01:47:35 +01:00
Nikita Vilunov 20a3234371 initial version 13.37.1 2024-03-09 19:48:17 +01:00