fix some compile errors with last commit, remove snapshot version info from HUD and add to intro text instead, add tpt.version.snapshot
This commit is contained in:
parent
908f60d47a
commit
cae8c9e095
@ -29,6 +29,9 @@ static const char *introTextData =
|
||||
#endif
|
||||
"\n"
|
||||
"\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT_PLATFORM " "
|
||||
#ifdef SNAPSHOT
|
||||
"SNAPSHOT " MTOS(SNAPSHOT_ID) " "
|
||||
#endif
|
||||
#ifdef X86
|
||||
"X86 "
|
||||
#endif
|
||||
|
@ -816,11 +816,11 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
||||
json::Number stableMinor = stableVersion["Minor"];
|
||||
json::Number stableBuild = stableVersion["Build"];
|
||||
json::String stableFile = stableVersion["File"];
|
||||
json::String changelog = stableVersion["Changelog"];
|
||||
json::String stableChangelog = stableVersion["Changelog"];
|
||||
if (stableMajor.Value()>SAVE_VERSION || (stableMinor.Value()>MINOR_VERSION && stableMajor.Value()==SAVE_VERSION) || stableBuild.Value()>BUILD_NUM)
|
||||
{
|
||||
updateAvailable = true;
|
||||
updateInfo = UpdateInfo(stableMajor.Value(), stableMinor.Value(), stableBuild.Value(), stableFile.Value(), changelog.Value(), UpdateInfo::Stable);
|
||||
updateInfo = UpdateInfo(stableMajor.Value(), stableMinor.Value(), stableBuild.Value(), stableFile.Value(), stableChangelog.Value(), UpdateInfo::Stable);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -830,11 +830,11 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
||||
json::Number betaMinor = betaVersion["Minor"];
|
||||
json::Number betaBuild = betaVersion["Build"];
|
||||
json::String betaFile = betaVersion["File"];
|
||||
json::String changelog = stableVersion["Changelog"];
|
||||
json::String betaChangelog = betaVersion["Changelog"];
|
||||
if (betaMajor.Value()>SAVE_VERSION || (betaMinor.Value()>MINOR_VERSION && betaMajor.Value()==SAVE_VERSION) || betaBuild.Value()>BUILD_NUM)
|
||||
{
|
||||
updateAvailable = true;
|
||||
updateInfo = UpdateInfo(betaMajor.Value(), betaMinor.Value(), betaBuild.Value(), betaFile.Value(), changelog.Value(), UpdateInfo::Beta);
|
||||
updateInfo = UpdateInfo(betaMajor.Value(), betaMinor.Value(), betaBuild.Value(), betaFile.Value(), betaChangelog.Value(), UpdateInfo::Beta);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -842,11 +842,11 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
||||
json::Object snapshotVersion = versions["Snapshot"];
|
||||
json::Number snapshotSnapshot = snapshotVersion["Snapshot"];
|
||||
json::String snapshotFile = snapshotVersion["File"];
|
||||
json::String changelog = stableVersion["Changelog"];
|
||||
json::String snapshotChangelog = snapshotVersion["Changelog"];
|
||||
if (snapshotSnapshot.Value() > SNAPSHOT_ID)
|
||||
{
|
||||
updateAvailable = true;
|
||||
updateInfo = UpdateInfo(snapshotSnapshot.Value(), snapshotFile.Value(), changelog.Value(), UpdateInfo::Snapshot);
|
||||
updateInfo = UpdateInfo(snapshotSnapshot.Value(), snapshotFile.Value(), snapshotChangelog.Value(), UpdateInfo::Snapshot);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1535,10 +1535,10 @@ void GameController::NotifyUpdateAvailable(Client * sender)
|
||||
std::stringstream updateMessage;
|
||||
updateMessage << "Are you sure you want to run the updater? Please save any changes before updating.\n\nCurrent version:\n ";
|
||||
|
||||
#ifdef BETA
|
||||
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Beta, Build " << BUILD_NUM;
|
||||
#elif defined(SNAPSHOT)
|
||||
#ifdef SNAPSHOT
|
||||
updateMessage << "Snapshot " << SNAPSHOT_ID;
|
||||
#elif defined(BETA)
|
||||
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Beta, Build " << BUILD_NUM;
|
||||
#else
|
||||
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Stable, Build " << BUILD_NUM;
|
||||
#endif
|
||||
|
@ -2358,11 +2358,6 @@ void GameView::OnDraw()
|
||||
//FPS and some version info
|
||||
std::stringstream fpsInfo;
|
||||
fpsInfo.precision(2);
|
||||
#ifdef SNAPSHOT
|
||||
fpsInfo << "Snapshot " << SNAPSHOT_ID << ", ";
|
||||
#elif defined(BETA)
|
||||
fpsInfo << "Beta " << SAVE_VERSION << "." << MINOR_VERSION << "." << BUILD_NUM << ", ";
|
||||
#endif
|
||||
fpsInfo << "FPS: " << std::fixed << ui::Engine::Ref().GetFps();
|
||||
#ifdef DEBUG
|
||||
fpsInfo << " Delta: " << std::fixed << ui::Engine::Ref().GetDelta();
|
||||
|
@ -236,6 +236,12 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
|
||||
lua_setfield(l, tptPropertiesVersion, "minor");
|
||||
lua_pushinteger(l, BUILD_NUM);
|
||||
lua_setfield(l, tptPropertiesVersion, "build");
|
||||
#ifdef SNAPSHOT
|
||||
lua_pushinteger(l, SNAPSHOT_ID);
|
||||
#else
|
||||
lua_pushinteger(l, 0);
|
||||
#endif
|
||||
lua_setfield(l, tptPropertiesVersion, "snapshot");
|
||||
lua_setfield(l, tptProperties, "version");
|
||||
|
||||
lua_sethook(l, &luacon_hook, LUA_MASKCOUNT, 200);
|
||||
|
Reference in New Issue
Block a user