mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- added more messages
- remaining interrogation points are taken over to the next hour git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5713 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+45
-74
@@ -2614,7 +2614,7 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts
|
|||||||
extern INT32 CalcThreateningEffectiveness( UINT8 ubMerc );
|
extern INT32 CalcThreateningEffectiveness( UINT8 ubMerc );
|
||||||
|
|
||||||
// Flugente: calculate interrogation value
|
// Flugente: calculate interrogation value
|
||||||
FLOAT CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
|
UINT32 CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
|
||||||
{
|
{
|
||||||
UINT32 usInterrogationPoints = 0;
|
UINT32 usInterrogationPoints = 0;
|
||||||
|
|
||||||
@@ -2629,7 +2629,7 @@ FLOAT CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
|
|||||||
|
|
||||||
// no prisoners -> no interrogation (this should not happen)
|
// no prisoners -> no interrogation (this should not happen)
|
||||||
if ( !*pusMaxPts )
|
if ( !*pusMaxPts )
|
||||||
return .0f;
|
return 0;
|
||||||
|
|
||||||
usInterrogationPoints = 50 + 10 * EffectiveExpLevel( pSoldier ) + EffectiveLeadership( pSoldier );
|
usInterrogationPoints = 50 + 10 * EffectiveExpLevel( pSoldier ) + EffectiveLeadership( pSoldier );
|
||||||
|
|
||||||
@@ -2649,7 +2649,7 @@ FLOAT CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: calculate prison guard value
|
// Flugente: calculate prison guard value
|
||||||
FLOAT CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
|
UINT32 CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
|
||||||
{
|
{
|
||||||
// this is not an assignment. Simply being in the sector will allow us to be counted as guards
|
// this is not an assignment. Simply being in the sector will allow us to be counted as guards
|
||||||
UINT32 usValue = 0;
|
UINT32 usValue = 0;
|
||||||
@@ -5480,6 +5480,10 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
if ( !gGameExternalOptions.fAllowPrisonerSystem )
|
if ( !gGameExternalOptions.fAllowPrisonerSystem )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// no underground prisons!
|
||||||
|
if ( bZ )
|
||||||
|
return;
|
||||||
|
|
||||||
// Is there a prison in this sector?
|
// Is there a prison in this sector?
|
||||||
UINT16 prisonerbaselimit = 0;
|
UINT16 prisonerbaselimit = 0;
|
||||||
for (UINT16 cnt = 0; cnt < NUM_FACILITY_TYPES; ++cnt)
|
for (UINT16 cnt = 0; cnt < NUM_FACILITY_TYPES; ++cnt)
|
||||||
@@ -5500,19 +5504,13 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Are there any prisoners in this prison?
|
// Are there any prisoners in this prison?
|
||||||
UINT32 numprisoners = 0;
|
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
||||||
if ( !bZ )
|
|
||||||
{
|
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
|
||||||
|
|
||||||
numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar;
|
UINT32 numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UNDERGROUND_SECTORINFO *pSectorInfo = FindUnderGroundSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
|
||||||
|
|
||||||
numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar;
|
// add interrogation progress from last hour and erase it in data
|
||||||
}
|
UINT32 interrogationpoints = pSectorInfo->uiInterrogationHundredsLeft;
|
||||||
|
pSectorInfo->uiInterrogationHundredsLeft = 0;
|
||||||
|
|
||||||
if ( !numprisoners )
|
if ( !numprisoners )
|
||||||
return;
|
return;
|
||||||
@@ -5522,12 +5520,11 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// loop over all mercs in this sector that are on the FACILITY_INTERROGATE_PRISONERS assignment and determine their interrogation progress
|
// loop over all mercs in this sector that are on the FACILITY_INTERROGATE_PRISONERS assignment and determine their interrogation progress
|
||||||
SOLDIERTYPE *pSoldier = NULL;
|
|
||||||
UINT32 uiCnt=0;
|
|
||||||
UINT8 numinterrogators = 0;
|
UINT8 numinterrogators = 0;
|
||||||
FLOAT interrogationpoints = .0f;
|
|
||||||
|
|
||||||
// count any interrogators found here, and sum up their interrogation values
|
// count any interrogators found here, and sum up their interrogation values
|
||||||
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
UINT32 uiCnt=0;
|
||||||
for ( uiCnt = 0, pSoldier = MercPtrs[ uiCnt ]; uiCnt <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++uiCnt, ++pSoldier)
|
for ( uiCnt = 0, pSoldier = MercPtrs[ uiCnt ]; uiCnt <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++uiCnt, ++pSoldier)
|
||||||
{
|
{
|
||||||
if( pSoldier->bActive && ( pSoldier->sSectorX == sMapX ) && ( pSoldier->sSectorY == sMapY ) && ( pSoldier->bSectorZ == bZ) )
|
if( pSoldier->bActive && ( pSoldier->sSectorX == sMapX ) && ( pSoldier->sSectorY == sMapY ) && ( pSoldier->bSectorZ == bZ) )
|
||||||
@@ -5550,6 +5547,10 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
// TODO: for now, we lose the remaining points
|
// TODO: for now, we lose the remaining points
|
||||||
UINT32 prisonersinterrogated = interrogationpoints / 100;
|
UINT32 prisonersinterrogated = interrogationpoints / 100;
|
||||||
|
|
||||||
|
// the part that gets left behind is saved to the map (but not the part that gets lost due to there not being enough prisoners)
|
||||||
|
interrogationpoints -= prisonersinterrogated * 100;
|
||||||
|
pSectorInfo->uiInterrogationHundredsLeft = (UINT8)(interrogationpoints);
|
||||||
|
|
||||||
if ( prisonersinterrogated > numprisoners )
|
if ( prisonersinterrogated > numprisoners )
|
||||||
prisonersinterrogated = numprisoners;
|
prisonersinterrogated = numprisoners;
|
||||||
|
|
||||||
@@ -5676,26 +5677,11 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove interrogated prisoners...
|
// remove interrogated prisoners...
|
||||||
if ( !bZ )
|
// safety first...
|
||||||
{
|
if ( prisonersinterrogated > pSectorInfo->uiNumberOfPrisonersOfWar )
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
||||||
|
|
||||||
// safety first...
|
|
||||||
if ( prisonersinterrogated > pSectorInfo->uiNumberOfPrisonersOfWar )
|
|
||||||
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
|
||||||
else
|
|
||||||
pSectorInfo->uiNumberOfPrisonersOfWar -= prisonersinterrogated;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
pSectorInfo->uiNumberOfPrisonersOfWar -= prisonersinterrogated;
|
||||||
UNDERGROUND_SECTORINFO *pSectorInfo = FindUnderGroundSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
|
||||||
|
|
||||||
// safety first...
|
|
||||||
if ( prisonersinterrogated > pSectorInfo->uiNumberOfPrisonersOfWar )
|
|
||||||
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
|
||||||
else
|
|
||||||
pSectorInfo->uiNumberOfPrisonersOfWar -= prisonersinterrogated;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flugente: prisons can riot if there aren't enough guards around
|
// Flugente: prisons can riot if there aren't enough guards around
|
||||||
@@ -5704,6 +5690,10 @@ void HandlePrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
if ( !gGameExternalOptions.fAllowPrisonerSystem )
|
if ( !gGameExternalOptions.fAllowPrisonerSystem )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// no underground prisons!
|
||||||
|
if ( bZ )
|
||||||
|
return;
|
||||||
|
|
||||||
BOOLEAN fBeginRiot = FALSE;
|
BOOLEAN fBeginRiot = FALSE;
|
||||||
|
|
||||||
// Is there a prison in this sector?
|
// Is there a prison in this sector?
|
||||||
@@ -5726,44 +5716,38 @@ void HandlePrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Are there any prisoners in this prison?
|
// Are there any prisoners in this prison?
|
||||||
UINT32 numprisoners = 0;
|
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
|
||||||
if ( !bZ )
|
|
||||||
{
|
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
|
||||||
|
|
||||||
numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar;
|
UINT32 numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UNDERGROUND_SECTORINFO *pSectorInfo = FindUnderGroundSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
|
||||||
|
|
||||||
numprisoners = pSectorInfo->uiNumberOfPrisonersOfWar;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !numprisoners )
|
if ( !numprisoners )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CHAR16 wSectorName[ 64 ];
|
||||||
|
GetShortSectorString( sMapX, sMapY, wSectorName );
|
||||||
|
|
||||||
// if sector is not under our control, the prisoners are added to the local garrison
|
// if sector is not under our control, the prisoners are added to the local garrison
|
||||||
if( !bZ && StrategicMap[ sMapX + sMapY * MAP_WORLD_X ].fEnemyControlled == TRUE )
|
if( StrategicMap[ sMapX + sMapY * MAP_WORLD_X ].fEnemyControlled == TRUE )
|
||||||
{
|
{
|
||||||
// add enemies
|
// add enemies
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
|
||||||
|
|
||||||
pSectorInfo->ubNumTroops += numprisoners;
|
pSectorInfo->ubNumTroops += numprisoners;
|
||||||
|
|
||||||
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_ARMY_FREED_PRISON], wSectorName );
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if sector not under our control, has enemies in it, or is currently in combat mode
|
// if sector not under our control, has enemies in it, or is currently in combat mode
|
||||||
if (!SectorOursAndPeaceful( sMapX, sMapY, bZ ))
|
if (!SectorOursAndPeaceful( sMapX, sMapY, bZ ))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// loop over all mercs in this sector that are on the FACILITY_INTERROGATE_PRISONERS assignment and determine their interrogation progress
|
// loop over all mercs in this sector that are on the FACILITY_INTERROGATE_PRISONERS assignment and add up their interrogation values
|
||||||
SOLDIERTYPE *pSoldier = NULL;
|
|
||||||
UINT32 uiCnt = 0;
|
|
||||||
UINT8 numprisonguards = 0;
|
UINT8 numprisonguards = 0;
|
||||||
FLOAT prisonguardvalue = .0f;
|
UINT32 prisonguardvalue = 0;
|
||||||
|
|
||||||
// count any interrogators found here, and sum up their interrogation values
|
// count any interrogators found here, and sum up their interrogation values
|
||||||
|
SOLDIERTYPE *pSoldier = NULL;
|
||||||
|
UINT32 uiCnt = 0;
|
||||||
UINT32 firstid = gTacticalStatus.Team[ OUR_TEAM ].bFirstID;
|
UINT32 firstid = gTacticalStatus.Team[ OUR_TEAM ].bFirstID;
|
||||||
UINT32 lastid = gTacticalStatus.Team[ OUR_TEAM ].bLastID;
|
UINT32 lastid = gTacticalStatus.Team[ OUR_TEAM ].bLastID;
|
||||||
for ( uiCnt = firstid, pSoldier = MercPtrs[ uiCnt ]; uiCnt <= lastid; ++uiCnt, ++pSoldier)
|
for ( uiCnt = firstid, pSoldier = MercPtrs[ uiCnt ]; uiCnt <= lastid; ++uiCnt, ++pSoldier)
|
||||||
@@ -5776,45 +5760,32 @@ void HandlePrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
|||||||
prisonguardvalue += CalculatePrisonGuardValue(pSoldier, &tmp );
|
prisonguardvalue += CalculatePrisonGuardValue(pSoldier, &tmp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// add militia strength
|
|
||||||
if ( !bZ )
|
|
||||||
{
|
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
|
||||||
|
|
||||||
prisonguardvalue += 100 * pSectorInfo->ubNumberOfCivsAtLevel[ GREEN_MILITIA ] + 150 * pSectorInfo->ubNumberOfCivsAtLevel[ REGULAR_MILITIA ] + 200 * pSectorInfo->ubNumberOfCivsAtLevel[ ELITE_MILITIA ];
|
// add militia strength
|
||||||
}
|
prisonguardvalue += 100 * pSectorInfo->ubNumberOfCivsAtLevel[ GREEN_MILITIA ] + 150 * pSectorInfo->ubNumberOfCivsAtLevel[ REGULAR_MILITIA ] + 200 * pSectorInfo->ubNumberOfCivsAtLevel[ ELITE_MILITIA ];
|
||||||
else
|
|
||||||
{
|
|
||||||
// there are no underground prisons, so screw this...
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !numprisonguards )
|
if ( !numprisonguards )
|
||||||
fBeginRiot = TRUE;
|
fBeginRiot = TRUE;
|
||||||
|
|
||||||
// we now have to determine the combined strength of the prisoners
|
// we now have to determine the combined strength of the prisoners
|
||||||
FLOAT prisonerriotvalue = .0f;
|
UINT32 prisonerriotvalue = 0;
|
||||||
for ( UINT32 i = 0; i < numprisoners; ++i )
|
for ( UINT32 i = 0; i < numprisoners; ++i )
|
||||||
{
|
{
|
||||||
prisonerriotvalue += 100.0f;
|
prisonerriotvalue += 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( prisonerriotvalue > prisonguardvalue )
|
if ( prisonerriotvalue > prisonguardvalue )
|
||||||
{
|
{
|
||||||
if ( numprisoners > prisonerbaselimit && Random( (UINT32)(prisonerriotvalue) ) > Random( (UINT32)(prisonguardvalue) ) )
|
if ( numprisoners > prisonerbaselimit && Random( prisonerriotvalue ) > Random( prisonguardvalue ) )
|
||||||
fBeginRiot = TRUE;
|
fBeginRiot = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fBeginRiot )
|
if ( fBeginRiot )
|
||||||
{
|
{
|
||||||
// add enemies
|
// add enemies
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
|
||||||
|
|
||||||
pSectorInfo->ubNumTroops += numprisoners;
|
pSectorInfo->ubNumTroops += numprisoners;
|
||||||
|
|
||||||
CHAR16 zShortTownIDString[ 50 ];
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_RIOT], wSectorName );
|
||||||
GetShortSectorString( sMapX, sMapX, zShortTownIDString );
|
|
||||||
|
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_RIOT], zShortTownIDString );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -191,8 +191,8 @@ UINT16 CalculateHealingPointsForDoctor(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts,
|
|||||||
UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts, BOOLEAN fMakeSureKitIsInHand );
|
UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts, BOOLEAN fMakeSureKitIsInHand );
|
||||||
|
|
||||||
// Flugente: calculate interrogation and prison guard values
|
// Flugente: calculate interrogation and prison guard values
|
||||||
FLOAT CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts );
|
UINT32 CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts );
|
||||||
FLOAT CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts );
|
UINT32 CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts );
|
||||||
|
|
||||||
// get bonus tarining pts due to an instructor for this student
|
// get bonus tarining pts due to an instructor for this student
|
||||||
// HEADROCK HAM 3.5: Three functions below have lost an argument which is no longer required ("uiAtGunRange", which was "uiAtFacility" in HAM 3.4)
|
// HEADROCK HAM 3.5: Three functions below have lost an argument which is no longer required ("uiAtGunRange", which was "uiAtFacility" in HAM 3.4)
|
||||||
|
|||||||
@@ -480,8 +480,9 @@ typedef struct SECTORINFO
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
UINT32 uiNumberOfPrisonersOfWar;
|
UINT32 uiNumberOfPrisonersOfWar;
|
||||||
|
UINT8 uiInterrogationHundredsLeft;
|
||||||
|
|
||||||
INT8 bPadding[ 37 ];
|
INT8 bPadding[ 36 ];
|
||||||
|
|
||||||
}SECTORINFO;
|
}SECTORINFO;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2408,7 +2408,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
|||||||
case FACILITY_INTERROGATE_PRISONERS:
|
case FACILITY_INTERROGATE_PRISONERS:
|
||||||
sIconIndex = 23;
|
sIconIndex = 23;
|
||||||
fDoIcon = TRUE;
|
fDoIcon = TRUE;
|
||||||
sPtsAvailable = (INT16)( CalculateInterrogationValue(pSoldier, &usMaximumPts ) ) / 100;
|
sPtsAvailable = (INT16)( CalculateInterrogationValue(pSoldier, &usMaximumPts )/100 );
|
||||||
fShowNumber = TRUE;
|
fShowNumber = TRUE;
|
||||||
fShowMaximum = TRUE;
|
fShowMaximum = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+30
-14
@@ -6674,11 +6674,18 @@ extern INT32 giReinforcementPool;
|
|||||||
|
|
||||||
void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
||||||
{
|
{
|
||||||
|
if (ubExitValue == MSG_BOX_RETURN_NO)
|
||||||
|
{
|
||||||
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_RELEASED] );
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 prisonerstobemoved = 0;
|
||||||
|
BOOLEAN success = FALSE;
|
||||||
if ( !gbWorldSectorZ )
|
if ( !gbWorldSectorZ )
|
||||||
{
|
{
|
||||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ] );
|
||||||
|
|
||||||
UINT32 prisonerstobemoved = pSectorInfo->uiNumberOfPrisonersOfWar;
|
prisonerstobemoved = pSectorInfo->uiNumberOfPrisonersOfWar;
|
||||||
|
|
||||||
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
||||||
|
|
||||||
@@ -6690,21 +6697,23 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
SECTORINFO *pPrisonSectorInfo = &( SectorInfo[ uSectorID ] );
|
SECTORINFO *pPrisonSectorInfo = &( SectorInfo[ uSectorID ] );
|
||||||
|
|
||||||
if ( pPrisonSectorInfo )
|
if ( pPrisonSectorInfo )
|
||||||
|
{
|
||||||
|
success = TRUE;
|
||||||
|
|
||||||
pPrisonSectorInfo->uiNumberOfPrisonersOfWar += prisonerstobemoved;
|
pPrisonSectorInfo->uiNumberOfPrisonersOfWar += prisonerstobemoved;
|
||||||
|
|
||||||
|
CHAR16 wString[ 64 ];
|
||||||
|
GetShortSectorString( gWorldSectorX, gWorldSectorY, wString );
|
||||||
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], wString );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// send some prisoners back to queen's pool
|
|
||||||
// there is a chance that escaped prisoners may return to the queen...
|
|
||||||
giReinforcementPool += (prisonerstobemoved * gGameExternalOptions.ubPrisonerReturntoQueenChance) / 100;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UNDERGROUND_SECTORINFO *pSectorInfo = FindUnderGroundSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
UNDERGROUND_SECTORINFO *pSectorInfo = FindUnderGroundSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||||
|
|
||||||
UINT32 prisonerstobemoved = pSectorInfo->uiNumberOfPrisonersOfWar;
|
prisonerstobemoved = pSectorInfo->uiNumberOfPrisonersOfWar;
|
||||||
|
|
||||||
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
pSectorInfo->uiNumberOfPrisonersOfWar = 0;
|
||||||
|
|
||||||
@@ -6716,16 +6725,23 @@ void PrisonerMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
SECTORINFO *pPrisonSectorInfo = &( SectorInfo[ uSectorID ] );
|
SECTORINFO *pPrisonSectorInfo = &( SectorInfo[ uSectorID ] );
|
||||||
|
|
||||||
if ( pPrisonSectorInfo )
|
if ( pPrisonSectorInfo )
|
||||||
|
{
|
||||||
|
success = TRUE;
|
||||||
|
|
||||||
pPrisonSectorInfo->uiNumberOfPrisonersOfWar += prisonerstobemoved;
|
pPrisonSectorInfo->uiNumberOfPrisonersOfWar += prisonerstobemoved;
|
||||||
|
|
||||||
|
CHAR16 wString[ 64 ];
|
||||||
|
GetShortSectorString( gWorldSectorX, gWorldSectorY, wString );
|
||||||
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szPrisonerTextStr[STR_PRISONER_SENTTOSECTOR], wString );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// send some prisoners back to queen's pool
|
|
||||||
// there is a chance that escaped prisoners may return to the queen...
|
|
||||||
giReinforcementPool += (prisonerstobemoved * gGameExternalOptions.ubPrisonerReturntoQueenChance) / 100;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !success )
|
||||||
|
// send some prisoners back to queen's pool
|
||||||
|
// there is a chance that escaped prisoners may return to the queen...
|
||||||
|
giReinforcementPool += (prisonerstobemoved * gGameExternalOptions.ubPrisonerReturntoQueenChance) / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||||
|
|||||||
@@ -735,6 +735,9 @@ enum
|
|||||||
STR_PRISONER_DETECTION,
|
STR_PRISONER_DETECTION,
|
||||||
STR_PRISONER_TURN_MILITIA,
|
STR_PRISONER_TURN_MILITIA,
|
||||||
STR_PRISONER_RIOT,
|
STR_PRISONER_RIOT,
|
||||||
|
STR_PRISONER_SENTTOSECTOR,
|
||||||
|
STR_PRISONER_RELEASED,
|
||||||
|
STR_PRISONER_ARMY_FREED_PRISON,
|
||||||
|
|
||||||
TEXT_NUM_PRISONER_STR
|
TEXT_NUM_PRISONER_STR
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7494,6 +7494,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //CHINESE
|
#endif //CHINESE
|
||||||
|
|||||||
@@ -7487,6 +7487,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //DUTCH
|
#endif //DUTCH
|
||||||
|
|||||||
@@ -7474,6 +7474,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //ENGLISH
|
#endif //ENGLISH
|
||||||
|
|||||||
@@ -7461,6 +7461,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //FRENCH
|
#endif //FRENCH
|
||||||
|
|||||||
@@ -7294,14 +7294,16 @@ STR16 szFoodTextStr[]=
|
|||||||
L"Sectorwide canteen filling not possible, Food System is off!"
|
L"Sectorwide canteen filling not possible, Food System is off!"
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO.Translate
|
|
||||||
STR16 szPrisonerTextStr[]=
|
STR16 szPrisonerTextStr[]=
|
||||||
{
|
{
|
||||||
L"%d prisoners were interrogated.",
|
L"%d Gefangenge wurden verhört.",
|
||||||
L"%d prisoners paid ransom money.",
|
L"%d Gefangene wurden gegen Lösegeld freigelassen.",
|
||||||
L"%d prisoners revealed enemy positions.",
|
L"%d Gefangene haben uns Truppenstandorte verraten.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d Gefangene schliessen sich uns an.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Gefangenenaufstand in %s!",
|
||||||
|
L"Gefangene wurden nach %s geschickt!",
|
||||||
|
L"Gefangene freigelassen!",
|
||||||
|
L"Die Armee hat das Gefängnis in %s besetzt, die Gefangenen wurden befreit!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //GERMAN
|
#endif //GERMAN
|
||||||
|
|||||||
@@ -7474,6 +7474,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //ITALIAN
|
#endif //ITALIAN
|
||||||
|
|||||||
@@ -7488,6 +7488,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //POLISH
|
#endif //POLISH
|
||||||
|
|||||||
@@ -7440,6 +7440,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //RUSSIAN
|
#endif //RUSSIAN
|
||||||
|
|||||||
@@ -7491,6 +7491,9 @@ STR16 szPrisonerTextStr[]=
|
|||||||
L"%d prisoners revealed enemy positions.",
|
L"%d prisoners revealed enemy positions.",
|
||||||
L"%d prisoners joined our cause.",
|
L"%d prisoners joined our cause.",
|
||||||
L"Prisoners start a massive riot in %s!",
|
L"Prisoners start a massive riot in %s!",
|
||||||
|
L"Prisoners were sent to %s!",
|
||||||
|
L"Prisoners have been released!",
|
||||||
|
L"The army now occupies the prison in %s, the prisoners were freed!",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //TAIWANESE
|
#endif //TAIWANESE
|
||||||
|
|||||||
Reference in New Issue
Block a user