ModernUO/Projects
Kamron Batman 12b0886cef
fix(feature-flags): custom flags no longer throw; removing a flag restores its real default (#2654)
Two bugs found while reworking #2653.

**Custom flags throw.** `SyncStaticFlag` is a switch expression with no discard arm, so any key that has no static behind it throws `SwitchExpressionException`. `[FeatureFlag mykey create <category> <desc>` crashes in `CreateOrUpdateFlag`, and once such a key is in `flags.json`, every boot's `SyncAllStaticFlags()` throws mid-iteration — caught and logged as "Failed to load feature flags", but stock flags later in dictionary order never sync. Added `_ => enabled`.

**Removing a flag turns some features on.** `RemoveFlag` hardcoded `SyncStaticFlag(flagKey, true)`. For `speedhack_detection` and `insurance` the real default is `false` / `insurance.enable`, so deleting the flag enabled the feature. It now syncs the removed flag's `DefaultEnabled`, which #2653 seeds from the static.

Verified: `dotnet build Projects/UOContent/UOContent.csproj -c Release`, 0 `CS` diagnostics (post-build copy to `Distribution/` was blocked by a running server instance).
2026-09-18 19:25:39 -07:00
..
Application fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
BuildTool feat: Bumps dependencies. Introduces Serialization Generator v3 (#2584) 2026-08-22 15:48:53 -07:00
Logger fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
Server feat(network): grow the send buffer on demand instead of disconnecting (#2639) 2026-09-12 16:35:06 -07:00
Server.Tests feat(network): grow the send buffer on demand instead of disconnecting (#2639) 2026-09-12 16:35:06 -07:00
UOContent fix(feature-flags): custom flags no longer throw; removing a flag restores its real default (#2654) 2026-09-18 19:25:39 -07:00
UOContent.Tests fix(ai): wild creatures no longer stand down when attacked (#2645) 2026-09-14 23:18:11 -07:00