2022-09-08 19:17:55 +00:00
|
|
|
class MessageOfTheDay extends Object
|
|
|
|
config(YAS);
|
|
|
|
|
|
|
|
var public config bool bRandomize;
|
|
|
|
var public config int DisplayTime;
|
|
|
|
var public config Array<String> Message;
|
|
|
|
|
|
|
|
public static function InitConfig(int Version, int LatestVersion)
|
|
|
|
{
|
|
|
|
switch (Version)
|
|
|
|
{
|
|
|
|
case `NO_CONFIG:
|
|
|
|
ApplyDefault();
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-08 19:17:55 +00:00
|
|
|
default: break;
|
|
|
|
}
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-08 19:17:55 +00:00
|
|
|
if (LatestVersion != Version)
|
|
|
|
{
|
|
|
|
StaticSaveConfig();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private static function ApplyDefault()
|
|
|
|
{
|
|
|
|
default.DisplayTime = 30;
|
|
|
|
default.bRandomize = true;
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-08 19:17:55 +00:00
|
|
|
default.Message.Length = 0;
|
|
|
|
default.Message.AddItem("UwU");
|
|
|
|
default.Message.AddItem("OwO");
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
|
2023-05-02 19:15:42 +00:00
|
|
|
}
|