39 lines
665 B
Ucode
Raw Normal View History

2022-09-07 15:57:47 +03:00
class RankRelations extends Object
dependson(YAS_Types)
config(YAS);
2022-09-13 00:26:41 +03:00
var public config Array<RankRelation> Relation;
2022-09-07 15:57:47 +03:00
public static function InitConfig(int Version, int LatestVersion)
{
switch (Version)
{
case `NO_CONFIG:
ApplyDefault();
2022-09-07 15:57:47 +03:00
default: break;
}
2022-09-07 15:57:47 +03:00
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault()
{
local RankRelation NewRankRelation;
2022-09-13 00:26:41 +03:00
default.Relation.Length = 0;
2022-09-07 15:57:47 +03:00
// Example relation:
NewRankRelation.RankID = 1; // "Man of culture" ID
NewRankRelation.ObjectID = "103582791429670253"; // HENTAI Group SteamID64
2022-09-13 00:26:41 +03:00
default.Relation.AddItem(NewRankRelation);
2022-09-07 15:57:47 +03:00
}
defaultproperties
{
}