Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 7ab06d2

Browse files
committed
Extend PresetName allowance for world-map scenes
Scenes with PresetNames containing the strings "Test" and "Editor" will be selectable through the scenario screen and in the metagame. Additionally, PresetNames containing the string "Tutorial" will be selectable in the metagame.
1 parent 5280ac5 commit 7ab06d2

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

Activities/MultiplayerServerLobby.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,11 +1042,7 @@ namespace RTE {
10421042
{
10431043
pScene = dynamic_cast<Scene *>(*pItr);
10441044
// Only add non-editor and non-special scenes, or ones that don't have locations defined, or have Test in their names, or are metascenes
1045-
if (pScene && !pScene->GetLocation().IsZero() &&
1046-
pScene->GetPresetName().find("Editor") == string::npos &&
1047-
pScene->GetPresetName().find("Test") == string::npos &&
1048-
!pScene->IsMetagameInternal() &&
1049-
(pScene->GetMetasceneParent() == "" || g_SettingsMan.ShowMetascenes()))
1045+
if (pScene && !pScene->GetLocation().IsZero() && !pScene->IsMetagameInternal() && (pScene->GetMetasceneParent() == "" || g_SettingsMan.ShowMetascenes()))
10501046
filteredScenes.push_back(pScene);
10511047
}
10521048

Managers/MetaMan.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -995,12 +995,7 @@ int MetaMan::TotalScenePresets(std::list<Scene *> *pScenes)
995995
{
996996
pScenePreset = dynamic_cast<Scene *>(*sItr);
997997
// Filter out editor or special scenes, or ones that don't have locations defined.
998-
if (pScenePreset && !pScenePreset->GetLocation().IsZero() &&
999-
pScenePreset->IsMetagamePlayable() &&
1000-
pScenePreset->GetPresetName().find("Editor") == string::npos &&
1001-
pScenePreset->GetPresetName().find("Test") == string::npos &&
1002-
pScenePreset->GetPresetName().find("Tutorial") == string::npos &&
1003-
pScenePreset->GetMetasceneParent() == "")
998+
if (pScenePreset && !pScenePreset->GetLocation().IsZero() && pScenePreset->IsMetagamePlayable() && pScenePreset->GetMetasceneParent() == "")
1004999
{
10051000
// Make sure this exact site location on the planet isn't occupied already
10061001
locationOK = true;

Menus/ScenarioGUI.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,12 +1720,8 @@ void ScenarioGUI::GetAllScenesAndActivities()
17201720
{
17211721
pScene = dynamic_cast<Scene *>(*pItr);
17221722
// Only add non-editor and non-special scenes, or ones that don't have locations defined, or have Test in their names, or are metascenes
1723-
if (pScene && !pScene->GetLocation().IsZero() &&
1724-
pScene->GetPresetName().find("Editor") == string::npos &&
1725-
pScene->GetPresetName().find("Test") == string::npos &&
1726-
!pScene->IsMetagameInternal() &&
1727-
(pScene->GetMetasceneParent() == "" || g_SettingsMan.ShowMetascenes()))
1728-
filteredScenes.push_back(pScene);
1723+
if (pScene && !pScene->GetLocation().IsZero() && !pScene->IsMetagameInternal() && (pScene->GetMetasceneParent() == "" || g_SettingsMan.ShowMetascenes()))
1724+
filteredScenes.push_back(pScene);
17291725
}
17301726

17311727
//Clear offsets

0 commit comments

Comments
 (0)