Skip to content

Commit

Permalink
Issue #130 - Commented.
Browse files Browse the repository at this point in the history
  • Loading branch information
MalucoMarinero committed Mar 4, 2017
1 parent 49bd4da commit 79117b6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
8 changes: 5 additions & 3 deletions X2CommunityHighlander/Src/XComGame/Classes/Helpers_LW.uc
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,15 @@ var config bool EnableRestartMissionButtonInIronman;
var config array<ProjectileSoundMapping> ProjectileSounds;
// End Issue #49

//allow certain classes to be overridden recursively, so the override can be overridden
var config array<ModClassOverrideEntry> UIDynamicClassOverrides;

//Configuration array to control how much damage fire does when it finishes burning
// This is indexed by the number of turns it has been burning, which is typically 1 to 3,
// but can be longer if the environment actor was configured with Toughness.AvailableFireFuelTurns
var config array<int> FireEnvironmentDamageAfterNumTurns;

// Start Issue #130
//allow certain classes to be overridden recursively, so the override can be overridden
var config array<ModClassOverrideEntry> UIDynamicClassOverrides;

simulated static function class<object> LWCheckForRecursiveOverride(class<object> ClassToCheck)
{
local int idx;
Expand Down Expand Up @@ -131,6 +132,7 @@ simulated static function class<object> LWCheckForRecursiveOverride(class<object
`LOG("LWCheckForRecursiveOverride : Overrode " $ string(ClassToCheck) $ " to " $ CurrentBestClass);
return CurrentBestClass;
}
// End Issue #130

// Start Issue #26 - allow radius manager to be usable on more than just 'Terror' missions
static function bool ShouldUseRadiusManagerForMission(String MissionName)
Expand Down
8 changes: 6 additions & 2 deletions X2CommunityHighlander/Src/XComGame/Classes/UIPersonnel.uc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ simulated function PopulateListInstantly()
local UIPersonnel_ListItem kItem;
local StateObjectReference SoldierRef;
local array<StateObjectReference> CurrentData;
local class<UIPersonnel_SoldierListItem> NewClass; //LWS Added
local class<UIPersonnel_SoldierListItem> NewClass; // Variable for Issue #130

CurrentData = GetCurrentData();

Expand All @@ -380,9 +380,11 @@ simulated function PopulateListInstantly()
{
if( m_eListType == eUIPersonnel_Soldiers || m_eCurrentTab == eUIPersonnel_Soldiers )
{
// Start Issue #130
// LWS Mods : allow recursive overriding of list item class
NewClass = class<UIPersonnel_SoldierListItem>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UIPersonnel_SoldierListItem'));
kItem = Spawn(NewClass, m_kList.itemContainer);
// End Issue #130
SoldierRef = CurrentData[m_kList.itemCount];
kItem.InitListItem(SoldierRef);

Expand All @@ -406,17 +408,19 @@ simulated function PopulateListSequentially( UIPanel Control )
{
local UIPersonnel_ListItem kItem;
local array<StateObjectReference> CurrentData;
local class<UIPersonnel_SoldierListItem> NewClass; //LWS Added
local class<UIPersonnel_SoldierListItem> NewClass; // Variable for Issue #130

CurrentData = GetCurrentData();

if(m_kList.itemCount < CurrentData.Length)
{
if( m_eListType == eUIPersonnel_Soldiers )
{
// Start Issue #130
// LWS Mods : allow recursive overriding of list item class
NewClass = class<UIPersonnel_SoldierListItem>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UIPersonnel_SoldierListItem'));
kItem = Spawn(NewClass, m_kList.itemContainer);
// End Issue #130
}
else if( m_eListType == eUIPersonnel_Deceased )
{
Expand Down
4 changes: 3 additions & 1 deletion X2CommunityHighlander/Src/XComGame/Classes/UIStrategyMap.uc
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ simulated function UIStrategyMapItem GetMapItem(XComGameState_GeoscapeEntity Ent
local XComGameState_GeoscapeEntity EntityState;
local array<int> PendingStatesNeedingLocations; // LWS Added
local Vector NewLocation; // LWS Added
local class<UIStrategyMapItem> NewClass; //LWS Added
local class<UIStrategyMapItem> NewClass; // Variable for Issue #130

WidgetName = name(Entity.GetUIWidgetName());

Expand All @@ -524,9 +524,11 @@ simulated function UIStrategyMapItem GetMapItem(XComGameState_GeoscapeEntity Ent
}
else
{
// Start Issue #130
// LWS Mods : allow recursive overriding of strategy map item classes
NewClass = class<UIStrategyMapItem>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(Entity.GetUIClass()));
MapItem = Spawn(NewClass, ItemContainer).InitMapItem(Entity);
// End Issue #130
CachedWidgetNames.AddItem(WidgetName);
CachedMapItems.AddItem(MapItem);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1666,13 +1666,16 @@ simulated function HotlinkToViewDarkEvents(optional bool bShowActiveDarkEvents =
function UISquadSelect(optional bool bNoCancel=false)
{
local UISquadSelect SquadSelectScreen;
// Start Issue #130
local class<UISquadSelect> ClassToBuild;
ClassToBuild = class<UISquadSelect>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UISquadSelect'));
if(ScreenStack.IsNotInStack(ClassToBuild))
{
SquadSelectScreen = Spawn( ClassToBuild, self);
// End Issue #130
SquadSelectScreen.bNoCancel = bNoCancel;
ScreenStack.Push(SquadSelectScreen);
}
Expand All @@ -1694,15 +1697,16 @@ function UIAfterAction(optional bool bIsSimCombat)
{
local class<UIAfterAction> ClassToBuild;
// Start Issue #130
ClassToBuild = class<UIAfterAction>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UIAfterAction'));
if(ScreenStack.IsNotInStack(ClassToBuild))
{
ScreenStack.Push( Spawn( ClassToBuild, self ) );
// TODO @rmcfall: Remove this once intro sequence is fixed for SimCombat
if(bIsSimCombat)
UIAfterAction(ScreenStack.GetScreen(ClassToBuild)).Show();
// End Issue #130
`XSTRATEGYSOUNDMGR.PlayAfterActionMusic();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ simulated function bool IsShowingReconnectControllerDialog()
simulated function UICloseControllerUnplugDialog()
{
local UIMovie_2D InterfaceMgr;
local class<UIOptionsPCScreen> ScreenClass; // LWS Mods added
local class<UIOptionsPCScreen> ScreenClass; // Variable for Issue #130

if( m_kControllerUnplugDialog != none )
{
Expand All @@ -1177,11 +1177,14 @@ simulated function UICloseControllerUnplugDialog()
ScreenStack.Pop( m_kControllerUnplugDialog );
m_kControllerUnplugDialog = none;
}

// Start Issue #130
ScreenClass = class<UIOptionsPCScreen>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UIOptionsPCScreen'));
if (ScreenStack.IsInStack(ScreenClass))
{
UIOptionsPCScreen(ScreenStack.GetScreen(ScreenClass)).RefreshConnectedControllers();
}
// End Issue #130
}

simulated function UIInputDialog(TInputDialogData kData)
Expand Down Expand Up @@ -1468,20 +1471,24 @@ simulated function UpdateShortcutText()
simulated function UIPCOptions( optional bool bIn3D = false )
{
local UIMovie TargetMovie;
local class<UIOptionsPCScreen> ScreenClass; // LWS Mods added
local class<UIOptionsPCScreen> ScreenClass; // Variable for Issue #130
TargetMovie = XComShellPresentationLayer(self) == none ? Get2DMovie() : Get3DMovie();
// Start Issue #130
ScreenClass = class<UIOptionsPCScreen>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UIOptionsPCScreen'));
ScreenStack.Push( Spawn( ScreenClass, self ), TargetMovie );
// End Issue #130
}
simulated function bool IsPCOptionsRaised()
{
local class<UIOptionsPCScreen> ScreenClass; // LWS Mods added
local class<UIOptionsPCScreen> ScreenClass; // Variable for Issue #130
// Start Issue #130
ScreenClass = class<UIOptionsPCScreen>(class'Helpers_LW'.static.LWCheckForRecursiveOverride(class'UIOptionsPCScreen'));
return (ScreenStack.GetScreen(ScreenClass) != none);
// End Issue #130
}
Expand Down

0 comments on commit 79117b6

Please sign in to comment.