Page MenuHomeWildfire Games

#5046 - Unify User.cfg, Local.cfg, Mod.cfg
Needs ReviewPublic

Authored by anileapen05 on May 19 2018, 12:10 PM.

Details

Reviewers
elexis
vladislavbelov
Stan
Itms
Trac Tickets
#5046
Summary

Currently we have three files to store game values if you don't count default.cfg

All the usage of those variables can be found using the following links.

Since we only use CFG_GET_VAL which is a macro:

g_ConfigDB.GetValue(CFG_USER, name, destination)

We could nuke the other two files as we barely read nor need them.

Usage across the codebase

​https://github.com/0ad/0ad/search?utf8=%E2%9C%93&q=CFG_GET_VAL&type=
​https://github.com/0ad/0ad/search?utf8=%E2%9C%93&q=CFG_MOD&type=
​https://github.com/0ad/0ad/search?utf8=%E2%9C%93&q=CFG_USER&type=
​https://github.com/0ad/0ad/search?l=C%2B%2B&q=CFG_SYSTEM&type=&utf8=%E2%9C%93
​https://github.com/0ad/0ad/search?utf8=%E2%9C%93&q=g_ConfigDB&type=

Since we use g_ConfigDB everywhere else we could also nuke the macro

Test Plan

User can test that no values are loaded from local.cfg and mod. cfg.

No values are written to local.cfg and mod. cfg.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 6085
Build 10132: Vulcan BuildJenkins

Event Timeline

anileapen05 created this revision.May 19 2018, 12:10 PM
anileapen05 updated the Trac tickets for this revision.
Vulcan added a subscriber: Vulcan.May 19 2018, 12:14 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/512/display/redirect

Itms resigned from this revision.Aug 10 2018, 4:12 PM

Posted some input on the Trac ticket, but I am not reviewing this code :)

Thanks for the patch @anileapen05!

Stan resigned from this revision.Jan 3 2019, 1:04 AM