add "Disguise" menu to tactical skill menu (alt + rightclick)

add "Fill canteens" action to tactical skill menu, under "various" 

adapted from Seven's +AI

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9350 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
rftr
2022-03-29 06:02:44 +00:00
parent 4689369f83
commit 75d98aecfd
13 changed files with 317 additions and 8 deletions
+32 -4
View File
@@ -150,12 +150,13 @@ TraitSelection::Setup( UINT32 aVal )
CHAR16 pStr[300];
// create entries for the sub-menus for each trait
const UINT8 num = 4;
const UINT8 num = 5;
UINT8 traitarray[num];
traitarray[0] = RADIO_OPERATOR_NT;
traitarray[1] = INTEL;
traitarray[2] = VARIOUSSKILLS;
traitarray[3] = AUTOBANDAGESKILLS;
traitarray[2] = DISGUISE;
traitarray[3] = VARIOUSSKILLS;
traitarray[4] = AUTOBANDAGESKILLS;
for ( int i = 0; i < num; ++i)
{
@@ -260,7 +261,7 @@ SkillSelection::Setup( UINT32 aVal )
}
break;
case INTEL:
case INTEL:
{
for ( UINT32 uiCounter = SKILLS_INTEL_FIRST; uiCounter <= SKILLS_INTEL_LAST; ++uiCounter )
{
@@ -280,6 +281,26 @@ SkillSelection::Setup( UINT32 aVal )
}
break;
case DISGUISE:
{
for ( UINT32 uiCounter = SKILLS_DISGUISE_FIRST; uiCounter <= SKILLS_DISGUISE_LAST; ++uiCounter )
{
swprintf( pStr, pTraitSkillsMenuStrings[uiCounter] );
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_SkillSelection, uiCounter ) );
// if we cannot perform this skill, grey it out
if ( !( pSoldier->CanUseSkill( uiCounter, TRUE, sTraitsMenuTargetGridNo ) ) )
{
// Set this option off.
pOption->setAvail( new popupCallbackFunction<bool, void*>( &Popup_OptionOff, NULL ) );
}
GetPopup()->addOption( *pOption );
}
}
break;
case VARIOUSSKILLS:
{
for(UINT32 uiCounter = SKILLS_VARIOUS_FIRST; uiCounter <= SKILLS_VARIOUS_LAST; ++uiCounter)
@@ -343,6 +364,13 @@ SkillSelection::Setup( UINT32 aVal )
}
break;
case DISGUISE:
for ( UINT32 uiCounter = SKILLS_DISGUISE_FIRST; uiCounter <= SKILLS_DISGUISE_LAST; ++uiCounter )
{
SetRegionFastHelpText( &( GetPopup()->MenuRegion[cnt++] ), pSoldier->PrintSkillDesc( uiCounter, sTraitsMenuTargetGridNo ) );
}
break;
case VARIOUSSKILLS:
{
for(UINT32 uiCounter = SKILLS_VARIOUS_FIRST; uiCounter <= SKILLS_VARIOUS_LAST; ++uiCounter)