feat(config): include Render/Fun modules in .localconfig save#8457
feat(config): include Render/Fun modules in .localconfig save#8457CompileRider wants to merge 1 commit into
Conversation
e539355 to
8c2fc6a
Compare
|
Yooo! Absolute lifesaver, thx man |
|
To be honest there are also a lot of render configs in other categories. I think we need a better way to handle it |
Fair point. Since render settings are indeed everywhere, maybe we can just tag individual settings as 'visual'? Instead of filtering entire modules, we could add a simple property to the Value class to mark it as visual. That way, the render flag can surgicaly filter out things like 'Range Circles' in Combat modules or 'Line Colors' in Movement, while keeping the functional settings intact. It keeps the configs much cleaner and addresses the 'scattered settings' problem without needing a massive overhaul. What do you think of this approach? |
1.
enum class OptionalInclusion {
RENDER,
FUN,
}
2.
val ModuleCategories.Render = ModuleCategory("Render", inclusionGroup=RENDER)
3.
open class Value {
fun inclusionGroup(group) { ... }Like this? This is a draft Or simpler just remove the enum |
- Rename ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER to avoid confusion with ValueGroupSerializer.PUBLIC_SERIALIZER - Move OptionalInclusion enum from config/autoconfig/ to config/ package (used across 3 subpackages) - Refactor IncludeConfiguration from boolean fields to Set<OptionalInclusion> for scalability; remove dead includeAction field - Simplify checkIfInclude() to use direct Set containment - Use enumSetOf() instead of EnumSet.noneOf() for consistency with project conventions
|
will it also save HUD configurations? |
ff99b9f to
b541025
Compare
…e conflicts - Replace includeRender/includeFun booleans with Set<OptionalInclusion> - Rename ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER - Move OptionalInclusion from autoconfig/ to config/ package - Consolidate checkIfInclude() into Value.kt - Remove dead includeAction field - Add value() helper with inclusionGroup propagation - Remove render-specific hacks from ValueGroupSerializer Resolves conflicts with origin/nextgen by rebasing resolved changes on top of current base branch.
b541025 to
0b6340b
Compare
…e conflicts - Replace includeRender/includeFun booleans with Set<OptionalInclusion> - Rename ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER - Move OptionalInclusion from autoconfig/ to config/ package - Consolidate checkIfInclude() into Value.kt - Remove dead includeAction field - Add value() helper with inclusionGroup propagation - Remove render-specific hacks from ValueGroupSerializer Resolves conflicts with origin/nextgen by rebasing resolved changes on top of current base branch.
0b6340b to
f7c9411
Compare
Yes, it does save HUD configurations. |
Adds support for including Render and Fun modules when saving local configs through
.localconfig save.Summary
OptionalInclusioninconfig/package withRENDERandFUNentries.IncludeConfigurationfrom individual boolean fields (includeRender,includeFun) toSet<OptionalInclusion>— rendering, fun, and future groups handled uniformly.includeAction: BooleanfromIncludeConfiguration.renderandfuntokens to the.localconfig saveinclude options.ClientModuleviainclusionGrouppropagation fromModuleCategory.ModeValueGroupSerializer.PUBLIC_SERIALIZERtoPUBLIC_CONFIG_SERIALIZERto avoid confusion withValueGroupSerializer.PUBLIC_SERIALIZER.OptionalInclusionfromconfig/autoconfig/toconfig/package — used across 3 subpackages.checkIfInclude()intoValue.kt— serializers now callit.checkIfInclude()instead of duplicating the logic.Behavior
.localconfig save <name>— previous behavior, excludes Render/Fun modules..localconfig save <name> true render fun— includes Render and Fun modules..localconfig save <name> true binds hidden render— combines all include options.bindsandhiddenoptions keep their behavior.Mechanism
ModuleCategory.inclusionGroup: OptionalInclusion?— Render/Fun categories tag themselves with their group.ClientModule.init {}propagatescategory.inclusionGroupto the module.ValueGroupandModeValueGrouppropagateinclusionGroupto their inner values.Value.checkIfInclude()returnsfalseifdoNotIncludeis set, otherwise checks whether the value'sinclusionGroupis inIncludeConfiguration.optionalInclusions.PUBLIC_CONFIG_SERIALIZER(withincludePrivate = false) respectscheckIfInclude(), so Render/Fun values are excluded from public configs unless their group is in the set.Fixes #8398