- new function: militia can be ordered to pick up gear from sector in tactical, just like ordering them to drop it. does not work in combat for obvious reason.

- if militia stand in water and are ordered to drop their equipment, they will drop it on land.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6263 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-07-31 18:59:32 +00:00
parent 64f7d6e616
commit 71274fdf55
14 changed files with 152 additions and 61 deletions
+25 -6
View File
@@ -4845,16 +4845,29 @@ void StartTacticalFunctionSelectionMessageBox( SOLDIERTYPE * pSoldier, INT32 sGr
wcscpy( gzUserDefinedButton[0], TacticalStr[ FILL_CANTEEN_STR ] );
wcscpy( gzUserDefinedButton[1], TacticalStr[ CLEAN_ONE_GUN_STR ] );
wcscpy( gzUserDefinedButton[2], TacticalStr[ CLEAN_ALL_GUNS_STR ] );
wcscpy( gzUserDefinedButton[3], TacticalStr[ TAKE_OFF_CLOTHES_STR ] );
wcscpy( gzUserDefinedButton[4], TacticalStr[ MILITIA_DROP_EQ_STR ] );
if ( gpTempSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
wcscpy( gzUserDefinedButton[3], TacticalStr[ TAKE_OFF_DISGUISE_STR ] );
else
wcscpy( gzUserDefinedButton[3], TacticalStr[ TAKE_OFF_CLOTHES_STR ] );
if ( gGameExternalOptions.fMilitiaUseSectorInventory )
{
wcscpy( gzUserDefinedButton[4], TacticalStr[ MILITIA_DROP_EQ_STR ] );
wcscpy( gzUserDefinedButton[5], TacticalStr[ MILITIA_PICK_UP_EQ_STR ] );
}
else
{
wcscpy( gzUserDefinedButton[4], TacticalStr[ UNUSED_STR ] );
wcscpy( gzUserDefinedButton[5], TacticalStr[ UNUSED_STR ] );
}
// if disguised, allow testing our disguise
if ( gpTempSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
wcscpy( gzUserDefinedButton[5], TacticalStr[ SPY_SELFTEST_STR ] );
wcscpy( gzUserDefinedButton[6], TacticalStr[ SPY_SELFTEST_STR ] );
else
wcscpy( gzUserDefinedButton[5], TacticalStr[ UNUSED_STR ] );
wcscpy( gzUserDefinedButton[6], TacticalStr[ UNUSED_STR ] );
wcscpy( gzUserDefinedButton[6], TacticalStr[ UNUSED_STR ] );
wcscpy( gzUserDefinedButton[7], TacticalStr[ UNUSED_STR ] );
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, TacticalStr[ FUNCTION_SELECTION_STR ], GAME_SCREEN, MSG_BOX_FLAG_GENERIC_EIGHT_BUTTONS, TacticalFunctionSelectionMessageBoxCallBack, NULL );
}
@@ -5029,9 +5042,15 @@ void TacticalFunctionSelectionMessageBoxCallBack( UINT8 ubExitValue )
break;
case 5:
// militia drops all gear taken from sector inventory
TeamDropAll( MILITIA_TEAM );
if ( gGameExternalOptions.fMilitiaUseSectorInventory )
TeamDropAll( MILITIA_TEAM );
break;
case 6:
// militia takes gear from sector inventory
if ( gGameExternalOptions.fMilitiaUseSectorInventory )
TeamRestock( MILITIA_TEAM );
break;
case 7:
// test our disguise
if ( gpTempSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
gpTempSoldier->SpySelfTest();