Repository navigation
Revamp CVar system #38 - #187
Merged
Merged
Conversation
+ simplify parsing and test setup + add cvar typing with cached values + simplify formatting + simplify choice type + remove availablity verification + Revamp CVar system #38: simplify enum and choice declarations + simplify string type + chore: align cvars registration
Remove unnecessary repeat registration from the fullscreen suggestions test. Cake migration will keep one owning declaration per cvar, use existing entries at consumers, and preserve typed pending resize state through registry writes. No ChoiceType equality change is needed. Detailed findings remain in the intentionally untracked typed-cvars.md.
Declare Cake settings once and consume cached native values. Move numeric constraints and fixed choices into declarations, preserve spectator passwords as strings, and restore pending resize values through validated registry writes. Keep test setup scoped to required settings, remove unnecessary singleton resets, and cover resize pending state, crosshair choices, and live download toggles. Validation: Cake and qcommon tests passed; desktop client compiled. Cake tests passed again after test cleanup; git diff --check passed.
Return generic cvar references from registration and checked native-type lookup, with a reified Kotlin helper. Replace per-type caches with active and pending native values while retaining legacy raw access. Use typed references throughout Cake and remove test-only per-type pending getters. Cover lookup identity and failures, primitive/wrapper tokens, native choices, enums, cached reads and nullable pending values. Validation: qcommon and Cake tests passed; desktop client, game, server, dedicated and maptools compiled. Pending-getter cleanup passed qcommon/Cake tests and focused video tests; git diff --check passed.
Document legacy text and Float mirrors, compatibility readers and the future value rename. Distinguish lasting active/pending state from migration storage. Next slice merges declaration metadata into the cvar and stages unregistered config values with suggested flags and diagnostics; detailed decisions remain in the untracked plan.
Store type and default directly on the cvar, removing CvarSpec and late attachment. Stage unknown assignments as text with optional suggested flags until their owner registers them; validate inputs and preserve staged alias write order. Warn on missing and early reads, flag conflicts, and aliases used before registration. Keep command namespace probes quiet to avoid startup warnings for normal commands. Validation: qcommon and Cake tests passed; desktop, game, server, dedicated and maptools compiled. Client output fix verified manually by the user; git diff --check passed.
Use live cvar references instead of per-option snapshots, submit edits as a map, and merge section definitions and summaries. Preserve the existing Apply behavior and compare rendered tokens locally to detect cvar changes without rebuilding unchanged editors. Validation: Cake tests and desktop compilation passed; git diff --check passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
implemented typed cvars (boolean, integer, float, enum, string)