2021-06-08 21:21:28 +00:00
|
|
|
class SystemPlayerRank extends Object
|
2021-05-31 01:46:53 +00:00
|
|
|
dependson(Types)
|
2021-06-20 05:04:22 +00:00
|
|
|
config(YAS);
|
2021-05-31 01:46:53 +00:00
|
|
|
|
2021-06-12 20:11:37 +00:00
|
|
|
`include(Build.uci)
|
|
|
|
`include(Logger.uci)
|
|
|
|
|
2021-05-31 01:46:53 +00:00
|
|
|
var config string Rank;
|
2021-06-08 23:22:35 +00:00
|
|
|
var config ColorRGBA TextColor;
|
2021-05-31 01:46:53 +00:00
|
|
|
var config Fields ApplyColorToFields;
|
2021-06-07 02:04:40 +00:00
|
|
|
|
2021-07-05 03:02:30 +00:00
|
|
|
public static function InitConfig(int ConfigVersion)
|
|
|
|
{
|
|
|
|
`callstack_static("InitConfig");
|
|
|
|
|
|
|
|
switch (ConfigVersion)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
WriteSettings(DefaultSettings());
|
|
|
|
|
2021-07-05 03:53:26 +00:00
|
|
|
case 1:
|
|
|
|
|
2021-07-05 03:02:30 +00:00
|
|
|
case 2147483647:
|
|
|
|
StaticSaveConfig();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-20 20:09:12 +00:00
|
|
|
public static function YASSettingsPlayer DefaultSettings()
|
2021-06-09 00:58:31 +00:00
|
|
|
{
|
2021-06-20 20:09:12 +00:00
|
|
|
local YASSettingsPlayer Settings;
|
2021-06-12 20:11:37 +00:00
|
|
|
|
2021-06-13 00:02:17 +00:00
|
|
|
`callstack_static("DefaultSettings");
|
2021-06-12 20:11:37 +00:00
|
|
|
|
2021-06-09 00:58:31 +00:00
|
|
|
return Settings;
|
|
|
|
}
|
|
|
|
|
2021-06-20 20:09:12 +00:00
|
|
|
public static function YASSettingsPlayer Settings()
|
2021-06-09 00:58:31 +00:00
|
|
|
{
|
2021-06-20 20:09:12 +00:00
|
|
|
local YASSettingsPlayer Settings;
|
2021-06-09 00:58:31 +00:00
|
|
|
|
2021-06-13 00:02:17 +00:00
|
|
|
`callstack_static("Settings");
|
2021-06-12 20:11:37 +00:00
|
|
|
|
2021-06-09 00:58:31 +00:00
|
|
|
Settings.Rank = default.Rank;
|
|
|
|
Settings.TextColor = default.TextColor;
|
|
|
|
Settings.ApplyColorToFields = default.ApplyColorToFields;
|
|
|
|
|
|
|
|
return Settings;
|
|
|
|
}
|
|
|
|
|
2021-06-20 20:09:12 +00:00
|
|
|
public static function WriteSettings(YASSettingsPlayer Settings)
|
2021-06-09 00:58:31 +00:00
|
|
|
{
|
2021-06-13 00:02:17 +00:00
|
|
|
`callstack_static("WriteSettings");
|
2021-06-12 20:11:37 +00:00
|
|
|
|
2021-06-09 00:58:31 +00:00
|
|
|
default.Rank = Settings.Rank;
|
|
|
|
default.TextColor = Settings.TextColor;
|
|
|
|
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
|
|
|
}
|
|
|
|
|
2022-09-03 10:05:39 +00:00
|
|
|
defaultproperties
|
2021-06-07 02:04:40 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|