Merged from revision: 7132

Enhancements (by Buggler)
- Dynamic tactical squad hotkeys only take into account squads present in sector; freed back 11-20 tactical squad hotkeys as 10 dynamic squad hotkeys would be sufficient (thanks to Sevenfm)
- Externalized 'blinded by blast' hardcoded text 

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7133 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-04-06 14:26:49 +00:00
parent f13a096f1e
commit 9c7e84a81b
12 changed files with 56 additions and 25 deletions
+43 -22
View File
@@ -2174,8 +2174,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
if ( gusSelectedSoldier != NOBODY ) if ( gusSelectedSoldier != NOBODY )
{ {
// only allow if nothing in hand and if in SM panel, the Change Squad button must be enabled // only allow if nothing in hand and if in SM panel, the Change Squad button must be enabled
if ( if ( ( ( gsCurInterfacePanel != TEAM_PANEL ) || ( ButtonList[ iTEAMPanelButtons[ CHANGE_SQUAD_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) )
( ( gsCurInterfacePanel != TEAM_PANEL ) || ( ButtonList[ iTEAMPanelButtons[ CHANGE_SQUAD_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) )
{ {
//Select next squad //Select next squad
iCurrentSquad = CurrentSquad( ); iCurrentSquad = CurrentSquad( );
@@ -2193,7 +2192,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( pNewSoldier->bAssignment + 1 ) ); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( pNewSoldier->bAssignment + 1 ) );
// Center to guy.... // Center to guy....
LocateSoldier( gusSelectedSoldier, SETLOCATOR ); //LocateSoldier( gusSelectedSoldier, SETLOCATOR );
} }
} }
} }
@@ -2557,8 +2556,6 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
HandleTacticalTakeInvItem( gGameExternalOptions.iQuickItem4 ); HandleTacticalTakeInvItem( gGameExternalOptions.iQuickItem4 );
} }
} }
else if( fCtrl ) //remapped squad 14 to here
ChangeCurrentSquad( 13 );
else else
ChangeCurrentSquad( 3 ); ChangeCurrentSquad( 3 );
@@ -2594,7 +2591,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
} }
else else
{ {
ChangeCurrentSquad( 5 ); ChangeCurrentSquad( 5 );
} }
break; break;
@@ -2643,15 +2640,12 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
break; break;
case '!': case '!':
ChangeCurrentSquad( 10 );
break; break;
case '@': case '@':
ChangeCurrentSquad( 11 );
break; break;
case '#': case '#':
ChangeCurrentSquad( 12 );
break; break;
case '$': case '$':
@@ -2666,19 +2660,15 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
TraitsMenu(usMapPos); TraitsMenu(usMapPos);
} }
} }
//ChangeCurrentSquad( 13 );
break; break;
case '%': case '%':
ChangeCurrentSquad( 14 );
break; break;
case '^': case '^':
ChangeCurrentSquad( 15 );
break; break;
case '&': case '&':
ChangeCurrentSquad( 16 );
break; break;
case '*': case '*':
@@ -2693,16 +2683,12 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
gTacticalStatus.uiFlags |= RED_ITEM_GLOW_ON; gTacticalStatus.uiFlags |= RED_ITEM_GLOW_ON;
} }
} }
else
ChangeCurrentSquad( 17 );
break; break;
case '(': case '(':
ChangeCurrentSquad( 18 );
break; break;
case ')': case ')':
ChangeCurrentSquad( 19 );
break; break;
case 'x': case 'x':
@@ -2755,14 +2741,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
else if ( fCtrl ) // The_Bob - real time sneaking, 01-06-09 else if ( fCtrl ) // The_Bob - real time sneaking, 01-06-09
{ {
HandleTBEnterTurnbased(); HandleTBEnterTurnbased();
} }
break; break;
// The_Bob - real time sneaking, 01-06-09 // The_Bob - real time sneaking, 01-06-09
case 'X': // shift-ctrl-x: toggle real time sneaking case 'X': // shift-ctrl-x: toggle real time sneaking
if ( fCtrl ) if ( fCtrl )
{ {
HandleTBToggleSneak(); HandleTBToggleSneak();
} }
break; break;
case '/': case '/':
@@ -5711,11 +5697,46 @@ void ChangeCurrentSquad( INT32 iSquad )
if ( ( gpItemPointer == NULL ) && !gfDisableTacticalPanelButtons && if ( ( gpItemPointer == NULL ) && !gfDisableTacticalPanelButtons &&
( ( gsCurInterfacePanel != TEAM_PANEL ) || ( ButtonList[ iTEAMPanelButtons[ CHANGE_SQUAD_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) ) ( ( gsCurInterfacePanel != TEAM_PANEL ) || ( ButtonList[ iTEAMPanelButtons[ CHANGE_SQUAD_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) )
{ {
if ( IsSquadOnCurrentTacticalMap( iSquad ) ) INT32 cnt, cnt2, iCurrentSquad;
INT32 cnt3 = -1;
// Buggler: dynamic tactical squad hotkey assignments only take into account squads present in sector
//find the actual squad ID present in tactical map
for( cnt = 0 ; cnt < NUMBER_OF_SQUADS; cnt++ )
{
for( cnt2 = 0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
{
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) && !(Squad[ cnt ][ cnt2 ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
{
cnt3++;
break;
}
}
if ( iSquad == cnt3 )
break;
}
if ( IsSquadOnCurrentTacticalMap( cnt ) )
{ {
//resort the squad in case the order has, for any reason, changed //resort the squad in case the order has, for any reason, changed
SortSquadByID((INT8)iSquad); SortSquadByID( (INT8)cnt );
SetCurrentSquad( iSquad, FALSE );
iCurrentSquad = CurrentSquad( );
if ( cnt != iCurrentSquad )
{
//set active squad
SetCurrentSquad( cnt, FALSE );
if ( gGameExternalOptions.fUseXMLSquadNames && cnt < ON_DUTY )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], SquadNames[ cnt ].squadname );
else
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( cnt + 1 ) );
ErasePath( TRUE );
gfPlotNewMovement = TRUE;
}
} }
} }
} }
+1 -1
View File
@@ -1845,7 +1845,7 @@ BOOLEAN DamageSoldierFromBlast( UINT8 ubPerson, UINT8 ubOwner, INT32 sBombGridNo
if (pSoldier->bBlindedCounter < ubStatLoss ) if (pSoldier->bBlindedCounter < ubStatLoss )
{ {
pSoldier->bBlindedCounter = ubStatLoss ; pSoldier->bBlindedCounter = ubStatLoss ;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s was blinded by the blast!", pSoldier->GetName() ); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_BLINDED_BY_BLAST], pSoldier->GetName() );
} }
} }
// SANDRO - new merc records - times stat damaged // SANDRO - new merc records - times stat damaged
+1
View File
@@ -2424,6 +2424,7 @@ enum
MSG113_SURGERY_FINISHED, MSG113_SURGERY_FINISHED,
MSG113_LOSES_ONE_POINT_MAX_HEALTH, MSG113_LOSES_ONE_POINT_MAX_HEALTH,
MSG113_LOSES_X_POINTS_MAX_HEALTH, MSG113_LOSES_X_POINTS_MAX_HEALTH,
MSG113_BLINDED_BY_BLAST,
MSG113_REGAINED_ONE_POINTS_OF_STAT, MSG113_REGAINED_ONE_POINTS_OF_STAT,
MSG113_REGAINED_X_POINTS_OF_STATS, MSG113_REGAINED_X_POINTS_OF_STATS,
MSG113_ENEMY_AMBUSH_PREVENTED, MSG113_ENEMY_AMBUSH_PREVENTED,
+1
View File
@@ -6613,6 +6613,7 @@ STR16 New113Message[] =
L"%s 手术完毕。",// L"Surgery on %s finished.", L"%s 手术完毕。",// L"Surgery on %s finished.",
L"%s 胸部中弹,失去1点生命上限!",// L"%s is hit in the chest and loses a point of maximum health!", L"%s 胸部中弹,失去1点生命上限!",// L"%s is hit in the chest and loses a point of maximum health!",
L"%s 胸部中弹,失去 %d 点生命上限!",// L"%s is hit in the chest and loses %d points of maximum health!", L"%s 胸部中弹,失去 %d 点生命上限!",// L"%s is hit in the chest and loses %d points of maximum health!",
L"%s is blinded by the blast!", // TODO.Translate
L"%s 重获1点失去的 %s",// L"%s has regained one point of lost %s", L"%s 重获1点失去的 %s",// L"%s has regained one point of lost %s",
L"%s 重获 %d 点失去的 %s",// L"%s has regained %d points of lost %s", L"%s 重获 %d 点失去的 %s",// L"%s has regained %d points of lost %s",
L"你的侦察能力避免了敌人的偷袭!",// L"Your scouting skills prevented you to be ambushed by the enemy!", L"你的侦察能力避免了敌人的偷袭!",// L"Your scouting skills prevented you to be ambushed by the enemy!",
+1
View File
@@ -6618,6 +6618,7 @@ STR16 New113Message[] =
L"Surgery on %s finished.", L"Surgery on %s finished.",
L"%s is hit in the chest and loses a point of maximum health!", L"%s is hit in the chest and loses a point of maximum health!",
L"%s is hit in the chest and loses %d points of maximum health!", L"%s is hit in the chest and loses %d points of maximum health!",
L"%s is blinded by the blast!",
L"%s has regained one point of lost %s", L"%s has regained one point of lost %s",
L"%s has regained %d points of lost %s", L"%s has regained %d points of lost %s",
L"Your scouting skills prevented you to be ambushed by the enemy!", L"Your scouting skills prevented you to be ambushed by the enemy!",
+2 -1
View File
@@ -6610,11 +6610,12 @@ STR16 New113Message[] =
L"Surgery on %s finished.", L"Surgery on %s finished.",
L"%s is hit in the chest and loses a point of maximum health!", L"%s is hit in the chest and loses a point of maximum health!",
L"%s is hit in the chest and loses %d points of maximum health!", L"%s is hit in the chest and loses %d points of maximum health!",
L"%s is blinded by the blast!",
L"%s has regained one point of lost %s", L"%s has regained one point of lost %s",
L"%s has regained %d points of lost %s", L"%s has regained %d points of lost %s",
L"Your scouting skills prevented an ambush by the enemy!", // MINTY - Changed "you to be ambushed" to "an ambush": More natural English L"Your scouting skills prevented an ambush by the enemy!", // MINTY - Changed "you to be ambushed" to "an ambush": More natural English
L"Thanks to your scouting skills you have successfuly avoided a pack of bloodcats!", L"Thanks to your scouting skills you have successfuly avoided a pack of bloodcats!",
L"%s is hit to groin and falls down in pain!", L"%s is hit at the groin and falls down in pain!",
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
L"Warning: enemy corpse found!!!", L"Warning: enemy corpse found!!!",
L"%s [%d rnds]\n%s %1.1f %s", L"%s [%d rnds]\n%s %1.1f %s",
+1
View File
@@ -6615,6 +6615,7 @@ STR16 New113Message[] =
L"La chirurgie sur %s est finie.", L"La chirurgie sur %s est finie.",
L"%s est touché(e) au torse et perd un maximum de points de vie !", L"%s est touché(e) au torse et perd un maximum de points de vie !",
L"%s est touché(e) au torse et perd %d points de vie !", L"%s est touché(e) au torse et perd %d points de vie !",
L"%s is blinded by the blast!", // TODO.Translate
L"%s a regagné 1 point sur les %s perdus", L"%s a regagné 1 point sur les %s perdus",
L"%s a regagné %d points sur les %s perdus", L"%s a regagné %d points sur les %s perdus",
L"Vos compétences de reconnaissance vous ont empêchés d'être pris en embuscade par l'ennemi !", L"Vos compétences de reconnaissance vous ont empêchés d'être pris en embuscade par l'ennemi !",
+1
View File
@@ -6440,6 +6440,7 @@ STR16 New113Message[] =
L"%s wurde erfolgreich operiert.", L"%s wurde erfolgreich operiert.",
L"%s ist am Torso getroffen und verliert einen Punkt maximaler Gesundheit!", L"%s ist am Torso getroffen und verliert einen Punkt maximaler Gesundheit!",
L"%s ist am Torso getroffen und verliert %d Punkte maximaler Gesundheit!", L"%s ist am Torso getroffen und verliert %d Punkte maximaler Gesundheit!",
L"%s is blinded by the blast!", // TODO.Translate
L"%s hat einen Punkt an %s wiedergewonnen.", L"%s hat einen Punkt an %s wiedergewonnen.",
L"%s hat %d Punkte an %s wiedergewonnen.", L"%s hat %d Punkte an %s wiedergewonnen.",
L"Ihre Späher-Fertigkeit hat Sie davor bewahrt, vom Gegner in einen Hinterhalt gelockt zu werden.", L"Ihre Späher-Fertigkeit hat Sie davor bewahrt, vom Gegner in einen Hinterhalt gelockt zu werden.",
+1
View File
@@ -6610,6 +6610,7 @@ STR16 New113Message[] =
L"Surgery on %s finished.", L"Surgery on %s finished.",
L"%s is hit in the chest and loses a point of maximum health!", L"%s is hit in the chest and loses a point of maximum health!",
L"%s is hit in the chest and loses %d points of maximum health!", L"%s is hit in the chest and loses %d points of maximum health!",
L"%s is blinded by the blast!",
L"%s has regained one point of lost %s", L"%s has regained one point of lost %s",
L"%s has regained %d points of lost %s", L"%s has regained %d points of lost %s",
L"Your scouting skills prevented you to be ambushed by the enemy!", L"Your scouting skills prevented you to be ambushed by the enemy!",
+1
View File
@@ -6624,6 +6624,7 @@ STR16 New113Message[] =
L"operacja na %s zakończona.", L"operacja na %s zakończona.",
L"%s otrzymuje trafienie w korpus i traci punkt maksymalnego zdrowia!", L"%s otrzymuje trafienie w korpus i traci punkt maksymalnego zdrowia!",
L"%s otrzymuje trafienie w korpus i traci %d punktów maksymalnego zdrowia!", L"%s otrzymuje trafienie w korpus i traci %d punktów maksymalnego zdrowia!",
L"%s is blinded by the blast!", // TODO.Translate
L"%s odzyskał(a) utracony punkt %s", L"%s odzyskał(a) utracony punkt %s",
L"%s odzyskał(a) %d utraconych punktów %s", L"%s odzyskał(a) %d utraconych punktów %s",
L"Twoja umiejętność zwiadowcy uchroniła cię przed zasadzką!", L"Twoja umiejętność zwiadowcy uchroniła cię przed zasadzką!",
+1
View File
@@ -6613,6 +6613,7 @@ STR16 New113Message[] =
L"%s успешно прооперирован(а).", //Surgery on %s finished. L"%s успешно прооперирован(а).", //Surgery on %s finished.
L"%s пропустил(а) удар в грудную клетку и теряет единицу максимального значения здоровья!", //%s is hit in the chest and loses a point of maximum health! L"%s пропустил(а) удар в грудную клетку и теряет единицу максимального значения здоровья!", //%s is hit in the chest and loses a point of maximum health!
L"%s пропустил(а) удар в грудную клетку и теряет %d максимального значения здоровья!", //%s is hit in the chest and loses %d points of maximum health! L"%s пропустил(а) удар в грудную клетку и теряет %d максимального значения здоровья!", //%s is hit in the chest and loses %d points of maximum health!
L"%s is blinded by the blast!", // TODO.Translate
L"%s восстановил(а) одну единицу потерянного %s.", //%s has regained one point of lost %s L"%s восстановил(а) одну единицу потерянного %s.", //%s has regained one point of lost %s
L"%s восстановил(а) %d единиц потерянного %s.", //%s has regained %d points of lost %s L"%s восстановил(а) %d единиц потерянного %s.", //%s has regained %d points of lost %s
L"Ваши навыки разведчика сорвали засаду противника.", L"Ваши навыки разведчика сорвали засаду противника.",
+2 -1
View File
@@ -6618,11 +6618,12 @@ STR16 New113Message[] =
L"Surgery on %s finished.", L"Surgery on %s finished.",
L"%s is hit in the chest and loses a point of maximum health!", L"%s is hit in the chest and loses a point of maximum health!",
L"%s is hit in the chest and loses %d points of maximum health!", L"%s is hit in the chest and loses %d points of maximum health!",
L"%s is blinded by the blast!",
L"%s has regained one point of lost %s", L"%s has regained one point of lost %s",
L"%s has regained %d points of lost %s", L"%s has regained %d points of lost %s",
L"Your scouting skills prevented you to be ambushed by the enemy!", L"Your scouting skills prevented you to be ambushed by the enemy!",
L"Thanks to your scouting skills you have successfuly avoided a pack of bloodcats!", L"Thanks to your scouting skills you have successfuly avoided a pack of bloodcats!",
L"%s is hit to groin and falls down in pain!", L"%s is hit at the groin and falls down in pain!",
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
L"Warning: enemy corpse found!!!", L"Warning: enemy corpse found!!!",
L"%s [%d rnds]\n%s %1.1f %s", L"%s [%d rnds]\n%s %1.1f %s",