Quote from: abstauber on Fri 27/07/2018 14:35:25
All variables inside the CDG struct are accessible from everywhere, so you can modify the dialog GUI from every script below the dialog script.
Yes, but I don't want to change the global variables anywhere in the code. I want to pass the global variables to that module only once, and then change the variables defined in that module, only in my one custom script that initializes that module.
Moreover, that's only 1/4 of what my changes do :
Spoiler
1) they make the things accessible from outside (your answer addresses this, and I accept it)
2) they group the settings by category
3) they make them reflexive (accessible by index or name in the array of settings, allowing to tie them to an in-game console system)
4) they clarify the initialization sequence and keep the object in a consistent state (by letting you change a few settings and then calling the corresponding function in the module to apply them, instead of changing some variables values directly and then not being sure of what should be done for the change to be taken in account, or if something was broken).
[close]
More generally, I'd say that you guys have no mercy

So anyways, at this stage I've explained why I went for those changes, that was my attempt at making your module more sealed from the rest of the code. So it's only my ego that keeps talking, there's no point in trying to convince you.
Thanks for taking the time of answering! See you around guys.