wesnoth/wesnoth — pull request #216 by Rift-Walker (2014-06-21 23:49:58+00:00)
Title: Add define functionality to scenarios, eras, and mods

This pull request extends the define= system, currently used in campaigns, to multiplayer scenarios, eras, and mods. The system is intended to defer loading sections of config until they are required (when a level is selected). As a result, less config is loaded at mp_create, and less unnecessary config is floating around, taking up memory and namespace in multiplayer.
Note that if defines change: that is, if a level is loaded which has a non-empty define attribute, all config will be reloaded, including any level-specific config inside of #ifdef statements. If none of the levels, eras, or mods being loaded use defines, config will not be reloaded. This system should be implemented by UMC devs on a case-by-case basis dependent on the size of the level, whether it is having namespace conflicts with another level, etc.

EDIT: New mergeable branch 6/21