Skip to content

Commit 0694ca6

Browse files
committed
Merge #466 (long-war-2:preserve-proxy-data)
2 parents 1fbf6e1 + f2301ca commit 0694ca6

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ All notable changes to Vanilla 'War Of The Chosen' Behaviour will be documented
255255
- Additional Photobooth particle system enums for mods (#359)
256256
- Tweaks to "Resistance Archives" random Legacy Operations UI. Restarts show the correct locked difficulty, and a crash condition on backing out of a restart fixed. (#307)
257257
- Added CovertAction as its own EventSource on Event 'CovertActionCompleted' (#383)
258+
- Allow mods to check whether VIP units left a mission successfully via the `bRemovedFromPlay`
259+
flag on `XComGameState_Unit`. This behavior is gated behind the new `CHHelpers.PreserveProxyUnitData`
260+
config variable. (#465)
261+
258262

259263
### Fixes
260264
- Fix Chosen Assassin receiving weaknesses that are exclusive to the

X2WOTCCommunityHighlander/Config/XComGame.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ bEnableVersionDisplay=true
2323
;AmmoSlotBypassUniqueRule=false ; Set to true to make ammo slot ignore unique items rule.
2424

2525
;bDontUnequipWhenWounded=true ; Set to true to make soldier keep their gear when wounded
26-
;bDontUnequipCovertOps=true ; Uncomment to make soldiers on covert ops keep their gear even if ambush risk is 0
26+
;bDontUnequipCovertOps=true ; Uncomment to make soldiers on covert ops keep their gear even if ambush risk is 0
27+
28+
;PreserveProxyUnitData=true ; Set to true to make sure important info on proxy VIP units is copied to the original units

X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ var config(Content) array<name> EyeMaterial;
110110
var config(Content) array<name> FlagMaterial;
111111
// End Issue #356
112112

113+
// Start Issue #465
114+
var config bool PreserveProxyUnitData;
115+
// End Issue #465
116+
113117
// Start Issue #123
114118
simulated static function RebuildPerkContentCache() {
115119
local XComContentManager Content;

X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameStateContext_StrategyGameRule.uc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,13 @@ static function CleanupProxyVips()
12931293
OriginalUnit.SetCurrentStat(eStat_HP, ProxyUnit.GetCurrentStat(eStat_HP));
12941294
}
12951295
1296+
// Start Issue #465
1297+
if (class'CHHelpers'.default.PreserveProxyUnitData && ProxyUnit.bRemovedFromPlay)
1298+
{
1299+
OriginalUnit.RemoveStateFromPlay();
1300+
}
1301+
// End Issue #465
1302+
12961303
// remove the proxy from the game. We don't need it anymore
12971304
NewGameState.RemoveStateObject(ProxyUnit.ObjectID);
12981305
}

0 commit comments

Comments
 (0)