mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user