From df7cb392c59ff9c270264958e6da4081fc4e3122 Mon Sep 17 00:00:00 2001 From: Flugente Date: Mon, 26 Aug 2013 21:57:19 +0000 Subject: [PATCH] Forbid time compression if hostile civilians or bloodcats are in the sector. Otherwise all travelling squads are delayed over and over again. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6324 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Map Screen Interface Bottom.cpp | 8 ++++++++ Strategic/mapscreen.cpp | 4 ++++ Utils/_ChineseText.cpp | 2 ++ Utils/_DutchText.cpp | 2 ++ Utils/_EnglishText.cpp | 2 ++ Utils/_FrenchText.cpp | 2 ++ Utils/_GermanText.cpp | 2 ++ Utils/_ItalianText.cpp | 2 ++ Utils/_PolishText.cpp | 2 ++ Utils/_RussianText.cpp | 2 ++ Utils/_TaiwaneseText.cpp | 2 ++ 11 files changed, 30 insertions(+) diff --git a/Strategic/Map Screen Interface Bottom.cpp b/Strategic/Map Screen Interface Bottom.cpp index cc006aa8..716e7fe9 100644 --- a/Strategic/Map Screen Interface Bottom.cpp +++ b/Strategic/Map Screen Interface Bottom.cpp @@ -1416,6 +1416,14 @@ BOOLEAN AllowedToTimeCompress( void ) { return FALSE; } + + // Flugente: no time compression if hostile civilians bloodcats are in the current sector. + // Otherwise time progresses, but squad arrivals will be delayed as long as they still exist + if ( HostileCiviliansPresent() || HostileBloodcatsPresent() ) + { + return FALSE; + } + #ifdef JA2UB //if the player hasnt been to the initial sector yet if( !GetSectorFlagStatus( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, 0, SF_HAS_ENTERED_TACTICAL ) ) //7, 8 diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 65b08354..76fe22e1 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -13550,6 +13550,10 @@ void TellPlayerWhyHeCantCompressTime( void ) { DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 28 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback ); } + else if ( HostileCiviliansPresent() || HostileBloodcatsPresent() ) + { + DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 65 ], MAP_SCREEN, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback ); + } } diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 037cff11..ed50bbe1 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -6104,6 +6104,8 @@ STR16 gzLateLocalizedString[] = L"%s多打了1发子弹!", //"%s fires %d more round than intended!", L"你得先关闭物品信息界面!", + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; // HEADROCK HAM 3.5: Added sector name diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index bcc80020..cc4febc6 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -6111,6 +6111,8 @@ STR16 gzLateLocalizedString[] = L"%s fires one more round than intended!", L"You need to close the item description box first!", // TODO.Translate + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; STR16 gzCWStrings[] = diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index ab661c86..b5157c44 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -6104,6 +6104,8 @@ STR16 gzLateLocalizedString[] = L"%s fires one more round than intended!", L"You need to close the item description box first!", + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 }; // HEADROCK HAM 3.5: Added sector name diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index bfd1e3b5..f11bf86e 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -6102,6 +6102,8 @@ STR16 gzLateLocalizedString[] = L"%s tire 1 fois de plus que prévu !", L"You need to close the item description box first!", // TODO.Translate + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; STR16 gzCWStrings[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 4a6d1258..4a17170e 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -5933,6 +5933,8 @@ STR16 gzLateLocalizedString[] = L"%s feuert einen Schuss mehr als beabsichtigt!", L"Sie müssen zuerst das Gegenstandsbeschreibungsfenster schließen!", + + L"Zeitraffer kann nicht betätigt werden - Feindliche Zivilisten/Bloodcats sind im Sektor.", // 65 }; STR16 gzCWStrings[] = diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 5e68aaea..1e5fdb87 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -6097,6 +6097,8 @@ STR16 gzLateLocalizedString[] = L"%s fires one more round than intended!", L"You need to close the item description box first!", // TODO.Translate + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; STR16 gzCWStrings[] = diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 46863d35..d32d87a4 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -6112,6 +6112,8 @@ STR16 gzLateLocalizedString[] = L"%s wystrzelił(a) 1 pocisk(ów) więcej niż to było zamierzone!", L"You need to close the item description box first!", // TODO.Translate + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; STR16 gzCWStrings[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 767e9d2c..e4ee1b25 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -6103,6 +6103,8 @@ STR16 gzLateLocalizedString[] = L"%s выпустил на одну пулю больше!", L"Сперва закрой описание предмета!", + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; // HEADROCK HAM 3.5: Added sector name diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index 626b56dd..2bf88801 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -6114,6 +6114,8 @@ STR16 gzLateLocalizedString[] = L"%s fires one more round than intended!", L"You need to close the item description box first!", // TODO.Translate + + L"Cannot compress time - hostile civilians and/or bloodcats are in this sector.", // 65 // TODO.Translate }; STR16 gzCWStrings[] =