Allow specific alert status AI logging

Less clutter in the AI logs if, for example one is only interested in BLACK status decisions
This commit is contained in:
Asdow
2024-02-04 15:29:05 +02:00
parent 7ee8165e02
commit f249406ba0
4 changed files with 225 additions and 223 deletions
+3 -2
View File
@@ -286,14 +286,15 @@ STR16 wszAction[] = {
UINT32 guiAIStartCounter = 0, guiAILastCounter = 0;
//UINT8 gubAISelectedSoldier = NOBODY;
BOOLEAN gfLogsEnabled = TRUE;
bool gLogDecideActionRed = false;
void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, bool doLog, INT8 bAction)
{
FILE* DebugFile;
CHAR8 msg[1024];
CHAR8 buf[1024];
if (!gfLogsEnabled)
if (!gfLogsEnabled || !doLog || pSoldier == nullptr)
return;
memset(buf, 0, 1024 * sizeof(char));
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -33,7 +33,7 @@
#include "Text.h"
extern BOOLEAN gfHiddenInterrupt;
extern void LogDecideInfo(SOLDIERTYPE *pSoldier);
extern void LogDecideInfo(SOLDIERTYPE *pSoldier, bool doLog = true);
extern STR8 gStr8AlertStatus[];
extern STR8 gStr8Attitude[];
+1 -1
View File
@@ -182,7 +182,7 @@ BOOLEAN CanAutoBandage( BOOLEAN fDoFullCheck );
void DebugAI( STR szOutput );
enum { AI_MSG_START, AI_MSG_DECIDE, AI_MSG_INFO, AI_MSG_TOPIC };
void DebugAI(INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction = -1);
void DebugAI(INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, bool doLog = true, INT8 bAction = -1);
void DebugQuestInfo(STR szOutput);
INT8 DecideAction(SOLDIERTYPE *pSoldier);
INT8 DecideActionBlack(SOLDIERTYPE *pSoldier);