Created
March 18, 2024 14:52
-
-
Save TheMevent/1a39a518b9824cb70d19a4a5cc36e940 to your computer and use it in GitHub Desktop.
Rust Skills Converter Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
using Oxide.Core; | |
using Oxide.Core.Configuration; | |
using Oxide.Game.Rust.Cui; | |
using UnityEngine; | |
namespace Oxide.Plugins; | |
[Info("Skills Converter", "Mevent", "1.0.0")] | |
public class SkillsConverter : RustPlugin | |
{ | |
#region Commands | |
[ConsoleCommand("skills.convert.from.old.ru")] | |
private void ConvertFromOldRu(ConsoleSystem.Arg arg) | |
{ | |
if (!arg.IsServerside) return; | |
var configPath = Path.Combine(Manager.ConfigPath, "Skills" + ".json"); | |
if (string.IsNullOrEmpty(configPath)) | |
{ | |
SendReply(arg, "К сожалению, файл конфигурации не найден."); | |
return; | |
} | |
if (Config == null) | |
{ | |
Name = "Skills"; | |
LoadConfig(); | |
} | |
if (Config == null) | |
{ | |
SendReply(arg, "К сожалению, файл конфигурации не найден."); | |
return; | |
} | |
var oldConfig = Config.ReadObject<OldConfig.Configuration>(configPath); | |
if (oldConfig == null) | |
{ | |
SendReply(arg, "Не удалось загрузить конфиг."); | |
return; | |
} | |
#region New Config Generation | |
NewConfig.Configuration newConfig; | |
try | |
{ | |
newConfig = new NewConfig.Configuration | |
{ | |
Permission = oldConfig.Permission, | |
Command = oldConfig.Command, | |
Wipe = false, | |
UseNotify = oldConfig.UseNotify, | |
StoreContainers = oldConfig.StoreContainers, | |
Economy = new NewConfig.EconomyConf | |
{ | |
Type = oldConfig.Economy.Type, | |
Plug = oldConfig.Economy.Plug, | |
AddHook = oldConfig.Economy.AddHook, | |
RemoveHook = oldConfig.Economy.RemoveHook, | |
BalanceHook = oldConfig.Economy.BalanceHook, | |
ShortName = oldConfig.Economy.ShortName, | |
DisplayName = oldConfig.Economy.DisplayName, | |
Skin = oldConfig.Economy.Skin | |
}, | |
MaxLevel = new NewConfig.INotify | |
{ | |
Image = oldConfig.MaxLevel.Image, | |
Url = oldConfig.MaxLevel.Url, | |
Delay = oldConfig.MaxLevel.Delay | |
}, | |
NotMoney = new NewConfig.INotify | |
{ | |
Image = oldConfig.NotMoney.Image, | |
Url = oldConfig.NotMoney.Url, | |
Delay = oldConfig.NotMoney.Delay | |
}, | |
Background = new NewConfig.IPanel | |
{ | |
AnchorMin = oldConfig.Background.AnchorMin, | |
AnchorMax = oldConfig.Background.AnchorMax, | |
OffsetMin = oldConfig.Background.OffsetMin, | |
OffsetMax = oldConfig.Background.OffsetMax, | |
Image = oldConfig.Background.Image, | |
Color = new NewConfig.IColor(oldConfig.Background.Color.HEX, oldConfig.Background.Color.Alpha), | |
isRaw = oldConfig.Background.isRaw, | |
Sprite = oldConfig.Background.Sprite, | |
Material = oldConfig.Background.Material, | |
}, | |
Title = new NewConfig.IText | |
{ | |
AnchorMin = oldConfig.Title.AnchorMin, | |
AnchorMax = oldConfig.Title.AnchorMax, | |
OffsetMin = oldConfig.Title.OffsetMin, | |
OffsetMax = oldConfig.Title.OffsetMax, | |
FontSize = oldConfig.Title.FontSize, | |
Font = oldConfig.Title.Font, | |
Align = oldConfig.Title.Align, | |
Color = new NewConfig.IColor(oldConfig.Title.Color.HEX, oldConfig.Title.Color.Alpha), | |
}, | |
Back = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.Back.AnchorMin, | |
AnchorMax = oldConfig.Back.AnchorMax, | |
OffsetMin = oldConfig.Back.OffsetMin, | |
OffsetMax = oldConfig.Back.OffsetMax, | |
FontSize = oldConfig.Back.FontSize, | |
Font = oldConfig.Back.Font, | |
Align = oldConfig.Back.Align, | |
Color = new NewConfig.IColor(oldConfig.Back.Color.HEX, oldConfig.Back.Color.Alpha), | |
}, | |
Next = new NewConfig.IText | |
{ | |
AnchorMin = oldConfig.Next.AnchorMin, | |
AnchorMax = oldConfig.Next.AnchorMax, | |
OffsetMin = oldConfig.Next.OffsetMin, | |
OffsetMax = oldConfig.Next.OffsetMax, | |
FontSize = oldConfig.Next.FontSize, | |
Font = oldConfig.Next.Font, | |
Align = oldConfig.Next.Align, | |
Color = new NewConfig.IColor(oldConfig.Next.Color.HEX, oldConfig.Next.Color.Alpha), | |
}, | |
BalanceText = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.BalanceText.AnchorMin, | |
AnchorMax = oldConfig.BalanceText.AnchorMax, | |
OffsetMin = oldConfig.BalanceText.OffsetMin, | |
OffsetMax = oldConfig.BalanceText.OffsetMax, | |
FontSize = oldConfig.BalanceText.FontSize, | |
Font = oldConfig.BalanceText.Font, | |
Align = oldConfig.BalanceText.Align, | |
Color = new NewConfig.IColor(oldConfig.BalanceText.Color.HEX, oldConfig.BalanceText.Color.Alpha), | |
}, | |
EnableBalanceIcon = oldConfig.EnableBalanceIcon, | |
BalanceIcon = new NewConfig.BalanceIcon | |
{ | |
OffsetMinY = oldConfig.BalanceIcon.OffsetMinY, | |
OffsetMaxY = oldConfig.BalanceIcon.OffsetMaxY, | |
Length = oldConfig.BalanceIcon.Length, | |
}, | |
CloseLabel = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.CloseLabel.AnchorMin, | |
AnchorMax = oldConfig.CloseLabel.AnchorMax, | |
OffsetMin = oldConfig.CloseLabel.OffsetMin, | |
OffsetMax = oldConfig.CloseLabel.OffsetMax, | |
FontSize = oldConfig.CloseLabel.FontSize, | |
Font = oldConfig.CloseLabel.Font, | |
Align = oldConfig.CloseLabel.Align, | |
Color = new NewConfig.IColor(oldConfig.CloseLabel.Color.HEX, oldConfig.CloseLabel.Color.Alpha), | |
}, | |
SkillPanel = new NewConfig.SkillPanel | |
{ | |
Background = new NewConfig.SIPanel | |
{ | |
Image = oldConfig.SkillPanel.Background.Image, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.Background.Color.HEX, oldConfig.SkillPanel.Background.Color.Alpha), | |
isRaw = oldConfig.SkillPanel.Background.isRaw, | |
Sprite = oldConfig.SkillPanel.Background.Sprite, | |
Material = oldConfig.SkillPanel.Background.Material, | |
HeightCorrect = oldConfig.SkillPanel.Background.HeightCorrect, | |
}, | |
Image = new NewConfig.InterfacePosition | |
{ | |
AnchorMin = oldConfig.SkillPanel.Image.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Image.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Image.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Image.OffsetMax, | |
}, | |
Title = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.SkillPanel.Title.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Title.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Title.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Title.OffsetMax, | |
FontSize = oldConfig.SkillPanel.Title.FontSize, | |
Font = oldConfig.SkillPanel.Title.Font, | |
Align = oldConfig.SkillPanel.Title.Align, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.Title.Color.HEX, oldConfig.SkillPanel.Title.Color.Alpha), | |
}, | |
Description = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.SkillPanel.Description.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Description.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Description.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Description.OffsetMax, | |
FontSize = oldConfig.SkillPanel.Description.FontSize, | |
Font = oldConfig.SkillPanel.Description.Font, | |
Align = oldConfig.SkillPanel.Description.Align, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.Description.Color.HEX, oldConfig.SkillPanel.Description.Color.Alpha), | |
}, | |
Button = new NewConfig.IButton | |
{ | |
AnchorMin = oldConfig.SkillPanel.Button.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Button.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Button.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Button.OffsetMax, | |
AColor = new NewConfig.IColor(oldConfig.SkillPanel.Button.AColor.HEX, oldConfig.SkillPanel.Button.AColor.Alpha), | |
DColor = new NewConfig.IColor(oldConfig.SkillPanel.Button.DColor.HEX, oldConfig.SkillPanel.Button.DColor.Alpha), | |
TextUi = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.SkillPanel.Button.TextUi.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Button.TextUi.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Button.TextUi.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Button.TextUi.OffsetMax, | |
FontSize = oldConfig.SkillPanel.Button.TextUi.FontSize, | |
Font = oldConfig.SkillPanel.Button.TextUi.Font, | |
Align = oldConfig.SkillPanel.Button.TextUi.Align, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.Button.TextUi.Color.HEX, oldConfig.SkillPanel.Button.TextUi.Color.Alpha), | |
} | |
}, | |
DescriptionButton = new NewConfig.DescriptionButton | |
{ | |
AnchorMin = oldConfig.SkillPanel.DescriptionButton.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.DescriptionButton.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.DescriptionButton.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.DescriptionButton.OffsetMax, | |
Enabled = oldConfig.SkillPanel.DescriptionButton.Enabled, | |
AColor = new NewConfig.IColor(oldConfig.SkillPanel.DescriptionButton.AColor.HEX, oldConfig.SkillPanel.DescriptionButton.AColor.Alpha), | |
DColor = new NewConfig.IColor(oldConfig.SkillPanel.DescriptionButton.DColor.HEX, oldConfig.SkillPanel.DescriptionButton.DColor.Alpha), | |
TextUi = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.SkillPanel.DescriptionButton.TextUi.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.DescriptionButton.TextUi.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.DescriptionButton.TextUi.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.DescriptionButton.TextUi.OffsetMax, | |
FontSize = oldConfig.SkillPanel.DescriptionButton.TextUi.FontSize, | |
Font = oldConfig.SkillPanel.DescriptionButton.TextUi.Font, | |
Align = oldConfig.SkillPanel.DescriptionButton.TextUi.Align, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.DescriptionButton.TextUi.Color.HEX, oldConfig.SkillPanel.DescriptionButton.TextUi.Color.Alpha), | |
} | |
}, | |
Cost = new NewConfig.IText() | |
{ | |
AnchorMin = oldConfig.SkillPanel.Cost.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Cost.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Cost.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Cost.OffsetMax, | |
FontSize = oldConfig.SkillPanel.Cost.FontSize, | |
Font = oldConfig.SkillPanel.Cost.Font, | |
Align = oldConfig.SkillPanel.Cost.Align, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.Cost.Color.HEX, oldConfig.SkillPanel.Cost.Color.Alpha), | |
}, | |
AddCost = oldConfig.SkillPanel.AddCost, | |
EnableCostImage = oldConfig.SkillPanel.EnableCostImage, | |
AddCostImage = new NewConfig.IPanel | |
{ | |
AnchorMin = oldConfig.SkillPanel.AddCostImage.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.AddCostImage.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.AddCostImage.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.AddCostImage.OffsetMax, | |
Image = oldConfig.SkillPanel.AddCostImage.Image, | |
Color = new NewConfig.IColor(oldConfig.SkillPanel.AddCostImage.Color.HEX, oldConfig.SkillPanel.AddCostImage.Color.Alpha), | |
isRaw = oldConfig.SkillPanel.AddCostImage.isRaw, | |
Sprite = oldConfig.SkillPanel.AddCostImage.Sprite, | |
Material = oldConfig.SkillPanel.AddCostImage.Material, | |
}, | |
Stages = new NewConfig.IProgress | |
{ | |
AnchorMin = oldConfig.SkillPanel.Stages.AnchorMin, | |
AnchorMax = oldConfig.SkillPanel.Stages.AnchorMax, | |
OffsetMin = oldConfig.SkillPanel.Stages.OffsetMin, | |
OffsetMax = oldConfig.SkillPanel.Stages.OffsetMax, | |
Height = oldConfig.SkillPanel.Stages.Height, | |
Width = oldConfig.SkillPanel.Stages.Width, | |
Margin = oldConfig.SkillPanel.Stages.Margin, | |
AColor = new NewConfig.IColor(oldConfig.SkillPanel.Stages.AColor.HEX, oldConfig.SkillPanel.Stages.AColor.Alpha), | |
DColor = new NewConfig.IColor(oldConfig.SkillPanel.Stages.DColor.HEX, oldConfig.SkillPanel.Stages.DColor.Alpha) | |
}, | |
Count = oldConfig.SkillPanel.Count, | |
Height = oldConfig.SkillPanel.Height, | |
Width = oldConfig.SkillPanel.Width, | |
Margin = oldConfig.SkillPanel.Margin, | |
ShowAllStages = oldConfig.SkillPanel.ShowAllStages, | |
}, | |
Skills = new List<NewConfig.Skill>(), | |
Animals = oldConfig.Animals, | |
OvensBlackList = oldConfig.OvensBlackList, | |
ContainersBlackList = oldConfig.ContainersBlackList, | |
AttackBlackList = oldConfig.AttackBlackList, | |
FastOven = new NewConfig.FastOvenSkill | |
{ | |
WorkWithCampfires = oldConfig.FastOven.WorkWithCampfires, | |
CharcoalMultiplier = oldConfig.FastOven.CharcoalMultiplier, | |
StopBurningFood = oldConfig.FastOven.StopBurningFood, | |
Stages = new Dictionary<int, NewConfig.FastOvenStage>() | |
}, | |
ComponentsRates = new NewConfig.ComponentsRatesSkill | |
{ | |
AllowedCategories = oldConfig.ComponentsRates.AllowedCategories, | |
AllowedItems = oldConfig.ComponentsRates.AllowedItems, | |
BlockList = oldConfig.ComponentsRates.BlockList, | |
}, | |
AdditionalButtons = new NewConfig.AdditionalButtonsSettings | |
{ | |
Buttons = new List<NewConfig.AdditionalButtonsSettings.AdditinalButton>(), | |
UI = new NewConfig.AdditionalButtonsSettings.ButtonsUI | |
{ | |
SideIndent = oldConfig.AdditionalButtons.UI.SideIndent, | |
UpIndent = oldConfig.AdditionalButtons.UI.UpIndent, | |
Margin = oldConfig.AdditionalButtons.UI.Margin, | |
Size = oldConfig.AdditionalButtons.UI.Size, | |
}, | |
}, | |
TransferWipe = new NewConfig.TransferWipeSkill | |
{ | |
ResetSigle = oldConfig.TransferWipe.ResetSigle, | |
}, | |
CraftRates = new NewConfig.CraftRatesSkill | |
{ | |
AllowedList = oldConfig.CraftRates.AllowedList, | |
}, | |
Broadcasting = new NewConfig.Broadcasting() | |
{ | |
UseLearnSkill = oldConfig.Broadcasting.UseLearnSkill, | |
}, | |
UseBonusMode = oldConfig.UseBonusMode, | |
DurabilityBlacklist = oldConfig.DurabilityBlacklist, | |
Version = new VersionNumber(1, 32, 0) | |
}; | |
oldConfig.Skills.ForEach(oldSkill => | |
{ | |
var newSkill = new NewConfig.Skill | |
{ | |
Enabled = oldSkill.Enabled, | |
Permission = oldSkill.Permission, | |
Type = oldSkill.Type, | |
ID = oldSkill.ID, | |
Image = oldSkill.Image, | |
Title = oldSkill.Title, | |
Description = oldSkill.Description, | |
ShortName = oldSkill.ShortName, | |
Stages = new Dictionary<int, NewConfig.StageConf>() | |
}; | |
foreach (var (key, value) in oldSkill.Stages) | |
{ | |
newSkill.Stages[key] = new NewConfig.StageConf | |
{ | |
Commands = value.Commands, | |
Groups = value.Groups, | |
Permissions = value.Permissions, | |
}; | |
} | |
newConfig.Skills.Add(newSkill); | |
}); | |
foreach (var (key, value) in oldConfig.FastOven.Stages) | |
{ | |
var newStage = new NewConfig.FastOvenStage | |
{ | |
Permission = value.Permission, | |
Cost = value.Cost, | |
Rates = value.Rates, | |
RequiredSkillStages = new List<NewConfig.RequiredSkillStage>() | |
}; | |
value.RequiredSkillStages.ForEach(oldRequiredSkillStage => | |
{ | |
newStage.RequiredSkillStages.Add(new NewConfig.RequiredSkillStage | |
{ | |
Type = oldRequiredSkillStage.Type, | |
ID = oldRequiredSkillStage.ID, | |
Stage = oldRequiredSkillStage.Stage, | |
RequireSkill = oldRequiredSkillStage.RequireSkill, | |
}); | |
}); | |
newConfig.FastOven.Stages[key] = newStage; | |
} | |
oldConfig.AdditionalButtons.Buttons.ForEach(oldButton => newConfig.AdditionalButtons.Buttons.Add(new NewConfig.AdditionalButtonsSettings.AdditinalButton(oldButton.Enabled, oldButton.Image, oldButton.Command, oldButton.CloseMenu))); | |
} | |
catch (Exception e) | |
{ | |
SendReply(arg, $"Cant parse config: {e.Message}"); | |
throw; | |
} | |
#endregion | |
#region Save New Config | |
try | |
{ | |
Config.WriteObject(newConfig, true, configPath); | |
} | |
catch (Exception e) | |
{ | |
SendReply(arg, $"Cant save config: {e.Message}"); | |
throw; | |
} | |
#endregion | |
SendReply(arg, "Конфиг был успешно конверитрован!"); | |
} | |
#endregion | |
#region Classes | |
public enum SkillType | |
{ | |
Wood, | |
Stones, | |
Metal, | |
Sulfur, | |
Attack, | |
Secure, | |
Regeneration, | |
Metabolism, | |
ComponentsRates, | |
StandUpChance, | |
CraftSpeed, | |
FastOven, | |
Kits, | |
None, | |
Cloth, | |
Butcher, | |
Scrap, | |
RecyclerSpeed, | |
TransferWipe, | |
MixingTableSpeed, | |
Gather, | |
CraftRates, | |
CombatMedic, | |
SafeFall, | |
Durability | |
} | |
public enum EconomyType | |
{ | |
Plugin, | |
Item | |
} | |
#endregion | |
#region Old Config | |
private static class OldConfig | |
{ | |
public class Configuration | |
{ | |
[JsonProperty(PropertyName = "Разрешение | Permission (example: skills.use)")] | |
public string Permission = string.Empty; | |
[JsonProperty(PropertyName = "Команда | Command")] | |
public string Command = "skills"; | |
[JsonProperty(PropertyName = "Автоматический вайп? | Automatic wipe?")] | |
public bool Wipe = true; | |
[JsonProperty(PropertyName = "Work with Notify?")] | |
public bool UseNotify = true; | |
[JsonProperty(PropertyName = | |
"Хранить данные о залутанных контейнерах в дате? | Store the data on the looted containers in the data-files?")] | |
public bool StoreContainers = false; | |
[JsonProperty(PropertyName = "Экономика | Economy")] | |
public EconomyConf Economy = new EconomyConf | |
{ | |
Type = EconomyType.Plugin, | |
AddHook = "Deposit", | |
BalanceHook = "Balance", | |
RemoveHook = "Withdraw", | |
Plug = "Economics", | |
ShortName = "scrap", | |
DisplayName = string.Empty, | |
Skin = 0 | |
}; | |
[JsonProperty(PropertyName = "Оповещение о максимальном уровне | Maximum level alert")] | |
public INotify MaxLevel = new INotify | |
{ | |
Image = "warning", | |
Url = "https://i.imgur.com/p3tKXJV.png", | |
Delay = 0.9f | |
}; | |
[JsonProperty(PropertyName = "Оповещение о нехватке баланса | Out of balance alert")] | |
public INotify NotMoney = new INotify | |
{ | |
Image = "warning", | |
Url = "https://i.imgur.com/p3tKXJV.png", | |
Delay = 0.9f | |
}; | |
[JsonProperty(PropertyName = "Фон | Background")] | |
public IPanel Background = new IPanel | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 1", | |
OffsetMin = "0 0", OffsetMax = "0 0", | |
Image = string.Empty, | |
Color = new IColor("#0D1F4E", 95), | |
isRaw = false, | |
Sprite = "Assets/Content/UI/UI.Background.Tile.psd", | |
Material = "Assets/Icons/IconMaterial.mat" | |
}; | |
[JsonProperty(PropertyName = "Заглавие | Title")] | |
public IText Title = new IText | |
{ | |
AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", | |
OffsetMin = "-150 300", OffsetMax = "150 360", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 38, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = "Назад | Back")] | |
public readonly IText Back = new IText | |
{ | |
AnchorMin = "0 0.5", AnchorMax = "0 0.5", | |
OffsetMin = "0 -40", OffsetMax = "65 40", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 60, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = "Вперёд | Next")] | |
public readonly IText Next = new IText | |
{ | |
AnchorMin = "1 0.5", AnchorMax = "1 0.5", | |
OffsetMin = "-65 -40", OffsetMax = "0 40", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 60, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = "Баланс | Balance")] | |
public readonly IText BalanceText = new IText | |
{ | |
AnchorMin = "0.5 0", AnchorMax = "0.5 0", | |
OffsetMin = "-150 0", OffsetMax = "150 75", | |
Font = "robotocondensed-regular.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 24, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = "Включить иконку баланса | Enable Balance Icon")] | |
public bool EnableBalanceIcon = false; | |
[JsonProperty(PropertyName = "Иконка Баланса | Balance Icon")] | |
public readonly BalanceIcon BalanceIcon = new BalanceIcon | |
{ | |
OffsetMinY = 20, | |
OffsetMaxY = 55, | |
Length = 35 | |
}; | |
[JsonProperty(PropertyName = "Закрыть | Close")] | |
public readonly IText CloseLabel = new IText | |
{ | |
AnchorMin = "1 1", AnchorMax = "1 1", | |
OffsetMin = "-35 -35", OffsetMax = "-5 -5", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 24, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = "Способность | Skill Panel")] | |
public readonly SkillPanel SkillPanel = new SkillPanel | |
{ | |
Background = new SIPanel | |
{ | |
Image = string.Empty, | |
Color = new IColor("#1D3676", 98), | |
isRaw = false, | |
Sprite = "Assets/Content/UI/UI.Background.Tile.psd", | |
Material = "Assets/Icons/IconMaterial.mat", | |
HeightCorrect = 5 | |
}, | |
Image = new InterfacePosition | |
{ | |
AnchorMin = "0 0", AnchorMax = "0 0", | |
OffsetMin = "10 10", OffsetMax = "160 160" | |
}, | |
Title = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 0", | |
OffsetMin = "165 135", OffsetMax = "-5 160", | |
Align = TextAnchor.MiddleLeft, | |
FontSize = 20, | |
Font = "robotocondensed-bold.ttf", | |
Color = new IColor("#FFFFFF", 100) | |
}, | |
Description = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 0", | |
OffsetMin = "165 30", OffsetMax = "-5 130", | |
Align = TextAnchor.UpperLeft, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#FFFFFF", 100) | |
}, | |
Button = new IButton | |
{ | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-105 10", OffsetMax = "-10 30", | |
AColor = new IColor("#B5FFC9", 100), | |
DColor = new IColor("#B5FFC9", 25), | |
TextUi = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 1", | |
OffsetMin = "0 0", OffsetMax = "0 0", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#1D3676", 100) | |
} | |
}, | |
DescriptionButton = new DescriptionButton | |
{ | |
Enabled = false, | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-105 35", OffsetMax = "-10 55", | |
AColor = new IColor("#B5FFC9", 100), | |
DColor = new IColor("#B5FFC9", 25), | |
TextUi = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 1", | |
OffsetMin = "0 0", OffsetMax = "0 0", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#1D3676", 100) | |
} | |
}, | |
Cost = new IText | |
{ | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-150 10", OffsetMax = "-110 30", | |
Align = TextAnchor.MiddleRight, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#FFFFFF", 100) | |
}, | |
AddCost = "$", | |
EnableCostImage = false, | |
AddCostImage = new IPanel | |
{ | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-130 10", OffsetMax = "-110 30", | |
Color = new IColor("#FFFFFF", 100), | |
isRaw = true, | |
Image = "https://i.imgur.com/5GdD0cU.png", | |
Sprite = string.Empty, | |
Material = string.Empty | |
}, | |
Stages = new IProgress | |
{ | |
AnchorMin = "0 0", AnchorMax = "0 0", | |
OffsetMin = "160 10", OffsetMax = "160 10", | |
Height = 20, | |
Width = 10, | |
Margin = 5, | |
AColor = new IColor("#8C70D6", 100), | |
DColor = new IColor("#8C70D6", 25) | |
}, | |
Count = 6, | |
Height = 170, | |
Width = 565, | |
Margin = 20, | |
ShowAllStages = true | |
}; | |
[JsonProperty(PropertyName = "Способности | Skills", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public readonly List<Skill> Skills = new List<Skill>(); | |
[JsonProperty(PropertyName = "Животные | Animals", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public readonly List<string> Animals = new List<string> | |
{ | |
"chicken.corpse", | |
"boar.corpse", | |
"bear.corpse", | |
"wolf.corpse", | |
"stag.corpse", | |
"polarbear.corpse" | |
}; | |
[JsonProperty(PropertyName = "Чёрный список печей | Ovens Black List", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public readonly List<string> OvensBlackList = new List<string> | |
{ | |
"entity shortnameprefab 1", | |
"entity shortnameprefab 2" | |
}; | |
[JsonProperty(PropertyName = "Чёрный список контейнеров | Containers Black List", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public readonly List<string> ContainersBlackList = new List<string> | |
{ | |
"entity prefab name 1", | |
"entity prefab name 2" | |
}; | |
[JsonProperty(PropertyName = "Чёрный список для навыка Attack | Blacklist for Attack skill", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public readonly List<string> AttackBlackList = new List<string> | |
{ | |
"entity prefab name 1", | |
"entity prefab name 2" | |
}; | |
[JsonProperty(PropertyName = | |
"Дополнительные настройки для скилла FastOven | Additional settings for the Fast Oven skill")] | |
public FastOvenSkill FastOven = new FastOvenSkill | |
{ | |
Stages = new Dictionary<int, FastOvenStage> | |
{ | |
[1] = new FastOvenStage | |
{ | |
Permission = string.Empty, | |
Cost = 10, | |
Rates = new Dictionary<string, int> | |
{ | |
{"ore", 1}, | |
{"meat", 1}, | |
{"hq.metal.ore", 1}, | |
{"wood", 1}, | |
{"*", 1} | |
}, | |
RequiredSkillStages = new List<RequiredSkillStage> | |
{ | |
new RequiredSkillStage | |
{ | |
ID = 0, | |
Type = SkillType.CraftSpeed, | |
Stage = 1, | |
RequireSkill = false | |
} | |
} | |
}, | |
[2] = new FastOvenStage | |
{ | |
Permission = string.Empty, | |
Cost = 15, | |
Rates = new Dictionary<string, int> | |
{ | |
{"ore", 2}, | |
{"meat", 2}, | |
{"hq.metal.ore", 2}, | |
{"wood", 2}, | |
{"*", 2} | |
}, | |
RequiredSkillStages = new List<RequiredSkillStage>() | |
}, | |
[3] = new FastOvenStage | |
{ | |
Permission = string.Empty, | |
Cost = 20, | |
Rates = new Dictionary<string, int> | |
{ | |
{"ore", 3}, | |
{"meat", 3}, | |
{"hq.metal.ore", 3}, | |
{"wood", 3}, | |
{"*", 3} | |
}, | |
RequiredSkillStages = new List<RequiredSkillStage>() | |
} | |
} | |
}; | |
[JsonProperty(PropertyName = "Дополнительные настройки для скилла Components Rates")] | |
public ComponentsRatesSkill ComponentsRates = new ComponentsRatesSkill | |
{ | |
AllowedCategories = new List<ItemCategory> | |
{ | |
ItemCategory.Component | |
}, | |
AllowedItems = new List<string> | |
{ | |
"targeting.computer", | |
"cctv.camera" | |
}, | |
BlockList = new List<string> | |
{ | |
"glue", | |
"techparts" | |
} | |
}; | |
[JsonProperty(PropertyName = "Настройка Дополнительных Кнопок")] | |
public AdditionalButtonsSettings AdditionalButtons = new AdditionalButtonsSettings | |
{ | |
Buttons = new List<AdditionalButtonsSettings.AdditinalButton> | |
{ | |
new AdditionalButtonsSettings.AdditinalButton(false, "https://i.imgur.com/C83Rprq.png", "leaders", | |
true) | |
}, | |
UI = new AdditionalButtonsSettings.ButtonsUI | |
{ | |
SideIndent = 45, | |
UpIndent = 5, | |
Size = 30, | |
Margin = 5 | |
} | |
}; | |
[JsonProperty(PropertyName = "Дополнительные настройки для скилла Transfer Wipe")] | |
public TransferWipeSkill TransferWipe = new TransferWipeSkill | |
{ | |
ResetSigle = false | |
}; | |
[JsonProperty(PropertyName = "Дополнительные настройки для скилла Craft Rates")] | |
public CraftRatesSkill CraftRates = new CraftRatesSkill | |
{ | |
AllowedList = new List<string> | |
{ | |
"gunpowder", | |
"lowgradefuel", | |
"rock" | |
} | |
}; | |
[JsonProperty(PropertyName = "Настройка Оповещений")] | |
public Broadcasting Broadcasting = new Broadcasting | |
{ | |
UseLearnSkill = true | |
}; | |
[JsonProperty(PropertyName = "Использовать бонусный режим для навыков добычи?")] | |
public bool UseBonusMode = false; | |
[JsonProperty(PropertyName = "Черный список предметов для навыка Стойкость", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public HashSet<string> DurabilityBlacklist = new HashSet<string> | |
{ | |
"keycard_blue", | |
"keycard_red", | |
"keycard_green" | |
}; | |
public VersionNumber Version; | |
} | |
public class Broadcasting | |
{ | |
[JsonProperty(PropertyName = "Включить оповещения при изучении навыка?")] | |
public bool UseLearnSkill; | |
} | |
public class TransferWipeSkill | |
{ | |
[JsonProperty(PropertyName = "Сброс после однократного использования?")] | |
public bool ResetSigle; | |
} | |
public class ComponentsRatesSkill | |
{ | |
[JsonProperty(PropertyName = "Разрешенные категории", | |
ObjectCreationHandling = ObjectCreationHandling.Replace, | |
ItemConverterType = typeof(StringEnumConverter))] | |
public List<ItemCategory> AllowedCategories = new List<ItemCategory>(); | |
[JsonProperty(PropertyName = "Разрешенные предметы", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> AllowedItems = new List<string>(); | |
[JsonProperty(PropertyName = "Блок-лист компонентов (shortname)", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> BlockList = new List<string>(); | |
} | |
public class AdditionalButtonsSettings | |
{ | |
[JsonProperty(PropertyName = "Кнопки", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<AdditinalButton> Buttons = new List<AdditinalButton>(); | |
[JsonProperty(PropertyName = "Настройка Интерфейса")] | |
public ButtonsUI UI; | |
public class AdditinalButton | |
{ | |
[JsonProperty(PropertyName = "Включено")] | |
public bool Enabled; | |
[JsonProperty(PropertyName = "Изображение")] | |
public string Image; | |
[JsonProperty(PropertyName = "Команда")] | |
public string Command; | |
[JsonProperty(PropertyName = "Закрыть меню")] | |
public bool CloseMenu; | |
public AdditinalButton(bool enabled, string image, string command, bool closeMenu) | |
{ | |
Enabled = enabled; | |
Image = image; | |
Command = command; | |
CloseMenu = closeMenu; | |
} | |
} | |
public class ButtonsUI | |
{ | |
[JsonProperty(PropertyName = "Боковой отступ")] | |
public float SideIndent; | |
[JsonProperty(PropertyName = "Отступ вверху")] | |
public float UpIndent; | |
[JsonProperty(PropertyName = "Расстояние между")] | |
public float Margin; | |
[JsonProperty(PropertyName = "Размер")] | |
public float Size; | |
} | |
} | |
public class BalanceIcon | |
{ | |
[JsonProperty(PropertyName = "Offset Min Y")] | |
public float OffsetMinY; | |
[JsonProperty(PropertyName = "Offset Max Y")] | |
public float OffsetMaxY; | |
[JsonProperty(PropertyName = "Длина")] public float Length; | |
} | |
public class INotify | |
{ | |
[JsonProperty(PropertyName = "Ключ изображения | Image Key")] | |
public string Image; | |
[JsonProperty(PropertyName = "Ссылка на изображение | Image Url")] | |
public string Url; | |
[JsonProperty(PropertyName = "Время показа | Show Time")] | |
public float Delay; | |
} | |
public class EconomyConf | |
{ | |
[JsonProperty(PropertyName = "Тип (Plugin/Item)")] [JsonConverter(typeof(StringEnumConverter))] | |
public EconomyType Type; | |
[JsonProperty(PropertyName = "Название плагина | Plugin name")] | |
public string Plug; | |
[JsonProperty(PropertyName = "Функция пополнения баланса | Balance add hook")] | |
public string AddHook; | |
[JsonProperty(PropertyName = "Функция снятия баланса | Balance remove hook")] | |
public string RemoveHook; | |
[JsonProperty(PropertyName = "Функция показа баланса | Balance show hook")] | |
public string BalanceHook; | |
[JsonProperty(PropertyName = "ShortName")] | |
public string ShortName; | |
[JsonProperty(PropertyName = "Display Name (пусто - стандартное | empty - default)")] | |
public string DisplayName; | |
[JsonProperty(PropertyName = "Skin")] public ulong Skin; | |
} | |
public class CraftRatesSkill | |
{ | |
[JsonProperty(PropertyName = "Список разрешенных предметов", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> AllowedList = new List<string>(); | |
} | |
public class FastOvenSkill | |
{ | |
[JsonProperty(PropertyName = "Работа с кострами | Work with campfires")] | |
public bool WorkWithCampfires = true; | |
[JsonProperty(PropertyName = "Множитель угля| Charcoal multiplier")] | |
public int CharcoalMultiplier = 2; | |
[JsonProperty(PropertyName = "Перестаньте сжигать пищу | Stop burning food")] | |
public bool StopBurningFood = true; | |
[JsonProperty(PropertyName = "Stages", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public Dictionary<int, FastOvenStage> Stages; | |
} | |
public class FastOvenStage | |
{ | |
[JsonProperty(PropertyName = "Разрешение | Permission (пример: skills.vip)")] | |
public string Permission; | |
[JsonProperty(PropertyName = "Стоимость | Cost")] | |
public float Cost; | |
[JsonProperty(PropertyName = "Рейты | Rates", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public Dictionary<string, int> Rates; | |
[JsonProperty(PropertyName = "Требуемые стадии скиллов | Required skill stages", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<RequiredSkillStage> RequiredSkillStages; | |
} | |
public class Skill | |
{ | |
[JsonProperty(PropertyName = "Включено | Enabled")] | |
public bool Enabled; | |
[JsonProperty(PropertyName = "Разрешение | Permission")] | |
public string Permission = string.Empty; | |
[JsonProperty(PropertyName = "Тип | Type")] [JsonConverter(typeof(StringEnumConverter))] | |
public SkillType Type; | |
[JsonProperty(PropertyName = "ID (для/for None)")] | |
public int ID; | |
[JsonProperty(PropertyName = "Изображение | Image")] | |
public string Image; | |
[JsonProperty(PropertyName = "Название | Title")] | |
public string Title; | |
[JsonProperty(PropertyName = "Описание | Description")] | |
public string Description; | |
[JsonProperty(PropertyName = "Короткое имя | Shortname")] | |
public string ShortName; | |
[JsonProperty(PropertyName = "Уровни | Levels", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public Dictionary<int, StageConf> Stages; | |
} | |
public class RequiredSkillStage | |
{ | |
[JsonProperty(PropertyName = "Type")] [JsonConverter(typeof(StringEnumConverter))] | |
public SkillType Type; | |
[JsonProperty(PropertyName = "ID")] public int ID; | |
[JsonProperty(PropertyName = "Stage")] public int Stage; | |
[JsonProperty(PropertyName = | |
"Require the presence of this skill? (otherwise only the stage will be checked)")] | |
public bool RequireSkill; | |
} | |
public class StageConf | |
{ | |
[JsonProperty(PropertyName = "Разрешение | Permission (пример: skills.vip)")] | |
public string Permission; | |
[JsonProperty(PropertyName = "Стоимость | Cost")] | |
public float Cost; | |
[JsonProperty(PropertyName = | |
"Значение [метаболизм - значение, шанс встать - шанс, для всех остальных процент %] | VALUE")] | |
public float Value; | |
[JsonProperty(PropertyName = "Значение 2")] | |
public float Value2; | |
[JsonProperty(PropertyName = "Команды | Commands", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Commands; | |
[JsonProperty(PropertyName = "Группы | Groups", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Groups; | |
[JsonProperty(PropertyName = "Разрешения | Permissions", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Permissions; | |
[JsonProperty(PropertyName = "Требуемые стадии скиллов | Required skill stages", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<RequiredSkillStage> RequiredSkillStages; | |
public StageConf(string permission = "", float cost = 0f, float value = 0f, float value2 = 0f, | |
List<RequiredSkillStage> requiredSkillStages = null) | |
{ | |
Permission = permission; | |
Cost = cost; | |
Value = value; | |
Value2 = value2; | |
RequiredSkillStages = requiredSkillStages ?? new List<RequiredSkillStage>(); | |
Commands = new List<string>(); | |
Groups = new List<string>(); | |
Permissions = new List<string>(); | |
} | |
[JsonConstructor] | |
public StageConf(string permission, float cost, float value, float value2, List<string> commands, | |
List<string> groups, | |
List<string> permissions, List<RequiredSkillStage> requiredSkillStages) | |
{ | |
Permission = permission; | |
Cost = cost; | |
Value = value; | |
Value2 = value2; | |
Commands = commands; | |
Groups = groups; | |
Permissions = permissions; | |
RequiredSkillStages = requiredSkillStages; | |
} | |
} | |
public class SkillPanel | |
{ | |
[JsonProperty(PropertyName = "Фон | Background")] | |
public SIPanel Background; | |
[JsonProperty(PropertyName = "Изображение | Image")] | |
public InterfacePosition Image; | |
[JsonProperty(PropertyName = "Заглавие | Title")] | |
public IText Title; | |
[JsonProperty(PropertyName = "Описание | Description")] | |
public IText Description; | |
[JsonProperty(PropertyName = "Кнопка | Button")] | |
public IButton Button; | |
[JsonProperty(PropertyName = "Кнопка описания | Description Button")] | |
public DescriptionButton DescriptionButton; | |
[JsonProperty(PropertyName = "Стоимость | Cost")] | |
public IText Cost; | |
[JsonProperty(PropertyName = "Приписка к стоимости | Add to cost")] | |
public string AddCost; | |
[JsonProperty(PropertyName = "Включить пририску к стоимости (изображение) | Enable Add to cost (image)")] | |
public bool EnableCostImage; | |
[JsonProperty(PropertyName = "Приписка к стоимости (изображение) | Add to cost (image)")] | |
public IPanel AddCostImage; | |
[JsonProperty(PropertyName = "Уровни | Levels")] | |
public IProgress Stages; | |
[JsonProperty(PropertyName = "Количество на страницу | Count On Page")] | |
public int Count; | |
[JsonProperty(PropertyName = "Высота | Height")] | |
public float Height; | |
[JsonProperty(PropertyName = "Ширина | Width")] | |
public float Width; | |
[JsonProperty(PropertyName = "Отступ | Margin")] | |
public float Margin; | |
[JsonProperty(PropertyName = "Показывать все стадии скиллов | Show all stages of skills")] | |
public bool ShowAllStages; | |
} | |
public class IProgress : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = "Высота | Height")] | |
public float Height; | |
[JsonProperty(PropertyName = "Ширина | Weidth")] | |
public float Width; | |
[JsonProperty(PropertyName = "Отступ | Margin")] | |
public float Margin; | |
[JsonProperty(PropertyName = "Активный цвет | Active Color")] | |
public IColor AColor; | |
[JsonProperty(PropertyName = "Не активный цвет | No Active Color")] | |
public IColor DColor; | |
} | |
public class IButton : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = "Цвет | Color")] | |
public IColor AColor; | |
[JsonProperty(PropertyName = "Не активный цвет | No Active Color")] | |
public IColor DColor; | |
[JsonProperty(PropertyName = "Настройка текста | Text Setting")] | |
public IText TextUi; | |
} | |
public class DescriptionButton : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = "Включено | Enabled")] | |
public bool Enabled; | |
[JsonProperty(PropertyName = "Цвет | Color")] | |
public IColor AColor; | |
[JsonProperty(PropertyName = "Не активный цвет | No Active Color")] | |
public IColor DColor; | |
[JsonProperty(PropertyName = "Настройки текста | Text Setting")] | |
public IText TextUi; | |
} | |
public class SIPanel | |
{ | |
[JsonProperty(PropertyName = "Изображение | Image")] | |
public string Image; | |
[JsonProperty(PropertyName = "Цвет | Color")] | |
public IColor Color; | |
[JsonProperty(PropertyName = "Сохранять цвет изображения? | Save Image Color")] | |
public bool isRaw; | |
[JsonProperty(PropertyName = "Sprite")] | |
public string Sprite; | |
[JsonProperty(PropertyName = "Material")] | |
public string Material; | |
[JsonProperty(PropertyName = "Отклонение по высоте | Height deviation")] | |
public float HeightCorrect; | |
} | |
public class InterfacePosition | |
{ | |
public string AnchorMin; | |
public string AnchorMax; | |
public string OffsetMin; | |
public string OffsetMax; | |
} | |
public class IColor | |
{ | |
[JsonProperty(PropertyName = "HEX")] public string HEX; | |
[JsonProperty(PropertyName = "Непрозрачность | Opacity (0 - 100)")] | |
public float Alpha; | |
public IColor(string hex, float alpha) | |
{ | |
HEX = hex; | |
Alpha = alpha; | |
} | |
} | |
public class IPanel : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = "Изображение | Image")] | |
public string Image; | |
[JsonProperty(PropertyName = "Цвет | Color")] | |
public IColor Color; | |
[JsonProperty(PropertyName = "Сохранять цвет изображения? | Save Image Color")] | |
public bool isRaw; | |
[JsonProperty(PropertyName = "Sprite")] | |
public string Sprite; | |
[JsonProperty(PropertyName = "Material")] | |
public string Material; | |
} | |
public class IText : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = "Font Size")] | |
public int FontSize; | |
[JsonProperty(PropertyName = "Font")] public string Font; | |
[JsonProperty(PropertyName = "Align")] [JsonConverter(typeof(StringEnumConverter))] | |
public TextAnchor Align; | |
[JsonProperty(PropertyName = "Text Color")] | |
public IColor Color; | |
} | |
} | |
#endregion | |
#region New Config | |
public class NewConfig | |
{ | |
private const bool LangRu = true; | |
public class Configuration | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Разрешение (пример: skills.use)" : "Permission (example: skills.use)")] | |
public string Permission = string.Empty; | |
[JsonProperty(PropertyName = LangRu ? "Команда" : "Command")] | |
public string Command = "skills"; | |
[JsonProperty(PropertyName = LangRu ? "Автоматический вайп?" : "Auto wipe?")] | |
public bool Wipe = true; | |
[JsonProperty(PropertyName = LangRu ? "Работать с Notify?" : "Work with Notify?")] | |
public bool UseNotify = true; | |
[JsonProperty(PropertyName = LangRu ? "Хранить данные о залутанных контейнерах в дате?" : "Store the data on the looted containers in the data-files?")] | |
public bool StoreContainers = false; | |
[JsonProperty(PropertyName = LangRu ? "Экономика" : "Economy")] | |
public EconomyConf Economy = new EconomyConf | |
{ | |
Type = EconomyType.Plugin, | |
AddHook = "Deposit", | |
BalanceHook = "Balance", | |
RemoveHook = "Withdraw", | |
Plug = "Economics", | |
ShortName = "scrap", | |
DisplayName = string.Empty, | |
Skin = 0 | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Уведомление о максимальном уровне" : "Maximum level notify")] | |
public INotify MaxLevel = new INotify | |
{ | |
Image = "warning", | |
Url = "https://i.ibb.co/wBn7JzM/image.png", | |
Delay = 0.9f | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Уведомление о нехватке денег" : "Out of balance notify")] | |
public INotify NotMoney = new INotify | |
{ | |
Image = "warning", | |
Url = "https://i.ibb.co/wBn7JzM/image.png", | |
Delay = 0.9f | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Фон" : "Background")] | |
public IPanel Background = new IPanel | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 1", | |
OffsetMin = "0 0", OffsetMax = "0 0", | |
Image = string.Empty, | |
Color = new IColor("#0D1F4E", 95), | |
isRaw = false, | |
Sprite = "Assets/Content/UI/UI.Background.Tile.psd", | |
Material = "Assets/Icons/IconMaterial.mat" | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Заголовок" : "Title")] | |
public IText Title = new IText | |
{ | |
AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", | |
OffsetMin = "-150 300", OffsetMax = "150 360", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 38, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Назад" : "Back")] | |
public IText Back = new IText | |
{ | |
AnchorMin = "0 0.5", AnchorMax = "0 0.5", | |
OffsetMin = "0 -40", OffsetMax = "65 40", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 60, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Далее" : "Next")] | |
public IText Next = new IText | |
{ | |
AnchorMin = "1 0.5", AnchorMax = "1 0.5", | |
OffsetMin = "-65 -40", OffsetMax = "0 40", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 60, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Баланс" : "Balance")] | |
public IText BalanceText = new IText | |
{ | |
AnchorMin = "0.5 0", AnchorMax = "0.5 0", | |
OffsetMin = "-150 0", OffsetMax = "150 75", | |
Font = "robotocondensed-regular.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 24, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Включить иконку баланса" : "Enable Balance Icon")] | |
public bool EnableBalanceIcon = false; | |
[JsonProperty(PropertyName = LangRu ? "Иконка баланса" : "Balance Icon")] | |
public BalanceIcon BalanceIcon = new BalanceIcon | |
{ | |
OffsetMinY = 20, | |
OffsetMaxY = 55, | |
Length = 35 | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Закрыть" : "Close")] | |
public IText CloseLabel = new IText | |
{ | |
AnchorMin = "1 1", AnchorMax = "1 1", | |
OffsetMin = "-35 -35", OffsetMax = "-5 -5", | |
Font = "robotocondensed-bold.ttf", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 24, | |
Color = new IColor("#FFFFFF", 100) | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Панель навыка" : "Skill Panel")] | |
public SkillPanel SkillPanel = new SkillPanel | |
{ | |
Background = new SIPanel | |
{ | |
Image = string.Empty, | |
Color = new IColor("#1D3676", 98), | |
isRaw = false, | |
Sprite = "Assets/Content/UI/UI.Background.Tile.psd", | |
Material = "Assets/Icons/IconMaterial.mat", | |
HeightCorrect = 5 | |
}, | |
Image = new InterfacePosition | |
{ | |
AnchorMin = "0 0", AnchorMax = "0 0", | |
OffsetMin = "10 10", OffsetMax = "160 160" | |
}, | |
Title = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 0", | |
OffsetMin = "165 135", OffsetMax = "-5 160", | |
Align = TextAnchor.MiddleLeft, | |
FontSize = 20, | |
Font = "robotocondensed-bold.ttf", | |
Color = new IColor("#FFFFFF", 100) | |
}, | |
Description = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 0", | |
OffsetMin = "165 30", OffsetMax = "-5 130", | |
Align = TextAnchor.UpperLeft, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#FFFFFF", 100) | |
}, | |
Button = new IButton | |
{ | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-105 10", OffsetMax = "-10 30", | |
AColor = new IColor("#B5FFC9", 100), | |
DColor = new IColor("#B5FFC9", 25), | |
TextUi = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 1", | |
OffsetMin = "0 0", OffsetMax = "0 0", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#1D3676", 100) | |
} | |
}, | |
DescriptionButton = new DescriptionButton | |
{ | |
Enabled = false, | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-105 35", OffsetMax = "-10 55", | |
AColor = new IColor("#B5FFC9", 100), | |
DColor = new IColor("#B5FFC9", 25), | |
TextUi = new IText | |
{ | |
AnchorMin = "0 0", AnchorMax = "1 1", | |
OffsetMin = "0 0", OffsetMax = "0 0", | |
Align = TextAnchor.MiddleCenter, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#1D3676", 100) | |
} | |
}, | |
Cost = new IText | |
{ | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-150 10", OffsetMax = "-110 30", | |
Align = TextAnchor.MiddleRight, | |
FontSize = 14, | |
Font = "robotocondensed-regular.ttf", | |
Color = new IColor("#FFFFFF", 100) | |
}, | |
AddCost = "$", | |
EnableCostImage = false, | |
AddCostImage = new IPanel | |
{ | |
AnchorMin = "1 0", AnchorMax = "1 0", | |
OffsetMin = "-130 10", OffsetMax = "-110 30", | |
Color = new IColor("#FFFFFF", 100), | |
isRaw = true, | |
Image = "https://i.ibb.co/yfBv8F5/image.png", | |
Sprite = string.Empty, | |
Material = string.Empty | |
}, | |
Stages = new IProgress | |
{ | |
AnchorMin = "0 0", AnchorMax = "0 0", | |
OffsetMin = "160 10", OffsetMax = "160 10", | |
Height = 20, | |
Width = 10, | |
Margin = 5, | |
AColor = new IColor("#8C70D6", 100), | |
DColor = new IColor("#8C70D6", 25) | |
}, | |
Count = 6, | |
Height = 170, | |
Width = 565, | |
Margin = 20, | |
ShowAllStages = true | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Навыки" : "Skills", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<Skill> Skills = new List<Skill>(); | |
[JsonProperty(PropertyName = LangRu ? "Животные" : "Animals", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Animals = new List<string> | |
{ | |
"chicken.corpse", | |
"boar.corpse", | |
"bear.corpse", | |
"wolf.corpse", | |
"stag.corpse", | |
"polarbear.corpse" | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Черный список печей" : "Ovens Black List", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> OvensBlackList = new List<string> | |
{ | |
"entity shortnameprefab 1", | |
"entity shortnameprefab 2" | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Черный список контейнеров" : "Containers Black List", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> ContainersBlackList = new List<string> | |
{ | |
"entity prefab name 1", | |
"entity prefab name 2" | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Черный список для навыка атаки" : "Blacklist for Attack skill", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> AttackBlackList = new List<string> | |
{ | |
"entity prefab name 1", | |
"entity prefab name 2" | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Дополнительные настройки для навыка Быстроой Печи" : "Additional settings for the Fast Oven skill")] | |
public FastOvenSkill FastOven = new FastOvenSkill | |
{ | |
Stages = new Dictionary<int, FastOvenStage> | |
{ | |
[1] = new FastOvenStage | |
{ | |
Permission = string.Empty, | |
Cost = 10, | |
Rates = new Dictionary<string, int> | |
{ | |
{"ore", 1}, | |
{"meat", 1}, | |
{"hq.metal.ore", 1}, | |
{"wood", 1}, | |
{"*", 1} | |
}, | |
RequiredSkillStages = new List<RequiredSkillStage> | |
{ | |
new RequiredSkillStage | |
{ | |
ID = 0, | |
Type = SkillType.CraftSpeed, | |
Stage = 1, | |
RequireSkill = false | |
} | |
} | |
}, | |
[2] = new FastOvenStage | |
{ | |
Permission = string.Empty, | |
Cost = 15, | |
Rates = new Dictionary<string, int> | |
{ | |
{"ore", 2}, | |
{"meat", 2}, | |
{"hq.metal.ore", 2}, | |
{"wood", 2}, | |
{"*", 2} | |
}, | |
RequiredSkillStages = new List<RequiredSkillStage>() | |
}, | |
[3] = new FastOvenStage | |
{ | |
Permission = string.Empty, | |
Cost = 20, | |
Rates = new Dictionary<string, int> | |
{ | |
{"ore", 3}, | |
{"meat", 3}, | |
{"hq.metal.ore", 3}, | |
{"wood", 3}, | |
{"*", 3} | |
}, | |
RequiredSkillStages = new List<RequiredSkillStage>() | |
} | |
} | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Дополнительные настройки для навыка Компоненты Рейты" : "Additional settings for the Components Rates skill")] | |
public ComponentsRatesSkill ComponentsRates = new ComponentsRatesSkill | |
{ | |
AllowedCategories = new List<ItemCategory> | |
{ | |
ItemCategory.Component | |
}, | |
AllowedItems = new List<string> | |
{ | |
"targeting.computer", | |
"cctv.camera" | |
}, | |
BlockList = new List<string> | |
{ | |
"glue", | |
"techparts" | |
} | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Настройка Дополнительных Кнопок" : "Additional Buttons Settings")] | |
public AdditionalButtonsSettings AdditionalButtons = new AdditionalButtonsSettings | |
{ | |
Buttons = new List<AdditionalButtonsSettings.AdditinalButton> | |
{ | |
new AdditionalButtonsSettings.AdditinalButton(false, "https://i.ibb.co/X8btTQV/C83Rprq.png", | |
"leaders", | |
true) | |
}, | |
UI = new AdditionalButtonsSettings.ButtonsUI | |
{ | |
SideIndent = 45, | |
UpIndent = 5, | |
Size = 30, | |
Margin = 5 | |
} | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Дополнительные настройки для скилла Transfer Wipe" : "Additional settings for the Transfer Wipe skill")] | |
public TransferWipeSkill TransferWipe = new TransferWipeSkill | |
{ | |
ResetSigle = false | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Дополнительные настройки для скилла Craft Rates" : "Additional settings for the Craft Rates skill")] | |
public CraftRatesSkill CraftRates = new CraftRatesSkill | |
{ | |
AllowedList = new List<string> | |
{ | |
"gunpowder", | |
"lowgradefuel", | |
"rock" | |
} | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Настройка Оповещений" : "Broadcasting Settings")] | |
public Broadcasting Broadcasting = new Broadcasting | |
{ | |
UseLearnSkill = true | |
}; | |
[JsonProperty(PropertyName = LangRu ? "Использовать бонусный режим для навыков добычи?" : "Use bonus mode for mining skills?")] | |
public bool UseBonusMode = false; | |
[JsonProperty(PropertyName = LangRu ? "Черный список предметов для навыка Durability" : "Blacklist of items for Durability skills", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public HashSet<string> DurabilityBlacklist = new HashSet<string> | |
{ | |
"keycard_blue", | |
"keycard_red", | |
"keycard_green" | |
}; | |
public VersionNumber Version; | |
} | |
public class Broadcasting | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Включить оповещения при изучении навыка?" : "Enable broadcast when learning a skill?")] | |
public bool UseLearnSkill; | |
} | |
public class TransferWipeSkill | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Сброс после однократного использования?" : "Reset after a single use?")] | |
public bool ResetSigle; | |
} | |
public class ComponentsRatesSkill | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Разрешенные категории" : "Allowed Categories", | |
ObjectCreationHandling = ObjectCreationHandling.Replace, | |
ItemConverterType = typeof(StringEnumConverter))] | |
public List<ItemCategory> AllowedCategories = new List<ItemCategory>(); | |
[JsonProperty(PropertyName = LangRu ? "Разрешенные предметы" : "Allowed Items", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> AllowedItems = new List<string>(); | |
[JsonProperty(PropertyName = LangRu ? "Блок-лист компонентов (shortname)" : "Components Block List (shortname)", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> BlockList = new List<string>(); | |
} | |
public class AdditionalButtonsSettings | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Кнопки" : "Buttons", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<AdditinalButton> Buttons = new List<AdditinalButton>(); | |
[JsonProperty(PropertyName = LangRu ? "Настройка Интерфейса" : "Interface Settings")] | |
public ButtonsUI UI; | |
public class AdditinalButton | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Включено" : "Enabled")] | |
public bool Enabled; | |
[JsonProperty(PropertyName = LangRu ? "Изображение" : "Image")] public string Image; | |
[JsonProperty(PropertyName = LangRu ? "Команда" : "Command")] | |
public string Command; | |
[JsonProperty(PropertyName = LangRu ? "Закрыть меню" : "Close Menu")] | |
public bool CloseMenu; | |
public AdditinalButton(bool enabled, string image, string command, bool closeMenu) | |
{ | |
Enabled = enabled; | |
Image = image; | |
Command = command; | |
CloseMenu = closeMenu; | |
} | |
} | |
public class ButtonsUI | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Боковой отступ" : "Side Indent")] | |
public float SideIndent; | |
[JsonProperty(PropertyName = LangRu ? "Отступ вверху" : "Up Indent")] | |
public float UpIndent; | |
[JsonProperty(PropertyName = LangRu ? "Расстояние между" : "Margin")] | |
public float Margin; | |
[JsonProperty(PropertyName = LangRu ? "Размер" : "Size")] public float Size; | |
} | |
} | |
public class BalanceIcon | |
{ | |
[JsonProperty(PropertyName = "Offset Min Y")] | |
public float OffsetMinY; | |
[JsonProperty(PropertyName = "Offset Max Y")] | |
public float OffsetMaxY; | |
[JsonProperty(PropertyName = LangRu ? "Длина" : "Length")] | |
public float Length; | |
} | |
public class INotify | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Ключ изображения" : "Image Key")] | |
public string Image; | |
[JsonProperty(PropertyName = LangRu ? "Ссылка на изображение" : "Image Url")] | |
public string Url; | |
[JsonProperty(PropertyName = LangRu ? "Время показа" : "Show Time")] | |
public float Delay; | |
} | |
public class EconomyConf | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Тип (Plugin/Item)" : "Type (Plugin/Item)")] [JsonConverter(typeof(StringEnumConverter))] | |
public EconomyType Type; | |
[JsonProperty(PropertyName = LangRu ? "Название плагина" : "Plugin name")] | |
public string Plug; | |
[JsonProperty(PropertyName = LangRu ? "Функция пополнения баланса" : "Balance add hook")] | |
public string AddHook; | |
[JsonProperty(PropertyName = LangRu ? "Функция снятия баланса" : "Balance remove hook")] | |
public string RemoveHook; | |
[JsonProperty(PropertyName = LangRu ? "Функция показа баланса" : "Balance show hook")] | |
public string BalanceHook; | |
[JsonProperty(PropertyName = "ShortName")] | |
public string ShortName; | |
[JsonProperty(PropertyName = LangRu ? "Display Name (пусто - стандартное | empty - default)" : "Display Name (empty - default)")] | |
public string DisplayName; | |
[JsonProperty(PropertyName = LangRu ? "Скин" : "Skin")] public ulong Skin; | |
} | |
public class CraftRatesSkill | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Список разрешенных предметов" : "Allowed List", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> AllowedList = new List<string>(); | |
} | |
public class FastOvenSkill | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Работа с кострами" : "Work with campfires")] | |
public bool WorkWithCampfires = true; | |
[JsonProperty(PropertyName = LangRu ? "Множитель угля" : "Charcoal multiplier")] | |
public float CharcoalMultiplier = 2; | |
[JsonProperty(PropertyName = LangRu ? "Перестаньте сжигать пищу" : "Stop burning food")] | |
public bool StopBurningFood = true; | |
[JsonProperty(PropertyName = LangRu ? "Уровни" : "Stages", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public Dictionary<int, FastOvenStage> Stages; | |
} | |
public class FastOvenStage | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Разрешение (пример: skills.vip)" : "Permission (ex: skills.vip)")] | |
public string Permission; | |
[JsonProperty(PropertyName = LangRu ? "Стоимость" : "Cost")] public float Cost; | |
[JsonProperty(PropertyName = LangRu ? "Рейты" : "Rates", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public Dictionary<string, int> Rates; | |
[JsonProperty(PropertyName = LangRu ? "Требуемые стадии скиллов" : "Required skill stages", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<RequiredSkillStage> RequiredSkillStages; | |
} | |
public class Skill | |
{ | |
#region Fields | |
[JsonProperty(PropertyName = LangRu ? "Включено" : "Enabled")] | |
public bool Enabled; | |
[JsonProperty(PropertyName = LangRu ? "Разрешение" : "Permission")] | |
public string Permission = string.Empty; | |
[JsonProperty(PropertyName = LangRu ? "Тип" : "Type")] [JsonConverter(typeof(StringEnumConverter))] | |
public SkillType Type; | |
[JsonProperty(PropertyName = LangRu ? "ИД (для None)" : "ID (for None)")] | |
public int ID; | |
[JsonProperty(PropertyName = LangRu ? "Изображение" : "Image")] public string Image; | |
[JsonProperty(PropertyName = LangRu ? "Название" : "Title")] public string Title; | |
[JsonProperty(PropertyName = LangRu ? "Описание" : "Description")] | |
public string Description; | |
[JsonProperty(PropertyName = LangRu ? "Короткое имя" : "Shortname")] | |
public string ShortName; | |
[JsonProperty(PropertyName = LangRu ? "Уровни" : "Stages", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public Dictionary<int, StageConf> Stages; | |
#endregion | |
} | |
public class RequiredSkillStage | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Тип" : "Type")] [JsonConverter(typeof(StringEnumConverter))] | |
public SkillType Type; | |
[JsonProperty(PropertyName = LangRu ? "ИД" : "ID")] public int ID; | |
[JsonProperty(PropertyName = LangRu ? "Уровень" : "Stage")] public int Stage; | |
[JsonProperty(PropertyName = LangRu ? "Требуется наличие этого навыка? (в противном случае будет проверен только уровень)" : | |
"Require the presence of this skill? (otherwise only the stage will be checked)")] | |
public bool RequireSkill; | |
} | |
public class StageConf | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Разрешение (пример: skills.vip)" : "Permission (ex: skills.vip)")] | |
public string Permission; | |
[JsonProperty(PropertyName = LangRu ? "Стоимость" : "Cost")] public float Cost; | |
[JsonProperty(PropertyName = LangRu ? "Значение [метаболизм - значение, шанс встать - шанс, для всех остальных процент %]" :"Value [metabolism - value, for everyone else %]")] | |
public float Value; | |
[JsonProperty(PropertyName = LangRu ? "Значение 2" : "Value 2")] | |
public float Value2; | |
[JsonProperty(PropertyName = LangRu ? "Команды" : "Commands", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Commands; | |
[JsonProperty(PropertyName = LangRu ? "Группы" : "Groups", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Groups; | |
[JsonProperty(PropertyName = LangRu ? "Разрешения" : "Permissions", ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<string> Permissions; | |
[JsonProperty(PropertyName = LangRu ? "Требуемые стадии скиллов" : "Required skill stages", | |
ObjectCreationHandling = ObjectCreationHandling.Replace)] | |
public List<RequiredSkillStage> RequiredSkillStages; | |
public StageConf(string permission = "", float cost = 0f, float value = 0f, float value2 = 0f, | |
List<RequiredSkillStage> requiredSkillStages = null) | |
{ | |
Permission = permission; | |
Cost = cost; | |
Value = value; | |
Value2 = value2; | |
RequiredSkillStages = requiredSkillStages ?? new List<RequiredSkillStage>(); | |
Commands = new List<string>(); | |
Groups = new List<string>(); | |
Permissions = new List<string>(); | |
} | |
[JsonConstructor] | |
public StageConf(string permission, float cost, float value, float value2, List<string> commands, | |
List<string> groups, | |
List<string> permissions, List<RequiredSkillStage> requiredSkillStages) | |
{ | |
Permission = permission; | |
Cost = cost; | |
Value = value; | |
Value2 = value2; | |
Commands = commands; | |
Groups = groups; | |
Permissions = permissions; | |
RequiredSkillStages = requiredSkillStages; | |
} | |
} | |
public class SkillPanel | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Фон" : "Background")] | |
public SIPanel Background; | |
[JsonProperty(PropertyName = LangRu ? "Изображение" : "Image")] public InterfacePosition Image; | |
[JsonProperty(PropertyName = LangRu ? "Заглавие" : "Title")] public IText Title; | |
[JsonProperty(PropertyName = LangRu ? "Описание" : "Description")] | |
public IText Description; | |
[JsonProperty(PropertyName = LangRu ? "Кнопка" : "Button")] | |
public IButton Button; | |
[JsonProperty(PropertyName = LangRu ? "Кнопка описания" : "Description Button")] | |
public DescriptionButton DescriptionButton; | |
[JsonProperty(PropertyName = LangRu ? "Стоимость" : "Cost")] public IText Cost; | |
[JsonProperty(PropertyName = LangRu ? "Приписка к стоимости" : "Add to cost")] | |
public string AddCost; | |
[JsonProperty(PropertyName = LangRu ? "Включить пририску к стоимости (изображение)" : "Enable Add to cost (image)")] | |
public bool EnableCostImage; | |
[JsonProperty(PropertyName = LangRu ? "Приписка к стоимости (изображение)" : "Add to cost (image)")] | |
public IPanel AddCostImage; | |
[JsonProperty(PropertyName = LangRu ? "Уровни" : "Stages")] | |
public IProgress Stages; | |
[JsonProperty(PropertyName = LangRu ? "Количество на страницу" : "Count On Page")] | |
public int Count; | |
[JsonProperty(PropertyName = LangRu ? "Высота" : "Height")] | |
public float Height; | |
[JsonProperty(PropertyName = LangRu ? "Ширина" : "Width")] public float Width; | |
[JsonProperty(PropertyName = LangRu ? "Отступ" : "Margin")] | |
public float Margin; | |
[JsonProperty(PropertyName = LangRu ? "Показывать все стадии скиллов" : "Show all stages of skills")] | |
public bool ShowAllStages; | |
} | |
public class IProgress : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Высота" : "Height")] | |
public float Height; | |
[JsonProperty(PropertyName = LangRu ? "Ширина" : "Weidth")] | |
public float Width; | |
[JsonProperty(PropertyName = LangRu ? "Отступ" : "Margin")] | |
public float Margin; | |
[JsonProperty(PropertyName = LangRu ? "Активный цвет" : "Active Color")] | |
public IColor AColor; | |
[JsonProperty(PropertyName = LangRu ? "Не активный цвет" : "No Active Color")] | |
public IColor DColor; | |
} | |
public class IButton : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Цвет" : "Color")] public IColor AColor; | |
[JsonProperty(PropertyName = LangRu ? "Не активный цвет" : "No Active Color")] | |
public IColor DColor; | |
[JsonProperty(PropertyName = LangRu ? "Настройка текста" : "Text Setting")] | |
public IText TextUi; | |
} | |
public class DescriptionButton : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Включено" : "Enabled")] | |
public bool Enabled; | |
[JsonProperty(PropertyName = LangRu ? "Цвет" : "Color")] public IColor AColor; | |
[JsonProperty(PropertyName = LangRu ? "Не активный цвет" : "No Active Color")] | |
public IColor DColor; | |
[JsonProperty(PropertyName = LangRu ? "Настройки текста" : "Text Setting")] | |
public IText TextUi; | |
} | |
public class SIPanel | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Изображение" : "Image")] public string Image; | |
[JsonProperty(PropertyName = LangRu ? "Цвет" : "Color")] public IColor Color; | |
[JsonProperty(PropertyName = LangRu ? "Сохранять цвет изображения?" : "Save Image Color")] | |
public bool isRaw; | |
[JsonProperty(PropertyName = "Sprite")] | |
public string Sprite; | |
[JsonProperty(PropertyName = "Material")] | |
public string Material; | |
[JsonProperty(PropertyName = LangRu ? "Отклонение по высоте" : "Height Correction")] | |
public float HeightCorrect; | |
} | |
public class InterfacePosition | |
{ | |
public string AnchorMin; | |
public string AnchorMax; | |
public string OffsetMin; | |
public string OffsetMax; | |
} | |
public class IColor | |
{ | |
[JsonProperty(PropertyName = "HEX")] public string HEX; | |
[JsonProperty(PropertyName = LangRu ? "Непрозрачность (0 - 100)" : "Opacity (0 - 100)")] | |
public float Alpha; | |
public IColor(string hex, float alpha) | |
{ | |
HEX = hex; | |
Alpha = alpha; | |
} | |
} | |
public class IPanel : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = LangRu ? "Изображение" : "Image")] public string Image; | |
[JsonProperty(PropertyName = LangRu ? "Цвет" : "Color")] public IColor Color; | |
[JsonProperty(PropertyName = LangRu ? "Сохранять цвет изображения?" : "Save Image Color")] | |
public bool isRaw; | |
[JsonProperty(PropertyName = "Sprite")] | |
public string Sprite; | |
[JsonProperty(PropertyName = "Material")] | |
public string Material; | |
} | |
public class IText : InterfacePosition | |
{ | |
[JsonProperty(PropertyName = "Font Size")] | |
public int FontSize; | |
[JsonProperty(PropertyName = "Font")] public string Font; | |
[JsonProperty(PropertyName = "Align")] [JsonConverter(typeof(StringEnumConverter))] | |
public TextAnchor Align; | |
[JsonProperty(PropertyName = "Text Color")] | |
public IColor Color; | |
} | |
} | |
#endregion | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment