mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- New Feature: Spotter skill (available to every merc) allows a merc to be spotter for other snipers. Spotter items have to be in hands, spending APs cancels action.
- renamed GetObjectNCTHModifier to GetObjectModifier, as function is no longer used exclusively for NCTH Warning: GameDir >= r1896 is required. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6694 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+26
-2
@@ -43,7 +43,6 @@ SkillMenuItem::SetupPopup(CHAR* name)
|
||||
/////////////////////////////// Trait Selection ////////////////////////////////////////////
|
||||
TraitSelection gTraitSelection;
|
||||
|
||||
//void Wrapper_Function_TraitSelection( UINT32 aVal) { gTraitSelection.Functions(aVal); }
|
||||
void Wrapper_Setup_TraitSelection( UINT32 aVal) { gTraitSelection.Setup(aVal); }
|
||||
void Wrapper_Cancel_TraitSelection( UINT32 aVal ) { gTraitSelection.Cancel(); }
|
||||
/////////////////////////////// Trait Selection ////////////////////////////////////////////
|
||||
@@ -117,9 +116,10 @@ TraitSelection::Setup( UINT32 aVal )
|
||||
CHAR16 pStr[300];
|
||||
|
||||
// create entries for the sub-menus for each trait
|
||||
const UINT8 num = 1;
|
||||
const UINT8 num = 2;
|
||||
UINT8 traitarray[num];
|
||||
traitarray[0] = RADIO_OPERATOR_NT;
|
||||
traitarray[1] = VARIOUSSKILLS;
|
||||
for ( int i = 0; i < num; ++i)
|
||||
{
|
||||
swprintf( pStr, gzMercSkillTextNew[traitarray[i]] );
|
||||
@@ -213,6 +213,30 @@ SkillSelection::Setup( UINT32 aVal )
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case VARIOUSSKILLS:
|
||||
{
|
||||
for(UINT32 uiCounter = SKILLS_VARIOUS_FIRST; uiCounter <= SKILLS_VARIOUS_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)) )
|
||||
{
|
||||
// Set this option off.
|
||||
pOption->setAvail(new popupCallbackFunction<bool,void*>( &Popup_OptionOff, NULL ));
|
||||
}
|
||||
|
||||
GetPopup()->addOption( *pOption );
|
||||
}
|
||||
|
||||
SetTraitToDisplay(VARIOUSSKILLS);
|
||||
SetGridNoForTraitDisplay(sTraitsMenuTargetGridNo);
|
||||
ToggleTraitRangeView(TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user