2017-10-19 21:00:49 -05:00
|
|
|
// Trait group info.
|
|
|
|
Class Ext_TGroupBase extends Object
|
|
|
|
abstract;
|
|
|
|
|
2020-06-26 03:52:31 +03:00
|
|
|
var() localized string GroupInfo;
|
2017-10-19 21:00:49 -05:00
|
|
|
var() bool bLimitToOne; // Limit to only one trait for this group.
|
|
|
|
|
2020-11-28 23:04:55 +03:00
|
|
|
static function string GetUIInfo(Ext_PerkBase Perk)
|
2017-10-19 21:00:49 -05:00
|
|
|
{
|
|
|
|
return (Default.bLimitToOne ? Default.GroupInfo$" (MAX 1)" : Default.GroupInfo);
|
|
|
|
}
|
2020-11-29 00:54:57 +03:00
|
|
|
|
2017-10-19 21:00:49 -05:00
|
|
|
static function string GetUIDesc()
|
|
|
|
{
|
|
|
|
return Default.GroupInfo$" trait group";
|
|
|
|
}
|
|
|
|
|
|
|
|
// See if group is already using up limitation.
|
2020-11-28 23:04:55 +03:00
|
|
|
static function bool GroupLimited(Ext_PerkBase Perk, class<Ext_TraitBase> Trait)
|
2017-10-19 21:00:49 -05:00
|
|
|
{
|
|
|
|
local int i;
|
|
|
|
|
2020-11-28 23:12:58 +03:00
|
|
|
if (Default.bLimitToOne)
|
2017-10-19 21:00:49 -05:00
|
|
|
{
|
2020-11-28 23:12:58 +03: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-19 21:00:49 -05:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
}
|