Hash :
1093ceb3
Author :
Date :
2020-04-27T22:33:02
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<h2>Full example</h2>
<pre><code>// Source: https://github.com/Jusas/XCOM2_ReconSoldierClass/blob/master/ReconOperatorSoldierClass/Src/ReconSoldierClass/Classes/ReconOperator_AcademyUnlocks.uc
class ReconOperator_AcademyUnlocks extends X2StrategyElement;
static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> Templates;
Templates.AddItem(AdrenalineUnlock());
return Templates;
}
static function X2SoldierAbilityUnlockTemplate AdrenalineUnlock()
{
local X2SoldierAbilityUnlockTemplate Template;
local ArtifactCost Resources;
`CREATE_X2TEMPLATE(class'X2SoldierAbilityUnlockTemplate', Template, 'ReconAdrenalineUnlock');
Template.AllowedClasses.AddItem('ReconSoldierClass');
Template.AbilityName = 'ReconAdrenalineSpike';
Template.strImage = "img:///UILibrary_ReconOperator.GTS.GTS_adrenaline";
// Requirements
Template.Requirements.RequiredHighestSoldierRank = 5;
Template.Requirements.RequiredSoldierClass = 'ReconSoldierClass';
Template.Requirements.RequiredSoldierRankClassCombo = true;
Template.Requirements.bVisibleIfSoldierRankGatesNotMet = true;
// Cost
Resources.ItemTemplateName = 'Supplies';
Resources.Quantity = 75;
Template.Cost.ResourceCosts.AddItem(Resources);
return Template;
}</code></pre>