C#:
using Facepunch;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Oxide.Core;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using Oxide.Plugins.DefendableBasesExtensionMethods;
using Rust;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using UnityEngine;
namespace Oxide.Plugins {
[Info("DefendableBases", "KpucTaJl", "1.3.1")]
internal class DefendableBases : RustPlugin {
#region Config
private const bool En = false;
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, 4)) {
_config.Urls = new HashSet<ImageURL> {
new ImageURL {
Name = "Tab_KpucTaJl", Url = "Images/Tab_KpucTaJl.png"
}
, new ImageURL {
Name = "Clock_KpucTaJl", Url = "Images/Clock_KpucTaJl.png"
}
, new ImageURL {
Name = "Plus_KpucTaJl", Url = "Images/Plus_KpucTaJl.png"
}
, new ImageURL {
Name = "Bookmark_KpucTaJl", Url = "Images/Bookmark_KpucTaJl.png"
}
, new ImageURL {
Name = "Tablet_KpucTaJl", Url = "Images/Tablet_KpucTaJl.png"
}
, new ImageURL {
Name = "Lock_KpucTaJl", Url = "Images/Lock_KpucTaJl.png"
}
, new ImageURL {
Name = "Economic", Url = "Images/Economic.png"
}
, new ImageURL {
Name = "2777422016", Url = "Images/2777422016.png"
}
, new ImageURL {
Name = "2777422268", Url = "Images/2777422268.png"
}
, new ImageURL {
Name = "2803087918", Url = "Images/2803087918.png"
}
, new ImageURL {
Name = "2777422630", Url = "Images/2777422630.png"
}
, new ImageURL {
Name = "2777422812", Url = "Images/2777422812.png"
}
, new ImageURL {
Name = "autoturret", Url = "Images/autoturret.png"
}
, new ImageURL {
Name = "flameturret", Url = "Images/flameturret.png"
}
, new ImageURL {
Name = "guntrap", Url = "Images/guntrap.png"
}
, new ImageURL {
Name = "ammo.rifle", Url = "Images/ammo.rifle.png"
}
, new ImageURL {
Name = "ammo.rifle.hv", Url = "Images/ammo.rifle.hv.png"
}
, new ImageURL {
Name = "ammo.rifle.incendiary", Url = "Images/ammo.rifle.incendiary.png"
}
, new ImageURL {
Name = "ammo.rifle.explosive", Url = "Images/ammo.rifle.explosive.png"
}
, new ImageURL {
Name = "lowgradefuel", Url = "Images/lowgradefuel.png"
}
, new ImageURL {
Name = "ammo.handmade.shell", Url = "Images/ammo.handmade.shell.png"
}
, new ImageURL {
Name = "blueberries", Url = "Images/blueberries.png"
}
, new ImageURL {
Name = "cctv.camera", Url = "Images/cctv.camera.png"
}
, new ImageURL {
Name = "gears", Url = "Images/gears.png"
}
, new ImageURL {
Name = "grenade.f1", Url = "Images/grenade.f1.png"
}
, new ImageURL {
Name = "gunpowder", Url = "Images/gunpowder.png"
}
, new ImageURL {
Name = "largemedkit", Url = "Images/largemedkit.png"
}
, new ImageURL {
Name = "metal.fragments", Url = "Images/metal.fragments.png"
}
, new ImageURL {
Name = "metal.refined", Url = "Images/metal.refined.png"
}
, new ImageURL {
Name = "rope", Url = "Images/rope.png"
}
, new ImageURL {
Name = "scrap", Url = "Images/scrap.png"
}
, new ImageURL {
Name = "stones", Url = "Images/stones.png"
}
, new ImageURL {
Name = "sulfur", Url = "Images/sulfur.png"
}
, new ImageURL {
Name = "syringe.medical", Url = "Images/syringe.medical.png"
}
, new ImageURL {
Name = "targeting.computer", Url = "Images/targeting.computer.png"
}
, new ImageURL {
Name = "wood", Url = "Images/wood.png"
}
}
;
}
if (_config.PluginVersion < new VersionNumber(1, 1, 1)) {
_config.Juggernaut = new JuggernautConfig {
WearItems = new List<NpcWear> {
new NpcWear {
ShortName = "frankensteins.monster.03.head", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.03.torso", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.03.legs", SkinID = 0
}
}
, Weapons = new List<ProjectileBelt> {
new ProjectileBelt {
ShortName = "hmlmg", SkinID = 0, Ammo = string.Empty, Mods = new List<string> {
"weapon.mod.holosight", "weapon.mod.flashlight"
}
, Chance = 100f, DamageScale = 0.4f
}
}
, BeancanGrenade = 15f, Health = 250f, AttackRangeMultiplier = 1f, AimConeScale = 1.3f, Speed = 5f, TurretDamageScale = 0.25f
}
;
_config.WeaponToScaleDamageNpc = new Dictionary<string, float> {
["grenade.beancan.deployed"]
= 0.5f, ["grenade.f1.deployed"] = 0.5f, ["explosive.satchel.deployed"] = 0.5f, ["explosive.timed.deployed"] = 0.5f, ["rocket_hv"] = 0.5f, ["rocket_basic"] = 0.5f, ["40mm_grenade_he"] = 0.5f
}
;
}
if (_config.PluginVersion < new VersionNumber(1, 1, 3)) {
_config.Urls.Add(new ImageURL {
Name = "Npc_KpucTaJl", Url = "Images/Npc_KpucTaJl.png"
}
);
_config.Commands = new HashSet<string> {
"/remove", "remove.toggle"
}
;
}
if (_config.PluginVersion < new VersionNumber(1, 1, 8)) {
_config.Bomber = new BomberConfig {
WearItems = new List<NpcWear> {
new NpcWear {
ShortName = "scarecrow.suit", SkinID = 0
}
, new NpcWear {
ShortName = "metal.plate.torso", SkinID = 860210174
}
,
}
, Health = 100f, AttackRangeMultiplier = 1f, Speed = 5.5f, DamageBarricade = 200f, DamageGeneral = 60f, DamagePlayer = 60f
}
;
}
if (_config.PluginVersion < new VersionNumber(1, 2, 0)) {
_config.PveMode.ScaleDamage = new Dictionary<string, float> {
["Npc"]
= 1f
}
;
_config.Marker.Name = "DefendableBases";
}
if (_config.PluginVersion < new VersionNumber(1, 2, 1)) {
_config.Marker.Name = "DefendableBases";
}
_config.PluginVersion = Version;
Puts("Config update completed!");
SaveConfig();
}
protected override void SaveConfig() => Config.WriteObject(_config);
public class NpcWear {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinID {
get;
set;
}
}
public class SledgeBelt {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinID {
get;
set;
}
[JsonProperty(En ? "Probability Percent [0.0-100.0]" : "Вероятность [0.0-100.0]")]
public float Chance {
get;
set;
}
}
public class SledgeConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public List<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Weapons" : "Оружие")]
public List<SledgeBelt> Weapons {
get;
set;
}
[JsonProperty(En ? "The probability of the appearance of Beancan Grenades" : "Вероятность появления бобовой гранаты")]
public float BeancanGrenade {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Damage Scale" : "Множитель урона")]
public float DamageScale {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
[JsonProperty(En ? "NPC damage each second to Barricade or The General" : "Кол-во урона, которое наносит NPC по баррикаде или генералу в секунду")]
public float DamagePerSec {
get;
set;
}
[JsonProperty(En ? "Turret damage scale" : "Множитель урона от турелей")]
public float TurretDamageScale {
get;
set;
}
}
public class ProjectileBelt {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinID {
get;
set;
}
[JsonProperty(En ? "Mods" : "Модификации на оружие")]
public List<string> Mods {
get;
set;
}
[JsonProperty(En ? "Ammo" : "Боеприпасы")]
public string Ammo {
get;
set;
}
[JsonProperty(En ? "Probability Percent [0.0-100.0]" : "Вероятность [0.0-100.0]")]
public float Chance {
get;
set;
}
[JsonProperty(En ? "Damage Scale" : "Множитель урона")]
public float DamageScale {
get;
set;
}
}
public class BlazerConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public List<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Weapons" : "Оружие")]
public List<ProjectileBelt> Weapons {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
public float AttackRangeMultiplier {
get;
set;
}
[JsonProperty(En ? "Aim Cone Scale" : "Множитель разброса")]
public float AimConeScale {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
}
public class JuggernautConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public List<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Weapons" : "Оружие")]
public List<ProjectileBelt> Weapons {
get;
set;
}
[JsonProperty(En ? "The probability of the appearance of Beancan Grenades" : "Вероятность появления бобовой гранаты")]
public float BeancanGrenade {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
public float AttackRangeMultiplier {
get;
set;
}
[JsonProperty(En ? "Aim Cone Scale" : "Множитель разброса")]
public float AimConeScale {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
[JsonProperty(En ? "Turret damage scale" : "Множитель урона от турелей")]
public float TurretDamageScale {
get;
set;
}
}
public class BomberConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public List<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
public float AttackRangeMultiplier {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
[JsonProperty(En ? "NPC damage to Barricade" : "Кол-во урона, которое наносит NPC по баррикаде")]
public float DamageBarricade {
get;
set;
}
[JsonProperty(En ? "NPC damage to The General" : "Кол-во урона, которое наносит NPC по генералу")]
public float DamageGeneral {
get;
set;
}
[JsonProperty(En ? "NPC damage to player" : "Кол-во урона, которое наносит NPC по игроку")]
public float DamagePlayer {
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 ? "Name" : "Название")]
public string Name {
get;
set;
}
[JsonProperty(En ? "Radius" : "Радиус")]
public float Radius {
get;
set;
}
[JsonProperty(En ? "Transparency" : "Прозрачность")]
public float Alpha {
get;
set;
}
[JsonProperty(En ? "Marker color" : "Цвет маркера")]
public ColorConfig Color {
get;
set;
}
}
public class GuiAnnouncementsConfig {
[JsonProperty(En ? "Do you use the GUI Announcements plugin? [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 plugin? [true/false]" : "Использовать ли плагин Notify? [true/false]")]
public bool IsNotify {
get;
set;
}
[JsonProperty(En ? "Type" : "Тип")]
public string Type {
get;
set;
}
}
public class DiscordConfig {
[JsonProperty(En ? "Do you use the Discord Messages plugin? [true/false]" : "Использовать ли плагин Discord Messages? [true/false]")]
public bool IsDiscord {
get;
set;
}
[JsonProperty("Webhook URL")]
public string WebhookUrl {
get;
set;
}
[JsonProperty(En ? "Embed Color (DECIMAL)" : "Цвет полосы (DECIMAL)")]
public int EmbedColor {
get;
set;
}
[JsonProperty(En ? "Keys of required messages" : "Ключи необходимых сообщений")]
public HashSet<string> Keys {
get;
set;
}
}
public class BarricadeConfig {
[JsonProperty(En ? "Level" : "Уровень")]
public int Level {
get;
set;
}
[JsonProperty(En ? "Hit points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Price for repairs (per hammer hit)" : "Цена за ремонт (один удар киянкой)")]
public PriceConfig Price {
get;
set;
}
[JsonProperty(En ? "Hit points recovered (per hammer hit)" : "Кол-во ХП ремонта (один удар киянкой)")]
public float HealthRepair {
get;
set;
}
}
public class PveModeConfig {
[JsonProperty(En ? "Use the PVE mode of the plugin? [true/false]" : "Использовать PVE режим работы плагина? [true/false]")]
public bool Pve {
get;
set;
}
[JsonProperty(En ? "The amount of damage that the player has to do to become the Event Owner" : "Кол-во урона, которое должен нанести игрок, чтобы стать владельцем ивента")]
public float Damage {
get;
set;
}
[JsonProperty(En ? "Damage Multipliers for calculate to become the Event Owner" : "Коэффициенты урона для подсчета, чтобы стать владельцем ивента")]
public Dictionary<string, float> ScaleDamage {
get;
set;
}
[JsonProperty(En ? "Can the non-owner of the event loot the crates? [true/false]" : "Может ли не владелец ивента грабить ящики? [true/false]")]
public bool LootCrate {
get;
set;
}
[JsonProperty(En ? "Can the non-owner of the event hack locked crates? [true/false]" : "Может ли не владелец ивента взламывать заблокированные ящики? [true/false]")]
public bool HackCrate {
get;
set;
}
[JsonProperty(En ? "Can the non-owner of the event loot NPC corpses? [true/false]" : "Может ли не владелец ивента грабить трупы NPC? [true/false]")]
public bool LootNpc {
get;
set;
}
[JsonProperty(En ? "Can the non-owner of the event deal damage to the NPC? [true/false]" : "Может ли не владелец ивента наносить урон по NPC? [true/false]")]
public bool DamageNpc {
get;
set;
}
[JsonProperty(En ? "Can an Npc attack a non-owner of the event? [true/false]" : "Может ли Npc атаковать не владельца ивента? [true/false]")]
public bool TargetNpc {
get;
set;
}
[JsonProperty(En ? "Allow the non-owner of the event to enter the event zone? [true/false]" : "Разрешать входить внутрь зоны ивента не владельцу ивента? [true/false]")]
public bool CanEnter {
get;
set;
}
[JsonProperty(En ? "Allow a player who has an active cooldown of the Event Owner to enter the event zone? [true/false]" : "Разрешать входить внутрь зоны ивента игроку, у которого активен кулдаун на получение статуса владельца ивента? [true/false]")]
public bool CanEnterCooldownPlayer {
get;
set;
}
[JsonProperty(En ? "The time that the Event Owner may not be inside the event zone [sec.]" : "Время, которое владелец ивента может не находиться внутри зоны ивента [сек.]")]
public int TimeExitOwner {
get;
set;
}
[JsonProperty(En ? "The time until the end of Event Owner status when it is necessary to warn the player [sec.]" : "Время таймера до окончания действия статуса владельца ивента, когда необходимо предупредить игрока [сек.]")]
public int AlertTime {
get;
set;
}
[JsonProperty(En ? "Prevent the actions of the RestoreUponDeath plugin in the event zone? [true/false]" : "Запрещать работу плагина RestoreUponDeath в зоне действия ивента? [true/false]")]
public bool RestoreUponDeath {
get;
set;
}
[JsonProperty(En ? "The time that the player can`t become the Event Owner, after the end of the event and the player was its owner [sec.]" : "Время, которое игрок не сможет стать владельцем ивента, после того как ивент окончен и игрок был его владельцем [sec.]")]
public double CooldownOwner {
get;
set;
}
[JsonProperty(En ? "Darkening the dome (0 - disables the dome)" : "Затемнение купола (0 - отключает купол)")]
public int Darkening {
get;
set;
}
}
public class ImageURL {
[JsonProperty(En ? "Name" : "Название")]
public string Name {
get;
set;
}
[JsonProperty(En ? "Path" : "Путь")]
public string Url {
get;
set;
}
}
private class PluginConfig {
[JsonProperty(En ? "NPC Configuration - Sledge" : "Конфигурация NPC - Sledge")]
public SledgeConfig Sledge {
get;
set;
}
[JsonProperty(En ? "NPC Configuration - Blazer" : "Конфигурация NPC - Blazer")]
public BlazerConfig Blazer {
get;
set;
}
[JsonProperty(En ? "NPC Configuration - Juggernaut" : "Конфигурация NPC - Juggernaut")]
public JuggernautConfig Juggernaut {
get;
set;
}
[JsonProperty(En ? "NPC Configuration - Bomber" : "Конфигурация NPC - Bomber")]
public BomberConfig Bomber {
get;
set;
}
[JsonProperty(En ? "NPC damage multipliers depending on the attacker's weapon" : "Множители урона по NPC в зависимости от оружия атакующего")]
public Dictionary<string, float> WeaponToScaleDamageNpc {
get;
set;
}
[JsonProperty(En ? "Custom Barricades" : "Настройки баррикад")]
public HashSet<BarricadeConfig> CustomBarricades {
get;
set;
}
[JsonProperty(En ? "List of paths to GUI images" : "Список путей на картинки для GUI")]
public HashSet<ImageURL> Urls {
get;
set;
}
[JsonProperty(En ? "Minimum time between events [sec.]" : "Минимальное время между ивентами [sec.]")]
public float MinStartTime {
get;
set;
}
[JsonProperty(En ? "Maximum time between events [sec.]" : "Максимальное время между ивентами [sec.]")]
public float MaxStartTime {
get;
set;
}
[JsonProperty(En ? "Is there a timer to start the event? [true/false]" : "Активен ли таймер для запуска ивента? [true/false]")]
public bool EnabledTimer {
get;
set;
}
[JsonProperty(En ? "Time before the starting of the event after receiving a chat message [sec.]" : "Время до начала ивента после сообщения в чате [sec.]")]
public float PreStartTime {
get;
set;
}
[JsonProperty(En ? "Time of notification signaling the end of the event [sec.]" : "Время оповещения до окончания ивента [sec.]")]
public int PreFinishTime {
get;
set;
}
[JsonProperty(En ? "The duration of the event, if no one calls The General for help [sec.]" : "Время существования ивента, если никто не вызвал подмогу генералу [sec.]")]
public int Duration {
get;
set;
}
[JsonProperty(En ? "Marker configuration on the map" : "Настройка маркера на карте")]
public MarkerConfig Marker {
get;
set;
}
[JsonProperty(En ? "Prefix of chat messages" : "Префикс сообщений в чате")]
public string Prefix {
get;
set;
}
[JsonProperty(En ? "Do you use global 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 ? "Discord setting (only for users DiscordMessages plugin)" : "Настройка оповещений в Discord (только для тех, кто использует плагин DiscordMessages)")]
public DiscordConfig Discord {
get;
set;
}
[JsonProperty(En ? "List of prefabs to be deleted in the event zone" : "Список prefab-ов, которые необходимо удалять в зоне ивента")]
public HashSet<string> DeletePrefabs {
get;
set;
}
[JsonProperty(En ? "Do you create a PVP zone in the event area? (only for users TruePVE plugin) [true/false]" : "Создавать зону PVP в зоне проведения ивента? (только для тех, кто использует плагин TruePVE) [true/false]")]
public bool IsCreateZonePvp {
get;
set;
}
[JsonProperty(En ? "PVE Mode Setting (only for users PveMode plugin)" : "Настройка PVE режима работы плагина (только для тех, кто использует плагин PveMode)")]
public PveModeConfig PveMode {
get;
set;
}
[JsonProperty(En ? "Interrupt the teleport in the event area? (only for users NTeleportation plugin) [true/false]" : "Запрещать телепорт в зоне проведения ивента? (только для тех, кто использует плагин NTeleportation) [true/false]")]
public bool NTeleportationInterrupt {
get;
set;
}
[JsonProperty(En ? "Disable NPCs from the BetterNpc plugin on the monument while the event is on? [true/false]" : "Отключать NPC из плагина BetterNpc на монументе пока проходит ивент? [true/false]")]
public bool RemoveBetterNpc {
get;
set;
}
[JsonProperty(En ? "List of commands banned in the event zone" : "Список команд запрещенных в зоне ивента")]
public HashSet<string> Commands {
get;
set;
}
[JsonProperty(En ? "Configuration version" : "Версия конфигурации")]
public VersionNumber PluginVersion {
get;
set;
}
public static PluginConfig DefaultConfig() {
return new PluginConfig {
Sledge = new SledgeConfig {
WearItems = new List<NpcWear> {
new NpcWear {
ShortName = "frankensteins.monster.01.head", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.01.torso", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.01.legs", SkinID = 0
}
}
, Weapons = new List<SledgeBelt> {
new SledgeBelt {
ShortName = "paddle", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "spear.stone", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "bone.club", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "knife.combat", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "longsword", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "pitchfork", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "knife.bone", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "mace", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "salvaged.cleaver", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "knife.butcher", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "machete", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "salvaged.sword", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "spear.wooden", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "stone.pickaxe", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "torch", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "axe.salvaged", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "pickaxe", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "hammer.salvaged", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "hatchet", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "stonehatchet", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "icepick.salvaged", SkinID = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "sickle", SkinID = 0, Chance = 100f
}
}
, BeancanGrenade = 15f, Health = 50f, DamageScale = 0.6f, Speed = 8f, DamagePerSec = 10f, TurretDamageScale = 0.25f
}
, Blazer = new BlazerConfig {
WearItems = new List<NpcWear> {
new NpcWear {
ShortName = "frankensteins.monster.02.head", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.02.torso", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.02.legs", SkinID = 0
}
}
, Weapons = new List<ProjectileBelt> {
new ProjectileBelt {
ShortName = "bow.compound", SkinID = 0, Ammo = "arrow.fire", Mods = new List<string>(), Chance = 100f, DamageScale = 0.07f
}
, new ProjectileBelt {
ShortName = "shotgun.waterpipe", SkinID = 0, Ammo = "ammo.shotgun.slug", Mods = new List<string> {
"weapon.mod.small.scope"
}
, Chance = 100f, DamageScale = 0.3f
}
}
, Health = 40f, AttackRangeMultiplier = 10f, AimConeScale = 2f, Speed = 7.5f
}
, Juggernaut = new JuggernautConfig {
WearItems = new List<NpcWear> {
new NpcWear {
ShortName = "frankensteins.monster.03.head", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.03.torso", SkinID = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.03.legs", SkinID = 0
}
}
, Weapons = new List<ProjectileBelt> {
new ProjectileBelt {
ShortName = "hmlmg", SkinID = 0, Ammo = string.Empty, Mods = new List<string> {
"weapon.mod.holosight", "weapon.mod.flashlight"
}
, Chance = 100f, DamageScale = 0.4f
}
}
, BeancanGrenade = 15f, Health = 250f, AttackRangeMultiplier = 1f, AimConeScale = 1.3f, Speed = 5f, TurretDamageScale = 0.25f
}
, Bomber = new BomberConfig {
WearItems = new List<NpcWear> {
new NpcWear {
ShortName = "scarecrow.suit", SkinID = 0
}
, new NpcWear {
ShortName = "metal.plate.torso", SkinID = 860210174
}
,
}
, Health = 100f, AttackRangeMultiplier = 1f, Speed = 5.5f, DamageBarricade = 200f, DamageGeneral = 60f, DamagePlayer = 60f
}
, WeaponToScaleDamageNpc = new Dictionary<string, float> {
["grenade.beancan.deployed"]
= 0.5f, ["grenade.f1.deployed"] = 0.5f, ["explosive.satchel.deployed"] = 0.5f, ["explosive.timed.deployed"] = 0.5f, ["rocket_hv"] = 0.5f, ["rocket_basic"] = 0.5f, ["40mm_grenade_he"] = 0.5f
}
, CustomBarricades = new HashSet<BarricadeConfig> {
new BarricadeConfig {
Level = 0, Health = 500f, Price = new PriceConfig {
Type = 3, CountEconomy = 0, Items = new List<ItemPriceConfig> {
new ItemPriceConfig {
ShortName = "wood", Amount = 30, SkinID = 0
}
}
}
, HealthRepair = 50f
}
, new BarricadeConfig {
Level = 1, Health = 1000f, Price = new PriceConfig {
Type = 3, CountEconomy = 0, Items = new List<ItemPriceConfig> {
new ItemPriceConfig {
ShortName = "wood", Amount = 50, SkinID = 0
}
}
}
, HealthRepair = 50f
}
, new BarricadeConfig {
Level = 2, Health = 1500f, Price = new PriceConfig {
Type = 3, CountEconomy = 0, Items = new List<ItemPriceConfig> {
new ItemPriceConfig {
ShortName = "wood", Amount = 50, SkinID = 0
}
, new ItemPriceConfig {
ShortName = "stones", Amount = 50, SkinID = 0
}
}
}
, HealthRepair = 75f
}
, new BarricadeConfig {
Level = 3, Health = 2000f, Price = new PriceConfig {
Type = 3, CountEconomy = 0, Items = new List<ItemPriceConfig> {
new ItemPriceConfig {
ShortName = "wood", Amount = 50, SkinID = 0
}
, new ItemPriceConfig {
ShortName = "metal.fragments", Amount = 100, SkinID = 0
}
}
}
, HealthRepair = 100f
}
, new BarricadeConfig {
Level = 4, Health = 2500f, Price = new PriceConfig {
Type = 3, CountEconomy = 0, Items = new List<ItemPriceConfig> {
new ItemPriceConfig {
ShortName = "wood", Amount = 50, SkinID = 0
}
, new ItemPriceConfig {
ShortName = "metal.refined", Amount = 2, SkinID = 0
}
}
}
, HealthRepair = 100f
}
}
, Urls = new HashSet<ImageURL> {
new ImageURL {
Name = "Tab_KpucTaJl", Url = "Images/Tab_KpucTaJl.png"
}
, new ImageURL {
Name = "Clock_KpucTaJl", Url = "Images/Clock_KpucTaJl.png"
}
, new ImageURL {
Name = "Plus_KpucTaJl", Url = "Images/Plus_KpucTaJl.png"
}
, new ImageURL {
Name = "Npc_KpucTaJl", Url = "Images/Npc_KpucTaJl.png"
}
, new ImageURL {
Name = "Bookmark_KpucTaJl", Url = "Images/Bookmark_KpucTaJl.png"
}
, new ImageURL {
Name = "Tablet_KpucTaJl", Url = "Images/Tablet_KpucTaJl.png"
}
, new ImageURL {
Name = "Lock_KpucTaJl", Url = "Images/Lock_KpucTaJl.png"
}
, new ImageURL {
Name = "Economic", Url = "Images/Economic.png"
}
, new ImageURL {
Name = "2777422016", Url = "Images/2777422016.png"
}
, new ImageURL {
Name = "2777422268", Url = "Images/2777422268.png"
}
, new ImageURL {
Name = "2803087918", Url = "Images/2803087918.png"
}
, new ImageURL {
Name = "2777422630", Url = "Images/2777422630.png"
}
, new ImageURL {
Name = "2777422812", Url = "Images/2777422812.png"
}
, new ImageURL {
Name = "autoturret", Url = "Images/autoturret.png"
}
, new ImageURL {
Name = "flameturret", Url = "Images/flameturret.png"
}
, new ImageURL {
Name = "guntrap", Url = "Images/guntrap.png"
}
, new ImageURL {
Name = "ammo.rifle", Url = "Images/ammo.rifle.png"
}
, new ImageURL {
Name = "ammo.rifle.hv", Url = "Images/ammo.rifle.hv.png"
}
, new ImageURL {
Name = "ammo.rifle.incendiary", Url = "Images/ammo.rifle.incendiary.png"
}
, new ImageURL {
Name = "ammo.rifle.explosive", Url = "Images/ammo.rifle.explosive.png"
}
, new ImageURL {
Name = "lowgradefuel", Url = "Images/lowgradefuel.png"
}
, new ImageURL {
Name = "ammo.handmade.shell", Url = "Images/ammo.handmade.shell.png"
}
, new ImageURL {
Name = "blueberries", Url = "Images/blueberries.png"
}
, new ImageURL {
Name = "cctv.camera", Url = "Images/cctv.camera.png"
}
, new ImageURL {
Name = "gears", Url = "Images/gears.png"
}
, new ImageURL {
Name = "grenade.f1", Url = "Images/grenade.f1.png"
}
, new ImageURL {
Name = "gunpowder", Url = "Images/gunpowder.png"
}
, new ImageURL {
Name = "largemedkit", Url = "I
// ... [Code preview truncated due to length. Full source in attached file] ...