summaryrefslogtreecommitdiff
path: root/engine/src
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-08-02 19:42:01 +0900
committerSho Sakuma <me@m1sk9.dev>2026-08-02 19:42:01 +0900
commitbc8010bc1b5401f11c80b565ba9a4de7d969a0a9 (patch)
tree0841b86822ad299ae5523a62d4919a90c913677c /engine/src
parent7e7d0875087185e6c68bb29f1d60bd51b300bfef (diff)
downloadLunaticChat-bc8010bc1b5401f11c80b565ba9a4de7d969a0a9.tar.gz
LunaticChat-bc8010bc1b5401f11c80b565ba9a4de7d969a0a9.tar.bz2
LunaticChat-bc8010bc1b5401f11c80b565ba9a4de7d969a0a9.zip
refactor: let each service live in exactly one place
ServiceInitializer held ten nullable fields alongside the ServiceContainer it returns. Six of them were written and never read; the remaining four made shutdown() ambiguous, reading conversionCache and channelMessageLogger from its own fields but everything else from the container it was handed. LunaticChat then mirrored seven more into public vars, one of which (channelMessageHandler) nothing read at all. Now the container is the single place a service lives: the initializer builds and returns, shutdown and the periodic task read from what they are given, and the plugin's public properties delegate rather than copy. A new service is one field instead of three, and no copy can go stale. PlayerSettingsManager had the same shape at a smaller scale: three UUID maps plus a PlayerSettingsData kept in sync by hand, where the data object was a pure derivation rebuilt - three full map copies - on every toggle. It now keeps one map and derives the snapshot at save time, which also closes the window where queueAsyncSave captured state that changes before the debounce fires. Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'engine/src')
0 files changed, 0 insertions, 0 deletions