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

Commit 40eab02

Browse files
authored
Merge pull request #204 from cortex-command-community/name-allowance
Name allowance
2 parents afc5272 + c15f787 commit 40eab02

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-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

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
229229

230230
- Damage to actors from impulses is now relative to their max health instead of being on a scale from 0 to 100.
231231

232+
- Scenes with a PresetName containing the strings "Test", "Editor" and "Tutorial" are no longer excluded from the scenarios screen and from the metagame.
233+
232234
### Fixed
233235

234236
- Fix crash when returning to `MetaGame` scenario screen after activity end.

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)