Jump to content

Do you use Engine.ConfigDB_WriteFile ?


Silier
 Share

Do you use Engine.ConfigDB_WriteFile?  

3 members have voted

  1. 1. Do you use Engine.ConfigDB_WriteFile("user", "config/user.cfg"); with other path than user.cfg if yes, what is the usecase



Recommended Posts

  • Silier changed the title to Do you use Engine.ConfigDB_WriteFile ?

there is over 20 places in code telling the configuration file along with the scope "user".
the "user" scope is bound by default to "config/user.cfg"
unless you would specify new configuration file for the scope, you will not read configuration from other file than default so setting file path in those functions is pointless and you lost access to stored configuration after restart

basically this https://code.wildfiregames.com/D4616

Link to comment
Share on other sites

One could also say this should be just a function defined in javascript `mod/common` that wraps the engine call in an unique function that would be used in other parts of the codebase instead of hardcoding the path in c++ for each namespace.

But anyway, from a practical standpoint this also looks fine to me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...