Skip to content

Commit

Permalink
Show stats menu item only for rpgo soldier class
Browse files Browse the repository at this point in the history
  • Loading branch information
Musashi1584 committed Mar 18, 2020
1 parent 88d3b5c commit 8fc239d
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,20 @@ static function EventListenerReturn OnArmoryMainMenuUpdate(Object EventData, Obj
UnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(MainMenu.GetUnitRef().ObjectID));
UnitState.GetUnitValue('StatPoints', StatPointsValue);

StatUIButton = MainMenu.Spawn(class'UIListItemString', List.ItemContainer).InitListItem(class'UIBarMemorial_Details'.default.m_strSoldierStats);
StatUIButton.MCName = 'ArmoryMainMenu_StatUIButton';
StatUIButton.ButtonBG.OnClickedDelegate = OnSoldierStats;
StatUIButton.NeedsAttention(StatPointsValue.fValue > 0);

//if(NextOnSelectionChanged == none)
//{
// NextOnSelectionChanged = List.OnSelectionChanged;
// List.OnSelectionChanged = OnSelectionChanged;
//}
List.MoveItemToBottom(FindDismissListItem(List));
if (UnitState.GetSoldierClassTemplateName() == 'UniversalSoldier')
{
StatUIButton = MainMenu.Spawn(class'UIListItemString', List.ItemContainer).InitListItem(class'UIBarMemorial_Details'.default.m_strSoldierStats);
StatUIButton.MCName = 'ArmoryMainMenu_StatUIButton';
StatUIButton.ButtonBG.OnClickedDelegate = OnSoldierStats;
StatUIButton.NeedsAttention(StatPointsValue.fValue > 0);

//if(NextOnSelectionChanged == none)
//{
// NextOnSelectionChanged = List.OnSelectionChanged;
// List.OnSelectionChanged = OnSelectionChanged;
//}
List.MoveItemToBottom(FindDismissListItem(List));
}

return ELR_NoInterrupt;
}
Expand Down

0 comments on commit 8fc239d

Please sign in to comment.