From 2f84d10f070bf66fbb1203b7e74b53675160f09d Mon Sep 17 00:00:00 2001 From: Flugente Date: Mon, 25 Jan 2016 19:25:48 +0000 Subject: [PATCH] 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 --- Tactical/Soldier Control.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index a974abba..f34b3071 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -96,7 +96,8 @@ #include "Queen Command.h" // added by Flugente #include "Town Militia.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 #include "ub_config.h" @@ -18463,6 +18464,10 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc ) if ( this->flags.uiStatusFlags & SOLDIER_VEHICLE || this->ubProfile == NO_PROFILE ) return; + BOOLEAN fShowExactPoints = FALSE; + if ( DEBUG_CHEAT_LEVEL( ) ) + fShowExactPoints = TRUE; + CHAR16 atStr[500]; swprintf( atStr, L"" ); @@ -18470,7 +18475,15 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc ) { if ( this->sDiseaseFlag[i] & SOLDIERDISEASE_DIAGNOSED ) { - swprintf( atStr, L"\n\n%s\n", Disease[i].szFatName ); + 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 ); + } + wcscat( apStr, atStr ); // 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 ); + } } }