src/game/Strategic/Town_Militia.cc
static void PayMilitiaTrainingYesNoBoxCallback(MessageBoxReturnValue const bExitValue)
{
	Assert( giTotalCostOfTraining > 0 );

	// yes
	if( bExitValue == MSG_BOX_RETURN_YES )
	{
		// does the player have enough
		if( LaptopSaveInfo.iCurrentBalance >= giTotalCostOfTraining )
		{
			if( gfYesNoPromptIsForContinue )
			{
				ContinueTrainingInThisSector();
			}
			else
			{
				StartTrainingInAllUnpaidTrainableSectors();
			}

			// this completes the training prompt sequence
			pMilitiaTrainerSoldier = NULL;
		}
		else	// can't afford it
		{
			StopTimeCompression();
			DoMapMessageBox(MSG_BOX_BASIC_STYLE, pMilitiaConfirmStrings[2], MAP_SCREEN, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback);
		}
	}
	else if( bExitValue == MSG_BOX_RETURN_NO )
	{
		StopTimeCompression();

		MilitiaTrainingRejected();
	}
}
// IMPORTANT: This same callback is used both for initial training and for continue training prompt
// use 'gfYesNoPromptIsForContinue' flag to tell them apart
This same callback is used both for initial training and for continue training prompt
use 'gfYesNoPromptIsForContinue' flag to tell them apart
This same callback is used both for initial training and for continue training prompt use ' gfYesNoPromptIsForContinue ' flag to tell them apart
static void PayMilitiaTrainingYesNoBoxCallback(MessageBoxReturnValue const bExitValue)
{
	Assert( giTotalCostOfTraining > 0 );
	if( bExitValue == MSG_BOX_RETURN_YES )
	{
		if( LaptopSaveInfo.iCurrentBalance >= giTotalCostOfTraining )
		{
			if( gfYesNoPromptIsForContinue )
			{
				ContinueTrainingInThisSector();
			}
			else
			{
				StartTrainingInAllUnpaidTrainableSectors();
			}
			pMilitiaTrainerSoldier = NULL;
		}
		else	
		{
			StopTimeCompression();
			DoMapMessageBox(MSG_BOX_BASIC_STYLE, pMilitiaConfirmStrings[2], MAP_SCREEN, MSG_BOX_FLAG_OK, CantTrainMilitiaOkBoxCallback);
		}
	}
	else if( bExitValue == MSG_BOX_RETURN_NO )
	{
		StopTimeCompression();
		MilitiaTrainingRejected();
	}
}
static void PayMilitiaTrainingYesNoBoxCallback ( MessageBoxReturnValue const bExitValue ) { Assert ( giTotalCostOfTraining > 0 ) ; if ( bExitValue == MSG_BOX_RETURN_YES ) { if ( LaptopSaveInfo . iCurrentBalance >= giTotalCostOfTraining ) { if ( gfYesNoPromptIsForContinue ) { ContinueTrainingInThisSector ( ) ; } else { StartTrainingInAllUnpaidTrainableSectors ( ) ; } pMilitiaTrainerSoldier = NULL ; } else { StopTimeCompression ( ) ; DoMapMessageBox ( MSG_BOX_BASIC_STYLE , pMilitiaConfirmStrings [ 2 ] , MAP_SCREEN , MSG_BOX_FLAG_OK , CantTrainMilitiaOkBoxCallback ) ; } } else if ( bExitValue == MSG_BOX_RETURN_NO ) { StopTimeCompression ( ) ; MilitiaTrainingRejected ( ) ; } }
IMPORTANT: This same callback is used both for initial training and for continue training prompt
use 'gfYesNoPromptIsForContinue' flag to tell them apart
IMPORTANT : This same callback is used both for initial training and for continue training prompt use ' gfYesNoPromptIsForContinue ' flag to tell them apart
// yes // does the player have enough // this completes the training prompt sequence // can't afford it