A feature flag denotes whether a scenario uses the new or old format for its metadata. With the old format (legacy scenarios and openBoE scenarios created prior to this PR) everything displays in the scenario picker as before, and scenario designers get 2 text fields to display however they want, and 2 text fields that are pretty much useless.
With the new format, Author and Contact info are formatted onto the first line in the scenario picker display. The scenario designer gets 1 line to write a teaser. Fix #593 Also fix a bug where scenario ratings were appearing as integers ingame instead of the correct "G", "PG", etc.
This commit is contained in:
@@ -271,7 +271,7 @@ bool load_scenario_v1(fs::path file_to_load, cScenario& scenario, bool only_head
|
||||
temp_str[len] = 0;
|
||||
if(i == 0) scenario.scen_name = temp_str;
|
||||
else if(i == 1 || i == 2)
|
||||
scenario.who_wrote[i-1] = temp_str;
|
||||
scenario.teaser_text[i-1] = temp_str;
|
||||
else if(i == 3)
|
||||
scenario.contact_info[1] = temp_str;
|
||||
else if(i >= 4 && i < 10)
|
||||
@@ -781,7 +781,7 @@ void readScenarioFromXml(ticpp::Document&& data, cScenario& scenario) {
|
||||
if(type == "teaser") {
|
||||
if(found_teasers >= 2)
|
||||
throw xBadNode(type,info->Row(),info->Column(),fname);
|
||||
info->GetText(&scenario.who_wrote[found_teasers], false);
|
||||
info->GetText(&scenario.teaser_text[found_teasers], false);
|
||||
found_teasers++;
|
||||
} else if(type == "icon") {
|
||||
info->GetText(&scenario.intro_mess_pic);
|
||||
|
Reference in New Issue
Block a user