protected override void LoadDefaultConfig()
 {
     _config = new SKFConfig
     {
         EnableSuicides       = true,
         EnableRadiationKills = true,
         IconId               = 76561197960839785UL,
         MaxFeedMessages      = 5,
         MaxPlayerNameLength  = 18,
         FeedMessageTtlSec    = 7,
         EnableChatFeed       = true,
         HeightIdent          = 0.0185f,
         AnchorMax            = "0.995 0.986",
         AnchorMin            = "0.723 0.964",
         FontSize             = 12,
         OutlineSize          = "0.5 0.5",
         DefaultDistanceColor = "#FF8000",
         DistanceColors       = new[]
         {
             new SKFConfig.DistanceColor
             {
                 Color             = "#FFFFFF",
                 DistanceThreshold = 50
             },
             new SKFConfig.DistanceColor
             {
                 Color             = "#91D6FF",
                 DistanceThreshold = 100
             },
             new SKFConfig.DistanceColor
             {
                 Color             = "#FFFF00",
                 DistanceThreshold = 150
             }
         },
         Ents = new List <string>()
         {
             "AutoTurret",
             "FlameTurret",
             "GunTrap",
             "Landmine",
             "BearTrap",
             "BaseHelicopter",
             "BradleyAPC"
         },
         Weapons = new Dictionary <string, string>()
         {
             { "Assault Rifle", "Ak-47" },
             { "LR-300 Assault Rifle", "LR-300" },
             { "L96 Rifle", "L96" },
             { "Bolt Action Rifle", "Bolt" },
             { "Semi-Automatic Rifle", "Semi-AR" },
             { "Semi-Automatic Pistol", "Semi-AP" },
             { "Spas-12 Shotgun", "Spas-12" },
             { "M92 Pistol", "M92" }
         }
     };
 }
 private void Unload()
 {
     _killQueue = null;
     UnityEngine.Object.Destroy(_holder);
     _holder = null;
     for (var i = 0; i < _config.MaxFeedMessages; i++)
     {
         KillQueue.RemoveKillCui($"kf-{i}");
     }
     _config = null;
     Pool.directory.Remove(typeof(KillEvent));
     SaveData();
 }
 protected override void LoadConfig()
 {
     base.LoadConfig();
     _config = Config.ReadObject <SKFConfig>();
     if (_config.AnchorMax != null && _config.AnchorMin != null && _config.OutlineSize != null)
     {
         return;
     }
     _config.AnchorMax   = "0.995 0.986";
     _config.AnchorMin   = "0.723 0.964";
     _config.OutlineSize = "0.5 0.5";
     SaveConfig();
     PrintWarning("Config got updated! New entries are added.");
 }
예제 #4
0
 protected override void LoadConfig()
 {
     base.LoadConfig();
     _config = Config.ReadObject <SKFConfig>();
 }
예제 #5
0
 protected override void LoadDefaultConfig()
 {
     _config = new SKFConfig
     {
         EnableEntityFeed     = true,
         EnableAnimalFeed     = true,
         EnableNpcFeed        = true,
         EnableSuicides       = true,
         EnableRadiationKills = true,
         IconId               = 76561197960839785UL,
         MaxFeedMessages      = 5,
         MaxPlayerNameLength  = 18,
         FeedMessageTtlSec    = 7,
         EnableChatFeed       = true,
         EnableLogging        = false,
         HeightIdent          = 0.0185f,
         AnchorMax            = "0.995 0.986",
         AnchorMin            = "0.723 0.964",
         FontSize             = 12,
         OutlineSize          = "0.5 0.5",
         DefaultDistanceColor = "#FF8000",
         DistanceColors       = new[]
         {
             new SKFConfig.DistanceColor
             {
                 Color             = "#FFFFFF",
                 DistanceThreshold = 50
             },
             new SKFConfig.DistanceColor
             {
                 Color             = "#91D6FF",
                 DistanceThreshold = 100
             },
             new SKFConfig.DistanceColor
             {
                 Color             = "#FFFF00",
                 DistanceThreshold = 150
             }
         },
         Ents = new Dictionary <string, string>()
         {
             { "autoturret_deployed", "Auto Turret" },
             { "flameturret.deployed", "Flame Turret" },
             { "guntrap.deployed", "Gun Trap" },
             { "landmine", "Landmine" },
             { "beartrap", "Bear Trap" },
             { "sam_site_turret_deployed", "Sam Site Turret" },
             { "patrolhelicopter", "Helicopter" },
             { "bradleyapc", "Bradley APC" }
         },
         Animal = new Dictionary <string, string>()
         {
             { "bear", "Bear" },
             { "wolf", "Wolf" },
             { "stag", "Stag" },
             { "boar", "Boar" },
             { "chicken", "Chicken" },
             { "horse", "Horse" }
         },
         Weapons = new Dictionary <string, string>()
         {
             { "Assault Rifle", "Ak-47" },
             { "LR-300 Assault Rifle", "LR-300" },
             { "L96 Rifle", "L96" },
             { "Bolt Action Rifle", "Bolt" },
             { "Semi-Automatic Rifle", "Semi-AR" },
             { "Semi-Automatic Pistol", "Semi-AP" },
             { "Spas-12 Shotgun", "Spas-12" },
             { "M92 Pistol", "M92" }
         },
         Npcs = new Dictionary <string, string>()
         {
             { "scientist", "Scientist Npc" }
         }
     };
 }