Commit graph

49 commits

Author SHA1 Message Date
erik
361c2012da Fix hot reload init ordering: move after core objects are created
InitializeForHotReload() was called at the top of Startup() before
_killTracker, _chatEventRouter, and _inventoryMonitor were created,
causing NullReferenceException. Move the hot reload block to after
all core objects are initialized.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:55:26 +00:00
erik
1fff36e3f7 Fix rare detection broken on hot reload / DLL update
InitializeForHotReload() never created a RareTracker — it only ran
if one already existed. When the new DLL is loaded on an already-
logged-in character, LoginComplete doesn't fire, so _rareTracker
stayed null and the null-check in ChatEventRouter.OnChatText silently
skipped all rare detection.

Now InitializeForHotReload creates and wires the RareTracker if it
hasn't been set yet, matching what LoginComplete does.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:52:19 +00:00
erik
a4d2108b3a Clean up /mm help commands
- Remove dead no-op commands (harmonyraw, debugtaper)
- Remove duplicate command (initgui, same as gui)
- Hide debug/test commands from help output (vtanktest, decalstatus,
  decaldebug, testprismatic, testdeath, testtaper, debugupdate)
- Clean up descriptions for consistency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 08:17:55 +00:00
erik
64e690f625 Phase 6: Fix swallowed exceptions and cleanup unused usings
- Add debug logging to all empty catch blocks in DecalHarmonyClean.cs setup methods
  (prefix method catches intentionally stay silent to never break other plugins)
- Add error logging to VtankControl.VtSetSetting catch
- Add logging to DecalPatchMethods.ProcessInterceptedMessage catch
- Remove unused usings from PluginCore.cs (System.Diagnostics, System.Drawing,
  System.Text, System.Text.RegularExpressions)
- Flatten redundant nested try/catch in PatchPluginHost

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:59:34 +00:00
erik
0713e96a99 Phase 5: Extract QuestStreamingService and introduce IGameStats
- Extract QuestStreamingService.cs from PluginCore (timer, IsHighPriorityQuest, FormatCountdown)
- Create IGameStats interface for WebSocket telemetry decoupling
- PluginCore implements IGameStats, WebSocket.BuildPayloadJson reads from IGameStats
- WebSocket.cs no longer references PluginCore directly
- Update queststatus command to use QuestStreamingService
- Static bridge properties remain for VVSTabbedMainView compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:56:13 +00:00
erik
f9264f2767 Phase 4: Extract ChatEventRouter and GameEventRouter
- ChatEventRouter.cs: routes chat events to KillTracker, RareTracker, handles
  allegiance report trigger and WebSocket chat streaming
- GameEventRouter.cs: routes ServerDispatch messages (0xF7B0, 0x02CF) to CharacterStats
- PluginCore no longer contains OnChatText, AllChatText, NormalizeChatLine,
  or EchoFilter_ServerDispatch methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:50:41 +00:00
erik
c90e888d32 Phase 3: Extract RareTracker and InventoryMonitor
- RareTracker.cs: owns rare discovery detection, meta state toggle, WebSocket/allegiance notifications
- InventoryMonitor.cs: owns Prismatic Taper tracking with event-driven delta math
- PluginCore no longer contains inventory event handlers or rare detection logic
- Bridge properties maintain backward compat for WebSocket telemetry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:33:44 +00:00
erik
366cca8cb6 Phase 2: Extract IPluginLogger and KillTracker
- Create IPluginLogger interface, PluginCore implements it
- CharacterStats.cs and WebSocket.cs now use IPluginLogger instead of PluginCore.WriteToChat
- Extract KillTracker.cs: owns kill detection (all 36 regex patterns), death tracking,
  rate calculation, and the 1-sec stats update timer
- Bridge properties on PluginCore maintain backward compat for WebSocket telemetry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:29:49 +00:00
erik
4845a67c1f Phase 1: Extract Constants.cs and CommandRouter.cs
- Extract magic numbers (timer intervals, message type IDs, property keys) into Constants.cs
- Replace ~600-line HandleMmCommand switch with dictionary-based CommandRouter
- All /mm commands preserved with same behavior, now registered via lambdas
- PluginCore.cs and CharacterStats.cs updated to use named constants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:24:43 +00:00
erik
9e9a94f159 Remove unused features: HTTP server, old telemetry, !do/!dot chat commands
- Delete HttpCommandServer.cs (localhost:8085 HTTP listener)
- Delete Telemetry.cs (old HTTP POST to mosswart.snakedesert.se/position/)
- Remove !do/!dot allegiance chat regex matching from OnChatText
- Remove RemoteCommandsEnabled, HttpServerEnabled, TelemetryEnabled settings
- Remove corresponding UI checkboxes, /mm command handlers, and wiring
- Keep: WebSocket command receive, ClientTelemetry.cs (used by WS streaming)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:02:07 +00:00
erik
c53aa4b31b Fix luminance: hook ServerDispatch in Startup and handle 0x02CF updates
- Move Init() and ServerDispatch hook from LoginComplete to Startup so
  event 0x0013 (character properties) is caught during login sequence
