wesnoth/wesnoth — pull request #140 by Rift-Walker (2014-04-07 04:51:15+00:00)
Title: add functionality for define= in [scenario] tag

Added a new public data member, scenario_define, to class game_classification (alongside campaign_define). Added a new public method, prepare_for_scenario, to multiplayer create_engine. This method is called from process_event in multiplayer_create similarly to the existing prepare_for_campaign method. The prepare_for_scenario method reads a define attribute from a scenario tag into classification.scenario_define, which is then processed by load_game_config_for_game. The effect of this change is that, if all scenarios use define= to isolate sections of their code, much less config data will be loaded initially. Config data is reloaded upon scenario selection, with isolated content for the selected scenario included.