If the player has no prison and thus has to let his prisoners go, some might volunteer.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7763 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-03-01 00:42:20 +00:00
parent 9d8e5a4c3a
commit 0875a76687
+18 -1
View File
@@ -6709,7 +6709,7 @@ BOOLEAN GetPlayerControlledPrisonList( std::vector<UINT32>& arSectorIDVector )
}
}
return ( arSectorIDVector.size() > 0 );
return ( !arSectorIDVector.empty() );
}
extern INT32 giReinforcementPool;
@@ -6934,6 +6934,23 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, TacticalStr[ PRISONER_DECIDE_STR ], GAME_SCREEN, MSG_BOX_FLAG_GENERIC_EIGHT_BUTTONS, PrisonerMessageBoxCallBack, NULL );
}
// if we control no prison, we have to let them go...
else
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[PRISONER_NO_PRISONS_STR] );
// some prisoners volunteer to work for us
UINT16 volunteers = Random( ubNumPrisoners / 3 );
if ( volunteers )
{
AddVolunteers( volunteers );
// we add the volunteers anyway, but only show the message if this feature is on
if ( gGameExternalOptions.fMilitiaVolunteerPool )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_TURN_VOLUNTEER], volunteers );
}
}
}
}