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