- Add handler for message 0x02CF (PrivateUpdatePropertyInt64) to capture
  runtime luminance changes when player earns/spends luminance in-game
- Uses RawData byte parsing for 0x02CF since Decal messages.xml may not
  define this message type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 06:18:15 +00:00
erik
ad8fb3a4ba Fix luminance data lost by Init() timing: move ServerDispatch hook to LoginComplete
ServerDispatch was hooked in Startup() but Init() was called later in
LoginComplete(), clearing the luminance/title data already captured from
the 0x0013 network event. Now hook ServerDispatch after Init() so
captured data is not reset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:25:28 +00:00
erik
1fdae96262 feat: wire up character stats timer, ServerDispatch, and login send
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:43:01 +00:00
erik
c90a11fc29 added chest looter 2025-12-09 21:23:51 +01:00
erik
5fe0f85369 Test for alex 2025-06-22 23:44:04 +02:00
erik
e9925096f0 Debug 2025-06-22 21:32:00 +02:00
erik
c174c143c6 Fixed bug in quests 2025-06-22 17:53:24 +02:00
erik
553a2388d1 Fixed quest bug when hotrealoading 2025-06-22 17:13:38 +02:00
erik
e9a113abdd Added /mm sendinventory 2025-06-22 16:56:44 +02:00
erik
73ba7082d8 Added hot reload 2025-06-22 12:10:15 +02:00
erik
bb493febb4 added z coords for portal discovery and minster disovery 2025-06-21 10:48:53 +02:00
erik
31c9042ed3 version 4.0.0.2 fixed flapping players in Overlord, changed how taper is counted, added safe websocket marshalling 2025-06-17 20:58:10 +02:00
erik
f9644baf1e Added taper counts, vitals streaming and tentacle porn 2025-06-10 22:40:42 +02:00
erik
28bdf7f312 Added inventory over websockets, death reporting, taper reporting. 2025-06-08 22:45:22 +02:00
erik
23e33599ca Added Mossy tracker, know issue 2025-06-08 00:15:55 +02:00
erik
7eb98491d3 Fix 2025-06-01 14:05:29 +02:00
erik
96b85ed226 Now with Plugin chat intercept. version 3.0.1.1 2025-05-31 22:18:41 +02:00
erik
591da42d36 added vtank interface so we can advance navpoints 2025-05-30 08:35:40 +02:00
erik
79304baaad New GUI overhaul!, version 3.0.1.0 2025-05-29 21:34:16 +02:00
erik
1f85d9c6f0 New visual routes and new GUI 2025-05-29 17:52:30 +02:00
erik
a91556c949 Fixed webcommand bug 2025-05-27 21:29:43 +02:00
erik
a0f40cf2cd Client telemetry 2025-05-24 21:10:45 +02:00
erik
f4ec57a44d Fixed inventory, spawn and settings 2025-05-15 21:34:20 +02:00
erik
de2057789a Inventory logger 2025-05-12 20:27:00 +02:00
erik
29fba4b7cb test of inventory 2025-05-11 15:48:48 +02:00
erik
33fb228654 Cleaned up websockets 2025-05-09 23:07:24 +02:00
erik
56b09f509a Now with spaws detection 2025-05-08 20:21:40 +02:00
erik
d2e9988bdd Websockets-version 2025-05-05 20:08:15 +02:00
erikn
2ea4945aba Fixed saving of settings file 2025-04-29 23:49:28 +02:00
erik
347cfe6423 New vtank control 2025-04-29 09:58:25 +02:00
erikn
78a2479d6c Telemetry 2025-04-26 16:55:48 +02:00
erikn
0f404019b6 added http and settings 2025-04-15 22:45:08 +02:00
erikn
201cf96629 Fixed time reporting, added /mm 2025-04-12 23:17:43 +02:00
erikn
f66b15ac57 Added setting metastate from plugin as well as !report 2025-04-08 08:31:23 +02:00
erikn
ccf8618ff2 Added report better 2025-03-30 22:09:16 +02:00
erikn
54ed6af060 added reporting of kills 2025-03-30 21:15:32 +02:00
erikn
6741d38923 Added reporting of kills 2025-03-29 01:45:47 +01:00
erikn
dcfa888f61 More mossawarts 2025-03-29 00:47:36 +01:00
erikn
b533681978 Add project files. 2025-03-28 22:11:17 +01:00