If cheats or debug mode are active, the exact amount of disease points is described for each active disease.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8036 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-01-25 19:25:48 +00:00
parent 811f18009f
commit 2f84d10f07
+18
View File
@@ -97,6 +97,7 @@
#include "Town Militia.h" // added by Flugente #include "Town Militia.h" // added by Flugente
#include "Auto Bandage.h" // added by Flugente #include "Auto Bandage.h" // added by Flugente
#include "Facilities.h" // added by Flugente #include "Facilities.h" // added by Flugente
#include "Cheats.h" // added by Flugente
#endif #endif
#include "ub_config.h" #include "ub_config.h"
@@ -18463,14 +18464,26 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc )
if ( this->flags.uiStatusFlags & SOLDIER_VEHICLE || this->ubProfile == NO_PROFILE ) if ( this->flags.uiStatusFlags & SOLDIER_VEHICLE || this->ubProfile == NO_PROFILE )
return; return;
BOOLEAN fShowExactPoints = FALSE;
if ( DEBUG_CHEAT_LEVEL( ) )
fShowExactPoints = TRUE;
CHAR16 atStr[500]; CHAR16 atStr[500];
swprintf( atStr, L"" ); swprintf( atStr, L"" );
for ( int i = 0; i < NUM_DISEASES; ++i ) for ( int i = 0; i < NUM_DISEASES; ++i )
{ {
if ( this->sDiseaseFlag[i] & SOLDIERDISEASE_DIAGNOSED ) if ( this->sDiseaseFlag[i] & SOLDIERDISEASE_DIAGNOSED )
{
if ( fShowExactPoints )
{
swprintf( atStr, L"\n\n%s (undiagnosed) - %d / %d\n", Disease[i].szFatName, this->sDiseasePoints[i], Disease[i].sInfectionPtsFull );
}
else
{ {
swprintf( atStr, L"\n\n%s\n", Disease[i].szFatName ); swprintf( atStr, L"\n\n%s\n", Disease[i].szFatName );
}
wcscat( apStr, atStr ); wcscat( apStr, atStr );
// if we give a full description, also print out the effects at the moment // if we give a full description, also print out the effects at the moment
@@ -18563,6 +18576,11 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc )
} }
} }
} }
else if ( fShowExactPoints && this->sDiseasePoints[i] > 0 )
{
swprintf( atStr, L"\n\n%s (undiagnosed) - %d / %d\n", Disease[i].szFatName, this->sDiseasePoints[i], Disease[i].sInfectionPtsFull );
wcscat( apStr, atStr );
}
} }
} }