From 5e5ff3d848d4cfd6caf3f4841fc0ec2ee297014b Mon Sep 17 00:00:00 2001 From: Henning Waberg Date: Wed, 18 Mar 2020 22:29:44 +0100 Subject: [PATCH] Expose classes that can use the StatUI to XComStatUpgradeUI.ini --- XCOM2RPGOverhaul/Config/StatUpgradeUI/XComStatUpgradeUI.ini | 3 +++ .../Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/XCOM2RPGOverhaul/Config/StatUpgradeUI/XComStatUpgradeUI.ini b/XCOM2RPGOverhaul/Config/StatUpgradeUI/XComStatUpgradeUI.ini index cacd6c8..64f127a 100644 --- a/XCOM2RPGOverhaul/Config/StatUpgradeUI/XComStatUpgradeUI.ini +++ b/XCOM2RPGOverhaul/Config/StatUpgradeUI/XComStatUpgradeUI.ini @@ -28,6 +28,9 @@ HealthBetaStrikeCostLamda = 24 HealthDeltaStrikeCostLamda = 15 [StatUpgradeUI.X2EventListener_StatUI] + ++EnableClassForStatProgression=UniversalSoldier + DefaultStatPointsPerPromotion=15 ; Class specific stat points override DefaultStatPointsPerPromotion diff --git a/XCOM2RPGOverhaul/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc b/XCOM2RPGOverhaul/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc index 07febc8..0154215 100644 --- a/XCOM2RPGOverhaul/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc +++ b/XCOM2RPGOverhaul/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc @@ -2,6 +2,7 @@ class X2EventListener_StatUI extends X2EventListener config(StatUpgradeUI); var config int DefaultStatPointsPerPromotion; var config array ClassStatPointsPerPromotion; +var config array EnableClassForStatProgression; var delegate NextOnSelectionChanged; delegate OnItemSelectedCallback(UIList _list, int itemIndex); @@ -69,7 +70,7 @@ static function EventListenerReturn OnCompleteRespecSoldier(Object EventData, Ob if (UnitState != none && UnitState.GetMyTemplateName() == 'Soldier' && - UnitState.GetSoldierClassTemplateName() == 'UniversalSoldier' + default.EnableClassForStatProgression.Find(UnitState.GetSoldierClassTemplateName()) != INDEX_NONE ) { SpentSoldierSP = GetSpentSoldierSP(UnitState); @@ -140,7 +141,7 @@ static function EventListenerReturn OnArmoryMainMenuUpdate(Object EventData, Obj UnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(MainMenu.GetUnitRef().ObjectID)); UnitState.GetUnitValue('StatPoints', StatPointsValue); - if (UnitState.GetSoldierClassTemplateName() == 'UniversalSoldier') + if (default.EnableClassForStatProgression.Find(UnitState.GetSoldierClassTemplateName()) != INDEX_NONE) { StatUIButton = MainMenu.Spawn(class'UIListItemString', List.ItemContainer).InitListItem(class'UIBarMemorial_Details'.default.m_strSoldierStats); StatUIButton.MCName = 'ArmoryMainMenu_StatUIButton';