|
function XComGameState_Ability CreateInstanceFromTemplate(XComGameState NewGameState) |
|
{ |
|
local XComGameState_Ability Ability; |
|
|
|
// Begin Issue #763 |
|
/// HL-Docs: ref:CustomTargetStyles |
|
if (AllTargetStylesNative()) |
|
{ |
|
Ability = XComGameState_Ability(NewGameState.CreateNewStateObject(class'XComGameState_Ability', self)); |
|
} |
|
else |
|
{ |
|
Ability = XComGameState_Ability(NewGameState.CreateNewStateObject(class'XComGameState_Ability_CH', self)); |
|
} |
|
// End Issue #763 |
|
|
|
return Ability; |
|
} |
|
|
|
// Start Issue #763 |
|
simulated private function bool AllTargetStylesNative() |
|
{ |
|
// The AbilityPassiveAOEStyle is never required by native code, so we don't have to check it here. |
|
return (AbilityTargetStyle != none && CH_ClassIsNative(AbilityTargetStyle.Class)) |
|
&& (AbilityMultiTargetStyle != none && CH_ClassIsNative(AbilityMultiTargetStyle.Class)); |
|
} |
|
// End Issue #763 |
I've added a bit of logging:
`log("Instantiating XComGameState_Ability_CH for" @ DataName,, 'CH_ScriptTargetStyle');
Ability = XComGameState_Ability(NewGameState.CreateNewStateObject(class'XComGameState_Ability_CH', self));
Result is a bit more than one would expect: https://gist.github.com/Xymanek/7d568340cb4811e8e64e5ccd50cd72d5
cc @robojumper as the author of the latest implementation (#918)
X2WOTCCommunityHighlander/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2AbilityTemplate.uc
Lines 257 to 283 in 84ae0e3
I've added a bit of logging:
Result is a bit more than one would expect: https://gist.github.com/Xymanek/7d568340cb4811e8e64e5ccd50cd72d5
cc @robojumper as the author of the latest implementation (#918)