Added warnings about planned changes to EndMisisonTake (#759)
parent
7bfe9fdd0a
commit
58815059ea
|
@ -145,6 +145,7 @@ void CPathManager::InitPaths()
|
||||||
|
|
||||||
void CPathManager::LoadModsFromDir(const std::string &dir)
|
void CPathManager::LoadModsFromDir(const std::string &dir)
|
||||||
{
|
{
|
||||||
|
GetLogger()->Trace("Looking for mods in '%s' ...\n", dir.c_str());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
|
|
|
@ -2785,6 +2785,12 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
Gfx::Color backgroundCloudDown = Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f);
|
Gfx::Color backgroundCloudDown = Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
bool backgroundFull = false;
|
bool backgroundFull = false;
|
||||||
|
|
||||||
|
auto LoadingWarning = [&](const std::string& message)
|
||||||
|
{
|
||||||
|
GetLogger()->Warn("%s\n", message.c_str());
|
||||||
|
m_ui->GetDialog()->StartInformation("Level loading warning", "This level contains problems. It may stop working in future versions of the game.", message);
|
||||||
|
};
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_ui->GetLoadingScreen()->SetProgress(0.05f, RT_LOADING_PROCESSING);
|
m_ui->GetLoadingScreen()->SetProgress(0.05f, RT_LOADING_PROCESSING);
|
||||||
|
@ -2868,6 +2874,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
int rank = boost::lexical_cast<int>(line->GetParam(type)->GetValue());
|
int rank = boost::lexical_cast<int>(line->GetParam(type)->GetValue());
|
||||||
if (rank >= 0)
|
if (rank >= 0)
|
||||||
{
|
{
|
||||||
|
// TODO: Fix default levels and add a future removal warning
|
||||||
GetLogger()->Warn("This level is using deprecated way of defining %1$s scene. Please change the %1$s= parameter in EndingFile from %2$d to \"levels/other/%1$s%2$03d.txt\".\n", type.c_str(), rank);
|
GetLogger()->Warn("This level is using deprecated way of defining %1$s scene. Please change the %1$s= parameter in EndingFile from %2$d to \"levels/other/%1$s%2$03d.txt\".\n", type.c_str(), rank);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "levels/other/" << type << std::setfill('0') << std::setw(3) << rank << ".txt";
|
ss << "levels/other/" << type << std::setfill('0') << std::setw(3) << rank << ".txt";
|
||||||
|
@ -2875,6 +2882,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// TODO: Fix default levels and add a future removal warning
|
||||||
GetLogger()->Warn("This level is using deprecated way of defining %1$s scene. Please remove the %1$s= parameter in EndingFile.\n", type.c_str());
|
GetLogger()->Warn("This level is using deprecated way of defining %1$s scene. Please remove the %1$s= parameter in EndingFile.\n", type.c_str());
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -2931,6 +2939,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
m_ui->GetLoadingScreen()->SetProgress(0.15f, RT_LOADING_MUSIC, audioChange->music);
|
m_ui->GetLoadingScreen()->SetProgress(0.15f, RT_LOADING_MUSIC, audioChange->music);
|
||||||
m_sound->CacheMusic(audioChange->music);
|
m_sound->CacheMusic(audioChange->music);
|
||||||
m_audioChange.push_back(std::move(audioChange));
|
m_audioChange.push_back(std::move(audioChange));
|
||||||
|
|
||||||
|
if (!line->GetParam("pos")->IsDefined() || !line->GetParam("dist")->IsDefined())
|
||||||
|
{
|
||||||
|
LoadingWarning("The defaults for pos= and dist= are going to change, specify them explicitly. See issue #759 (https://git.io/vVBzH)");
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3560,6 +3573,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
if (endTake->immediat)
|
if (endTake->immediat)
|
||||||
m_endTakeImmediat = true;
|
m_endTakeImmediat = true;
|
||||||
m_endTake.push_back(std::move(endTake));
|
m_endTake.push_back(std::move(endTake));
|
||||||
|
|
||||||
|
if (!line->GetParam("pos")->IsDefined() || !line->GetParam("dist")->IsDefined())
|
||||||
|
{
|
||||||
|
LoadingWarning("The defaults for pos= and dist= are going to change, specify them explicitly. See issue #759 (https://git.io/vVBzH)");
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (line->GetCommand() == "EndMissionDelay" && !resetObject)
|
if (line->GetCommand() == "EndMissionDelay" && !resetObject)
|
||||||
|
|
|
@ -13,7 +13,7 @@ for category in $categories; do
|
||||||
if [ ! -d /usr/local/share/games/colobot/levels/$category/chapter00$chapter/$level ]; then continue; fi
|
if [ ! -d /usr/local/share/games/colobot/levels/$category/chapter00$chapter/$level ]; then continue; fi
|
||||||
level=`echo -n $level | cut -d . -f 1 | tail -c 3`
|
level=`echo -n $level | cut -d . -f 1 | tail -c 3`
|
||||||
echo $category$chapter$level
|
echo $category$chapter$level
|
||||||
colobot -runscene $category$chapter$level -scenetest -loglevel warn -headless 2>&1 | grep -v --line-buffered "Colobot starting" | grep -v --line-buffered "Log level changed" | grep -v --line-buffered "Running scene"
|
colobot -runscene $category$chapter$level -scenetest -loglevel warn -headless 2>&1 | grep -vE --line-buffered "Colobot.*starting" | grep -v --line-buffered "Log level changed" | grep -v --line-buffered "Running scene"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue