rotators / foclassic

FOnline Community Edition (r412 base)
https://rotators.fodev.net/foclassic/
GNU General Public License v3.0
42 stars 5 forks source link

Config files handling #20

Open wipe2238 opened 5 years ago

wipe2238 commented 5 years ago

Core apps

FOConfig

FOnline version will no longer work, obviously, but there's also no reason to upgrade it - once settings are documented, it can be safely dropped and left out in snow.

New shiny thing could be based on FOConfigEx, buried deep in original 2238 repo, or written from scratch in public. It must support adding server-specific settings and other customizations (small example how it could look - first tab reserved for core settings, second for server-specific stuff, last one for configurator itself). Other than that, it must be smart enough to understand sections logic... or their concept has to change :P

IniParser

Handling config files is simply horrible - servers sometime ends with 2 or 3 different parsers, engine uses another one internally, art/intrface/default.ini uses resolution w h for sections, extensions are completely forgotten, and so on...

Way to read .ini, or anything else which will hold apps configuration, must be provided and available out of the box - lack of it is already a blocker for some of planned changes, as i really don't want to add some script as requirement for specific features. Exposing IniParser is obvious choice here - it's not going anywhere after all, it's not tied to any platform, and being a small thing, it shouldn't be hard to make it AS addon if replaced with 3rd party library. NOTES: IniParser is slowly being replaced with much simpler, (nearly) standalone class