mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
New Feature: Militia Volunteer Pool limits the number of militia we can train. Turned off by default.
GameDir >= r2210 is recommended. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7746 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1412,6 +1412,10 @@ BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
AssertNotNIL(pSoldier);
|
||||
|
||||
// Flugente: militia volunteer pool
|
||||
if ( !GetVolunteerPool() )
|
||||
return FALSE;
|
||||
|
||||
// Make sure the basic sector/merc variables are still applicable. This is simply a fail-safe.
|
||||
if( !BasicCanCharacterTrainMilitia( pSoldier ) )
|
||||
{
|
||||
@@ -2480,6 +2484,9 @@ void UpdateAssignments()
|
||||
// reset scan flags in all sectors
|
||||
ClearSectorScanResults();
|
||||
|
||||
// update militia volunteer count
|
||||
UpdateVolunteers();
|
||||
|
||||
// run through sectors and handle each type in sector
|
||||
for(sX = 0 ; sX < MAP_WORLD_X; ++sX )
|
||||
{
|
||||
@@ -18375,6 +18382,13 @@ BOOLEAN CanCharacterTrainMilitiaWithErrorReport( SOLDIERTYPE *pSoldier )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if ( !GetVolunteerPool() )
|
||||
{
|
||||
swprintf( sString, L"There are no volunteers for militia left!" );
|
||||
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, NULL );
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if ( 100 <= GetMobileMilitiaQuota( TRUE ) )
|
||||
return ( FALSE );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user