2017-10-20 02:00:49 +00:00
|
|
|
// Trait group info.
|
2021-01-17 21:55:45 +00:00
|
|
|
Class Ext_TGroupBase extends Object;
|
2017-10-20 02:00:49 +00:00
|
|
|
|
2020-06-26 00:52:31 +00:00
|
|
|
var() localized string GroupInfo;
|
2017-10-20 02:00:49 +00:00
|
|
|
var() bool bLimitToOne; // Limit to only one trait for this group.
|
2021-01-17 21:55:45 +00:00
|
|
|
var localized string TraitGroupText;
|
|
|
|
var localized string MaxText;
|
2017-10-20 02:00:49 +00:00
|
|
|
|
2021-01-17 21:55:45 +00:00
|
|
|
function string GetUIInfo(Ext_PerkBase Perk)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2021-01-17 21:55:45 +00:00
|
|
|
return (Default.bLimitToOne ? Default.GroupInfo$" ("$MaxText$" 1)" : Default.GroupInfo);
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
2020-11-28 21:54:57 +00:00
|
|
|
|
2021-01-17 21:55:45 +00:00
|
|
|
function string GetUIDesc()
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2021-01-17 21:55:45 +00:00
|
|
|
return Default.GroupInfo@TraitGroupText;
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// See if group is already using up limitation.
|
2020-11-28 20:04:55 +00:00
|
|
|
static function bool GroupLimited(Ext_PerkBase Perk, class<Ext_TraitBase> Trait)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
local int i;
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (Default.bLimitToOne)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-11-28 20:12:58 +00:00
|
|
|
for (i=0; i<Perk.PerkTraits.Length; ++i)
|
|
|
|
if (Perk.PerkTraits[i].CurrentLevel>0 && Perk.PerkTraits[i].TraitType!=Trait && Perk.PerkTraits[i].TraitType.Default.TraitGroup==Default.Class)
|
2017-10-20 02:00:49 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
}
|