mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
- Added INI Setting and ability to manually train mobile militia at a cost
- Added INI setting and ability to train veteran militia git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@586 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+42
-10
@@ -1092,21 +1092,43 @@ BOOLEAN BasicCanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Commenting out the check for:
|
||||
// IsMilitiaTrainableFromSoldiersSectorMaxed(
|
||||
// At this point, we don't care if it's full yet
|
||||
|
||||
BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
if( BasicCanCharacterTrainMilitia( pSoldier ) &&
|
||||
|
||||
if (gGameExternalOptions.gfmusttrainroaming)
|
||||
{
|
||||
if( BasicCanCharacterTrainMilitia( pSoldier ) &&
|
||||
MilitiaTrainingAllowedInSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) &&
|
||||
DoesSectorMercIsInHaveSufficientLoyaltyToTrainMilitia( pSoldier ) &&
|
||||
/*( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) == FALSE ) && */
|
||||
( CountMilitiaTrainersInSoldiersSector( pSoldier ) < gGameExternalOptions.ubMaxMilitiaTrainersPerSector ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( BasicCanCharacterTrainMilitia( pSoldier ) &&
|
||||
MilitiaTrainingAllowedInSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) &&
|
||||
DoesSectorMercIsInHaveSufficientLoyaltyToTrainMilitia( pSoldier ) &&
|
||||
( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) == FALSE ) &&
|
||||
( CountMilitiaTrainersInSoldiersSector( pSoldier ) < gGameExternalOptions.ubMaxMilitiaTrainersPerSector ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7372,7 +7394,12 @@ void TrainingMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
}
|
||||
|
||||
if( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) )
|
||||
|
||||
// Kaiden: Roaming Militia Training:
|
||||
// Added to the if test here:
|
||||
// && (!gGameExternalOptions.gfmusttrainroaming)
|
||||
|
||||
if( IsMilitiaTrainableFromSoldiersSectorMaxed( pSoldier ) && (!gGameExternalOptions.gfmusttrainroaming))
|
||||
{
|
||||
if( bTownId == BLANK_SECTOR )
|
||||
{
|
||||
@@ -7388,7 +7415,12 @@ void TrainingMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, NULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ( CountMilitiaTrainersInSoldiersSector( pSoldier ) >= gGameExternalOptions.ubMaxMilitiaTrainersPerSector )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user