- added translations

- militia menu is always present so that the player has an easier time figuring out why he cannot do something

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8538 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-03-05 18:23:24 +00:00
parent 82a2b6c2db
commit 2080e787dd
11 changed files with 46 additions and 22 deletions
+19 -21
View File
@@ -1663,20 +1663,6 @@ BOOLEAN BasicCanCharacterDrillMilitia( SOLDIERTYPE *pSoldier )
return ( TRUE );
}
BOOLEAN CanCharacterMilitiaAssignment( SOLDIERTYPE *pSoldier )
{
if ( CanCharacterTrainMilitia( pSoldier ) )
return TRUE;
if ( CanCharacterDrillMilitia( pSoldier ) )
return TRUE;
if ( CanCharacterDoctorMilitia( pSoldier ) )
return TRUE;
return FALSE;
}
BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
{
if ( !gGameExternalOptions.fIndividualMilitia )
@@ -1684,6 +1670,9 @@ BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
AssertNotNIL( pSoldier );
// Temp string.
CHAR16 sString[128];
if ( LaptopSaveInfo.iCurrentBalance <= 0 )
{
if ( aErrorReport )
@@ -1694,7 +1683,7 @@ BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
if ( !BasicCanCharacterDrillMilitia( pSoldier ) )
{
if ( aErrorReport )
DoScreenIndependantMessageBox( L"Assignment not possible at the moment", MSG_BOX_FLAG_OK, NULL );
DoScreenIndependantMessageBox( Message[STR_ASSIGNMENT_NOTPOSSIBLE], MSG_BOX_FLAG_OK, NULL );
return( FALSE );
}
@@ -1702,7 +1691,7 @@ BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
if ( NumNonPlayerTeamMembersInSector( pSoldier->sSectorX, pSoldier->sSectorY, ENEMY_TEAM ) > 0 )
{
if ( aErrorReport )
DoScreenIndependantMessageBox( L"Assignment not possible while enemies are still around.", MSG_BOX_FLAG_OK, NULL );
DoScreenIndependantMessageBox( Message[STR_SECTOR_NOT_CLEARED], MSG_BOX_FLAG_OK, NULL );
return( FALSE );
}
@@ -1710,7 +1699,11 @@ BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
if ( pSoldier->stats.bLeadership <= 0 )
{
if ( aErrorReport )
DoScreenIndependantMessageBox( L"Not enough leadership.", MSG_BOX_FLAG_OK, NULL );
{
swprintf( sString, New113HAMMessage[6], pSoldier->GetName() );
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, NULL );
}
return ( FALSE );
}
@@ -1750,7 +1743,11 @@ BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
if ( usEffectiveLeadership < gGameExternalOptions.ubMinimumLeadershipToTrainMilitia )
{
if ( aErrorReport )
DoScreenIndependantMessageBox( L"Not enough leadership.", MSG_BOX_FLAG_OK, NULL );
{
swprintf( sString, New113HAMMessage[6], pSoldier->GetName() );
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, NULL );
}
return ( FALSE );
}
}
@@ -1766,7 +1763,7 @@ BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport )
}
if ( aErrorReport )
DoScreenIndependantMessageBox( L"No militia that can be trained present.", MSG_BOX_FLAG_OK, NULL );
DoScreenIndependantMessageBox( Message[STR_ASSIGNMENT_NOMILITIAPRESENT], MSG_BOX_FLAG_OK, NULL );
return FALSE;
}
@@ -10036,7 +10033,7 @@ void HandleShadingOfLinesForAssignmentMenus( void )
}
// militia
if ( CanCharacterMilitiaAssignment( pSoldier ) )
if ( CanCharacterOnDuty( pSoldier ) )
{
UnShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_MILITIA );
}
@@ -13500,7 +13497,8 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
break;
case ASSIGN_MENU_MILITIA:
if ( CanCharacterMilitiaAssignment( pSoldier ) )
// just a very basic check
if ( CanCharacterOnDuty( pSoldier ) )
{
gAssignMenuState = ASMENU_NONE;
-1
View File
@@ -194,7 +194,6 @@ BOOLEAN CanCharacterRepair( SOLDIERTYPE *pCharacter );
BOOLEAN CanCharacterPatient( SOLDIERTYPE *pCharacter );
// can character train militia?
BOOLEAN CanCharacterMilitiaAssignment( SOLDIERTYPE *pSoldier );
BOOLEAN CanCharacterDrillMilitia( SOLDIERTYPE *pSoldier, BOOLEAN aErrorReport = FALSE );
BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pCharacter );
BOOLEAN CanCharacterTrainMobileMilitia( SOLDIERTYPE *pSoldier );
+3
View File
@@ -607,6 +607,9 @@ enum
STR_CLEANED,
STR_CLEANED_FOR_OWNER,
STR_ASSIGNMENT_NOTPOSSIBLE,
STR_ASSIGNMENT_NOMILITIAPRESENT,
TEXT_NUM_STR_MESSAGE,
};
+3
View File
@@ -2361,6 +2361,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s清理了%s。", //L"%s has cleaned the %s.",
L"%s清理了%s的%s。", //L"%s has cleaned %s's %s.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game
+3
View File
@@ -2360,6 +2360,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s has cleaned the %s.", // TODO.Translate
L"%s has cleaned %s's %s.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game
+3
View File
@@ -2361,6 +2361,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s has cleaned the %s.",
L"%s has cleaned %s's %s.",
L"Assignment not possible at the moment",
L"No militia that can be drilled present.",
};
// the country and its noun in the game
+3
View File
@@ -2369,6 +2369,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s has cleaned the %s.", // TODO.Translate
L"%s has cleaned %s's %s.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game // TODO.Translate
+3
View File
@@ -2377,6 +2377,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s hat %s gereinigt.",
L"%s hat %s's %s gereinigt.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game
+3
View File
@@ -2355,6 +2355,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s has cleaned the %s.", // TODO.Translate
L"%s has cleaned %s's %s.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game
+3
View File
@@ -2367,6 +2367,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s has cleaned the %s.", // TODO.Translate
L"%s has cleaned %s's %s.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game
+3
View File
@@ -2361,6 +2361,9 @@ CHAR16 Message[][STRING_LENGTH] =
L"%s почистил(а) %s.", // TODO.Translate
L"%s почистил(а) у %s %s.",
L"Assignment not possible at the moment", // TODO.Translate
L"No militia that can be drilled present.",
};
// the country and its noun in the game