New feature: mines require workers for maximum income, these can be trained like militia.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8267 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-07-04 22:31:37 +00:00
parent ce6e63831d
commit 951da7812d
26 changed files with 460 additions and 9 deletions
+13
View File
@@ -535,6 +535,19 @@ INT32 GetAvailableWorkForceForMineForPlayer( INT8 bMineIndex )
iWorkForceSize *= GetTownSectorsUnderControl( bTownId );
iWorkForceSize /= GetTownSectorSize( bTownId );
// Flugente: workforce
if ( gGameExternalOptions.fMineRequiresWorkers )
{
UINT16 maxworkforce = 0;
UINT16 workforce = GetTownWorkers( bTownId, maxworkforce);
if ( maxworkforce > 0 )
{
iWorkForceSize *= workforce;
iWorkForceSize /= maxworkforce;
}
}
return ( iWorkForceSize );
}