Иконка ресурса

FREE WaterPatrol : 1.0.2 1.0.2

Нет прав для скачивания
C#:
using System;
using System.Collections.Generic;
using UnityEngine;
using Newtonsoft.Json;
using Oxide.Core;
using Newtonsoft.Json.Linq;
using Oxide.Core.Plugins;
using Facepunch;
using Oxide.Plugins.WaterPatrolExtensionMethods;
namespace Oxide.Plugins {
    [Info("WaterPatrol", "Sempai#3239", "1.0.2")]
    internal class WaterPatrol : RustPlugin {
#region Config
        private const bool En = true;
        private PluginConfig _config;
        protected override void LoadDefaultConfig() {
            Puts("Creating a default config...");
            _config = PluginConfig.DefaultConfig();
            _config.PluginVersion = Version;
            SaveConfig();
            Puts("Creation of the default config completed!");
        }
        protected override void LoadConfig() {
            base.LoadConfig();
            _config = Config.ReadObject<PluginConfig>();
            if (_config.PluginVersion < Version) UpdateConfigValues();
        }
        private void UpdateConfigValues() {
            Puts("Config update detected! Updating config values...");
            if (_config.PluginVersion < new VersionNumber(1, 0, 2)) {
                foreach (BoatConfig config in _config.Boats) {
                    config.Marker = new MarkerConfig {
                        Enabled = false, Name = "Water Patrol", Radius = 0.4f, Alpha = 0.6f, Color = new ColorConfig {
                            R = 0.81f, G = 0.25f, B = 0.15f
                        }
                    }
                    ;
                    config.EnginePower = 2000f;
                }
                _config.TimeKillGround = 3f;
                _config.PreventDamageRange = true;
                _config.WaterDepthSpawn = 15f;
            }
            _config.PluginVersion = Version;
            Puts("Config update completed!");
            SaveConfig();
        }
        protected override void SaveConfig() => Config.WriteObject(_config);
        public class ItemConfig {
            [JsonProperty("ShortName")]
            public string ShortName {
                get;
                set;
            }
            [JsonProperty(En ? "Minimum" : "Минимальное кол-во")]
            public int MinAmount {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum" : "Максимальное кол-во")]
            public int MaxAmount {
                get;
                set;
            }
            [JsonProperty(En ? "Chance [0.0-100.0]" : "Шанс выпадения предмета [0.0-100.0]")]
            public float Chance {
                get;
                set;
            }
            [JsonProperty(En ? "Is this a blueprint? [true/false]" : "Это чертеж? [true/false]")]
            public bool IsBluePrint {
                get;
                set;
            }
            [JsonProperty("SkinID (0 - default)")]
            public ulong SkinID {
                get;
                set;
            }
            [JsonProperty(En ? "Name (empty - default)" : "Название (empty - default)")]
            public string Name {
                get;
                set;
            }
        }
        public class LootTableConfig {
            [JsonProperty(En ? "Minimum numbers of items" : "Минимальное кол-во элементов")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum numbers of items" : "Максимальное кол-во элементов")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "Use minimum and maximum values? [true/false]" : "Использовать минимальное и максимальное значение? [true/false]")]
            public bool UseCount {
                get;
                set;
            }
            [JsonProperty(En ? "List of items" : "Список предметов")]
            public List<ItemConfig> Items {
                get;
                set;
            }
        }
        public class PrefabConfig {
            [JsonProperty(En ? "Chance [0.0-100.0]" : "Шанс выпадения [0.0-100.0]")]
            public float Chance {
                get;
                set;
            }
            [JsonProperty(En ? "The path to the prefab" : "Путь к prefab-у")]
            public string PrefabDefinition {
                get;
                set;
            }
        }
        public class PrefabLootTableConfig {
            [JsonProperty(En ? "Minimum numbers of prefabs" : "Минимальное кол-во prefab-ов")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum numbers of prefabs" : "Максимальное кол-во prefab-ов")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "Use minimum and maximum values? [true/false]" : "Использовать минимальное и максимальное значение? [true/false]")]
            public bool UseCount {
                get;
                set;
            }
            [JsonProperty(En ? "List of prefabs" : "Список prefab-ов")]
            public List<PrefabConfig> Prefabs {
                get;
                set;
            }
        }
        public class CrateConfig {
            [JsonProperty(En ? "Which loot table should the plugin use? (0 - own; 1 - loot table of the Rust objects; 2 - combine the 1 and 2 methods)" : "Какую таблицу лута необходимо использовать? (0 - собственную; 1 - таблица предметов объектов Rust; 2 - совместить 1 и 2 методы)")]
            public int TypeLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Loot table from prefabs (if the loot table type is 1 or 2)" : "Таблица предметов из prefab-ов (если тип таблицы предметов - 1 или 2)")]
            public PrefabLootTableConfig PrefabLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Own loot table (if the loot table type is 0 or 2)" : "Собственная таблица предметов (если тип таблицы предметов - 0 или 2)")]
            public LootTableConfig OwnLootTable {
                get;
                set;
            }
        }
        public class NpcBelt {
            [JsonProperty("ShortName")]
            public string ShortName {
                get;
                set;
            }
            [JsonProperty(En ? "Amount" : "Кол-во")]
            public int Amount {
                get;
                set;
            }
            [JsonProperty("SkinID (0 - default)")]
            public ulong SkinID {
                get;
                set;
            }
            [JsonProperty(En ? "Mods" : "Модификации на оружие")]
            public HashSet<string> Mods {
                get;
                set;
            }
            [JsonProperty(En ? "Ammo" : "Боеприпасы")]
            public string Ammo {
                get;
                set;
            }
        }
        public class NpcWear {
            [JsonProperty("ShortName")]
            public string ShortName {
                get;
                set;
            }
            [JsonProperty("SkinID (0 - default)")]
            public ulong SkinID {
                get;
                set;
            }
        }
        public class NpcConfig {
            [JsonProperty(En ? "Name" : "Название")]
            public string Name {
                get;
                set;
            }
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Health {
                get;
                set;
            }
            [JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
            public float AttackRangeMultiplier {
                get;
                set;
            }
            [JsonProperty(En ? "Target Memory Duration [sec.]" : "Длительность памяти цели [sec.]")]
            public float MemoryDuration {
                get;
                set;
            }
            [JsonProperty(En ? "Scale damage" : "Множитель урона")]
            public float DamageScale {
                get;
                set;
            }
            [JsonProperty(En ? "Aim Cone Scale" : "Множитель разброса")]
            public float AimConeScale {
                get;
                set;
            }
            [JsonProperty(En ? "Wear items" : "Одежда")]
            public HashSet<NpcWear> WearItems {
                get;
                set;
            }
            [JsonProperty(En ? "Belt items" : "Быстрые слоты")]
            public HashSet<NpcBelt> BeltItems {
                get;
                set;
            }
            [JsonProperty(En ? "Kit (it is recommended to use the previous 2 settings to improve performance)" : "Kit (рекомендуется использовать предыдущие 2 пункта настройки для повышения производительности)")]
            public string Kit {
                get;
                set;
            }
        }
        public class DriverConfig {
            [JsonProperty(En ? "Name" : "Название")]
            public string Name {
                get;
                set;
            }
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Health {
                get;
                set;
            }
            [JsonProperty(En ? "Wear items" : "Одежда")]
            public HashSet<NpcWear> WearItems {
                get;
                set;
            }
        }
        public class BoatConfig {
            [JsonProperty(En ? "Chase Range" : "Дальность погони за целью")]
            public float ChaseRange {
                get;
                set;
            }
            [JsonProperty(En ? "Sense Range" : "Радиус обнаружения цели")]
            public float SenseRange {
                get;
                set;
            }
            [JsonProperty(En ? "Minimum" : "Минимальное кол-во")]
            public int MinAmount {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum" : "Максимальное кол-во")]
            public int MaxAmount {
                get;
                set;
            }
            [JsonProperty(En ? "Marker configuration on the map" : "Настройка маркера на карте")]
            public MarkerConfig Marker {
                get;
                set;
            }
            [JsonProperty(En ? "Engine power" : "Мощность двигателя")]
            public float EnginePower {
                get;
                set;
            }
            [JsonProperty(En ? "Crate setting" : "Настройка ящика")]
            public CrateConfig Crate {
                get;
                set;
            }
            [JsonProperty(En ? "Driver setting" : "Настройки водителя")]
            public DriverConfig Driver {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting - 1" : "Настройки NPC - 1")]
            public NpcConfig Npc1 {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting - 2" : "Настройки NPC - 2")]
            public NpcConfig Npc2 {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting - 3" : "Настройки NPC - 3")]
            public NpcConfig Npc3 {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting - 4" : "Настройки NPC - 4")]
            public NpcConfig Npc4 {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting - 5" : "Настройки NPC - 5")]
            public NpcConfig Npc5 {
                get;
                set;
            }
        }
        public class GuiAnnouncementsConfig {
            [JsonProperty(En ? "Do you use the GUI Announcements? [true/false]" : "Использовать ли GUI Announcements? [true/false]")]
            public bool IsGuiAnnouncements {
                get;
                set;
            }
            [JsonProperty(En ? "Banner color" : "Цвет баннера")]
            public string BannerColor {
                get;
                set;
            }
            [JsonProperty(En ? "Text color" : "Цвет текста")]
            public string TextColor {
                get;
                set;
            }
            [JsonProperty(En ? "Adjust Vertical Position" : "Отступ от верхнего края")]
            public float ApiAdjustVPosition {
                get;
                set;
            }
        }
        public class NotifyConfig {
            [JsonProperty(En ? "Do you use the Notify? [true/false]" : "Использовать ли Notify? [true/false]")]
            public bool IsNotify {
                get;
                set;
            }
            [JsonProperty(En ? "Type" : "Тип")]
            public string Type {
                get;
                set;
            }
        }
        public class ColorConfig {
            [JsonProperty("r")]
            public float R {
                get;
                set;
            }
            [JsonProperty("g")]
            public float G {
                get;
                set;
            }
            [JsonProperty("b")]
            public float B {
                get;
                set;
            }
        }
        public class MarkerConfig {
            [JsonProperty(En ? "Enabled? [true/false]" : "Включен? [true/false]")]
            public bool Enabled {
                get;
                set;
            }
            [JsonProperty(En ? "Name" : "Название")]
            public string Name {
                get;
                set;
            }
            [JsonProperty(En ? "Radius" : "Радиус")]
            public float Radius {
                get;
                set;
            }
            [JsonProperty(En ? "Alpha" : "Прозрачность")]
            public float Alpha {
                get;
                set;
            }
            [JsonProperty(En ? "Marker color" : "Цвет маркера")]
            public ColorConfig Color {
                get;
                set;
            }
        }
        private class PluginConfig {
            [JsonProperty(En ? "List of patrol boat presets" : "Список пресетов патрульных лодок")]
            public List<BoatConfig> Boats {
                get;
                set;
            }
            [JsonProperty(En ? "NPC Turret Damage Multiplier" : "Множитель урона от турелей по NPC")]
            public float TurretDamageScale {
                get;
                set;
            }
            [JsonProperty(En ? "Prefix of chat messages" : "Префикс сообщений в чате")]
            public string Prefix {
                get;
                set;
            }
            [JsonProperty(En ? "Do you use the chat? [true/false]" : "Использовать ли чат? [true/false]")]
            public bool IsChat {
                get;
                set;
            }
            [JsonProperty(En ? "GUI Announcements setting" : "Настройка GUI Announcements")]
            public GuiAnnouncementsConfig GuiAnnouncements {
                get;
                set;
            }
            [JsonProperty(En ? "Notify setting" : "Настройка Notify")]
            public NotifyConfig Notify {
                get;
                set;
            }
            [JsonProperty(En ? "The time before the patrol boat explodes when it hits the ground [sec.]" : "Время до взрыва патрульной лодки при ударе о землю [sec.]")]
            public float TimeKillGround {
                get;
                set;
            }
            [JsonProperty(En ? "The time of existence of the patrol boat before its destroy [sec.]" : "Время существования патрульной лодки до ее уничтожения [sec.]")]
            public float TimeKillLoot {
                get;
                set;
            }
            [JsonProperty(En ? "Prevent players from dealing damage to NPCs if they are out of the patrol boat's Sense Range? [true/false]" : "Запретить игрокам наносить урон по NPC, если они находятся вне радиуса обзора патрульной лодки? [true/false]")]
            public bool PreventDamageRange {
                get;
                set;
            }
            [JsonProperty(En ? "Minimum water depth where a patrol boat can appear" : "Минимальная глубина воды, где может появиться патрульная лодка")]
            public float WaterDepthSpawn {
                get;
                set;
            }
            [JsonProperty(En ? "Configuration version" : "Версия конфигурации")]
            public VersionNumber PluginVersion {
                get;
                set;
            }
            public static PluginConfig DefaultConfig() {
                return new PluginConfig() {
                    Boats = new List<BoatConfig> {
                        new BoatConfig {
                            ChaseRange = 400f, SenseRange = 200f, MinAmount = 6, MaxAmount = 6, Marker = new MarkerConfig {
                                Enabled = false, Name = "Water Patrol", Radius = 0.4f, Alpha = 0.6f, Color = new ColorConfig {
                                    R = 0.81f, G = 0.25f, B = 0.15f
                                }
                            }
                            , EnginePower = 2000f, Crate = new CrateConfig {
                                TypeLootTable = 2, PrefabLootTable = new PrefabLootTableConfig {
                                    Min = 1, Max = 1, UseCount = false, Prefabs = new List<PrefabConfig> {
                                        new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_oilrig.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal_2.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/underwater_labs/tech_parts_2.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/underwater_labs/crate_fuel.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal.prefab"
                                        }
                                    }
                                }
                                , OwnLootTable = new LootTableConfig {
                                    Min = 1, Max = 1, UseCount = false, Items = new List<ItemConfig> {
                                        new ItemConfig {
                                            ShortName = "diesel_barrel", MinAmount = 1, MaxAmount = 1, Chance = 50f, IsBluePrint = false, SkinID = 0, Name = ""
                                        }
                                        , new ItemConfig {
                                            ShortName = "scrap", MinAmount = 50, MaxAmount = 100, Chance = 100f, IsBluePrint = false, SkinID = 0, Name = ""
                                        }
                                        , new ItemConfig {
                                            ShortName = "syringe.medical", MinAmount = 1, MaxAmount = 2, Chance = 100.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                        }
                                    }
                                }
                            }
                            , Driver = new DriverConfig {
                                Name = "Driver", Health = 200f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 826587881
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 1552705077
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 1552703337
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.plate.torso", SkinID = 2843462369
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.facemask", SkinID = 2843464348
                                    }
                                }
                            }
                            , Npc1 = new NpcConfig {
                                Name = "Patrolman", Health = 125f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 826587881
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 1552705077
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 1552703337
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.jacket", SkinID = 1624100124
                                    }
                                    , new NpcWear {
                                        ShortName = "coffeecan.helmet", SkinID = 1624104393
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.lr300", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 3, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc2 = new NpcConfig {
                                Name = "Patrolman", Health = 125f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 826587881
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 1552705077
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 1552703337
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.jacket", SkinID = 1624100124
                                    }
                                    , new NpcWear {
                                        ShortName = "coffeecan.helmet", SkinID = 1624104393
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.lr300", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 3, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc3 = new NpcConfig {
                                Name = "Patrolman", Health = 125f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 826587881
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 1552705077
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 1552703337
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.jacket", SkinID = 1624100124
                                    }
                                    , new NpcWear {
                                        ShortName = "coffeecan.helmet", SkinID = 1624104393
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.lr300", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 3, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc4 = new NpcConfig {
                                Name = "Patrolman", Health = 125f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 826587881
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 1552705077
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 1552703337
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.jacket", SkinID = 1624100124
                                    }
                                    , new NpcWear {
                                        ShortName = "coffeecan.helmet", SkinID = 1624104393
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.lr300", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 3, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc5 = new NpcConfig {
                                Name = "Patrolman", Health = 125f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 826587881
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 1552705077
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 1552703337
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.jacket", SkinID = 1624100124
                                    }
                                    , new NpcWear {
                                        ShortName = "coffeecan.helmet", SkinID = 1624104393
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.lr300", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 3, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                        }
                        , new BoatConfig {
                            ChaseRange = 400f, SenseRange = 200f, MinAmount = 4, MaxAmount = 4, Marker = new MarkerConfig {
                                Enabled = false, Name = "Water Patrol", Radius = 0.4f, Alpha = 0.6f, Color = new ColorConfig {
                                    R = 0.81f, G = 0.25f, B = 0.15f
                                }
                            }
                            , EnginePower = 2000f, Crate = new CrateConfig {
                                TypeLootTable = 2, PrefabLootTable = new PrefabLootTableConfig {
                                    Min = 1, Max = 1, UseCount = false, Prefabs = new List<PrefabConfig> {
                                        new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_oilrig.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_elite.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/underwater_labs/tech_parts_2.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/underwater_labs/crate_fuel.prefab"
                                        }
                                        , new PrefabConfig {
                                            Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal.prefab"
                                        }
                                    }
                                }
                                , OwnLootTable = new LootTableConfig {
                                    Min = 1, Max = 1, UseCount = false, Items = new List<ItemConfig> {
                                        new ItemConfig {
                                            ShortName = "diesel_barrel", MinAmount = 1, MaxAmount = 1, Chance = 100f, IsBluePrint = false, SkinID = 0, Name = ""
                                        }
                                        , new ItemConfig {
                                            ShortName = "scrap", MinAmount = 50, MaxAmount = 100, Chance = 100f, IsBluePrint = false, SkinID = 0, Name = ""
                                        }
                                        , new ItemConfig {
                                            ShortName = "syringe.medical", MinAmount = 1, MaxAmount = 2, Chance = 100.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                        }
                                    }
                                }
                            }
                            , Driver = new DriverConfig {
                                Name = "Driver", Health = 400f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 971729488
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 963501284
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 963496340
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.plate.torso", SkinID = 1192804139
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.facemask", SkinID = 1121237616
                                    }
                                }
                            }
                            , Npc1 = new NpcConfig {
                                Name = "Patrolman", Health = 200f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 971729488
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 963501284
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 963496340
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.plate.torso", SkinID = 1192804139
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.facemask", SkinID = 1121237616
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.ak.ice", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc2 = new NpcConfig {
                                Name = "Patrolman", Health = 200f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 971729488
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 963501284
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 963496340
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.plate.torso", SkinID = 1192804139
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.facemask", SkinID = 1121237616
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "rifle.ak.ice", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc3 = null, Npc4 = new NpcConfig {
                                Name = "Patrolman", Health = 200f, AttackRangeMultiplier = 1.5f, MemoryDuration = 20f, DamageScale = 0.7f, AimConeScale = 1.5f, WearItems = new HashSet<NpcWear> {
                                    new NpcWear {
                                        ShortName = "shoes.boots", SkinID = 971729488
                                    }
                                    , new NpcWear {
                                        ShortName = "pants", SkinID = 963501284
                                    }
                                    , new NpcWear {
                                        ShortName = "hoodie", SkinID = 963496340
                                    }
                                    , new NpcWear {
                                        ShortName = "burlap.gloves", SkinID = 1552705918
                                    }
                                    , new NpcWear {
                                        ShortName = "roadsign.kilt", SkinID = 1624102935
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.plate.torso", SkinID = 1192804139
                                    }
                                    , new NpcWear {
                                        ShortName = "metal.facemask", SkinID = 1121237616
                                    }
                                }
                                , BeltItems = new HashSet<NpcBelt> {
                                    new NpcBelt {
                                        ShortName = "multiplegrenadelauncher", Amount = 1, SkinID = 0, Mods = new HashSet<string> {
                                            "weapon.mod.flashlight", "weapon.mod.holosight"
                                        }
                                        , Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "rocket.launcher", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                    , new NpcBelt {
                                        ShortName = "syringe.medical", Amount = 1, SkinID = 0, Mods = new HashSet<string>(), Ammo = string.Empty
                                    }
                                }
                                , Kit = ""
                            }
                            , Npc5 = null
                        }
                        , new BoatConfig {
                            ChaseRange = 200f, SenseRange = 100f, MinAmount = 8, MaxAmount = 8, Marker = new MarkerConfig {
                                Enabled = false, Name = "Water Patrol", Radius = 0.4f, Alpha = 0.6f, Color = new ColorConfig {
                                    R = 0.81f, G = 0.25f, B = 0.15f
                                }
                            }
                            , EnginePower = 2000f, Crate = new CrateConfig {
                                TypeLootTable = 2, PrefabLootTable = new PrefabLootTableConfig {
                                    Min = 1, Max = 1, UseCount = false, P
// ... [Code preview truncated due to length. Full source in attached file] ...

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху