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

FREE MBCalendar : 1.0.0 1.0.0

Нет прав для скачивания
C#:
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using Oxide.Core;
using System;
using Newtonsoft.Json;
using System.Linq;

namespace Oxide.Plugins
{
    [Info("MBCalendar", "Barry_Allenn", "1.0.0")]
    [Description("Простой календарь с пустым интерфейсом")]
    public class MBCalendar : RustPlugin
    {
        [PluginReference] private Plugin ImageLibrary, MBMainMenu;

        private ImageUI imageUI = new ImageUI();
        private ConfigData configData;


        #region Config

        private class ConfigData
        {
            [JsonProperty("День вайпа")]
            public DayOfWeek WipeDay = DayOfWeek.Thursday;

            [JsonProperty("Тип первого вайпа в месяце: global или normal")]
            public string FirstWipeType = "global";

        }

        public class WipeScheduleConfig
        {
            public List<WipeRule> Wipes = new List<WipeRule>();
        }

        public class WipeRule
        {
            public int WeekNumber;       // 1–5
            public DayOfWeek Day;        // Наприклад Thursday
            public string Type;          // global / normal / none
        }


        protected override void LoadConfig()
        {
            base.LoadConfig();
            configData = Config.ReadObject<ConfigData>();
            SaveConfig();
        }

        protected override void SaveConfig()
        {
            Config.WriteObject(configData, true);
        }

        protected override void LoadDefaultConfig()
        {
            configData = new ConfigData();
        }

        #endregion

        [ChatCommand("wipe")]
        private void CmdCalendar(BasePlayer player, string command, string[] args)
        {
            ShowCalendarUI(player);
        }

        void Init()
        {
            LoadConfig();
            // imageUI = new ImageUI();
            // imageUI.DownloadImages();
        }
        private void OnServerInitialized()
        {
            imageUI = new ImageUI();
            imageUI.DownloadImages();
        }

        void Unload()
        {
            foreach (var player in BasePlayer.activePlayerList)
            {
                CuiHelper.DestroyUi(player, "MBCalendar_UI");
            }

            imageUI?.UnloadImages();
        }

        #region CalendarUI

        [HookMethod("OpenCalendarForPlayer")]
        private void ShowCalendarUI(BasePlayer player)
        {
            CuiHelper.DestroyUi(player, "MBCalendar_UI");

            var container = new CuiElementContainer();

            string root = container.Add(new CuiPanel
            {
                Image = { Color = "0 0 0 0" },
                RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1" },
                CursorEnabled = true
            }, "Overlay", "MBCalendar_UI");

            string backgroundPanel = container.Add(new CuiPanel
            {
                Image = { Color = "0 0 0 0.7", Material = "assets/content/ui/uibackgroundblur.mat" },
                RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1" },
                CursorEnabled = true
            }, root);

            string imageId = imageUI?.GetImage("MBWelcome_Two_Os");
            if (!string.IsNullOrEmpty(imageId))
            {
                container.Add(new CuiElement
                {
                    Name = CuiHelper.GetGuid(),
                    Parent = root,
                    Components =
                    {
                        new CuiRawImageComponent { Png = imageId },
                        new CuiRectTransformComponent { AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-558 -314", OffsetMax = "558 315" }
                    }
                });
            }

            container.Add(new CuiButton
            {
                Button = { Color = "0 0 0 0", Close = "MBCalendar_UI" },
                RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1" },
                Text = { Text = "", FontSize = 0 }
            }, root);

            string centerPanel = container.Add(new CuiPanel
            {
                Image = { Color = "0.1 0.1 0.1 0" },
                RectTransform = {
                    AnchorMin = "0.5 0.5",
                    AnchorMax = "0.5 0.5",
                    OffsetMin = "-438 -265", // ширина 800, высота 600
                    OffsetMax = "440 265"
                },
                CursorEnabled = true
            }, root);

            DateTime nextGlobalWipe = GetNextGlobalWipeDate();

            // Текст без дати
            container.Add(new CuiLabel
            {
                RectTransform = { AnchorMin = "0.762 0.623", AnchorMax = "0.937 0.697" },
                Text = {
                Text = Msg("MB_Next_Global_Wipe", player.UserIDString),
                FontSize = 15,
                Align = TextAnchor.MiddleLeft,
                Color = "1 1 1 0.9"
            }
            }, centerPanel);

            // Окрема дата
            container.Add(new CuiLabel
            {
                RectTransform = { AnchorMin = "0.762 0.59", AnchorMax = "0.937 0.623" },
                Text = {
                Text = $"{nextGlobalWipe:dd.MM.yyyy} {Msg("MB_At_1700", player.UserIDString)}",
                FontSize = 11,
                Align = TextAnchor.MiddleLeft,
                Color = "1 1 1 0.6",
                Font = "robotocondensed-regular.ttf"
            }
            }, centerPanel);

            DateTime lastGlobalWipe = GetLastGlobalWipeDate();
            TimeSpan ago = DateTime.Now - lastGlobalWipe;

            int days = ago.Days;
            int hours = ago.Hours;
            int minutes = ago.Minutes;

            string agoText = Msg("MB_GlobalWipeAgo", player.UserIDString, days, hours, minutes);
            string exactDate = $"{lastGlobalWipe:dd.MM.yyyy} {Msg("MB_At_1700", player.UserIDString)}";



            // Текст: "Відбувся глобал вайп X дн Y год Z хв тому"
            container.Add(new CuiLabel
            {
                RectTransform = { AnchorMin = "0.762 0.453", AnchorMax = "0.937 0.527" },
                Text = {
                Text = agoText,
                FontSize = 15,
                Align = TextAnchor.MiddleLeft,
                Color = "1 1 1 0.9",
                Font = "robotocondensed-regular.ttf"
            }
            }, centerPanel);

            // Точна дата: "23.05.2025 в 17:00"
            container.Add(new CuiLabel
            {
                RectTransform = { AnchorMin = "0.762 0.418", AnchorMax = "0.937 0.453" },
                Text = {
                Text = exactDate,
                FontSize = 11,
                Align = TextAnchor.MiddleLeft,
                Color = "1 1 1 0.6",
                Font = "robotocondensed-regular.ttf"
            }
            }, centerPanel);

            // Панель-фон
            container.Add(new CuiPanel
            {
                Image = { Color = "0.67 0.87 0.80 0" }, // Темно-сірий прозорий фон
                RectTransform = { AnchorMin = "0.68 0.44", AnchorMax = "0.8 0.465" }
            }, root);

            container.Add(new CuiLabel
            {
                RectTransform = { AnchorMin = "0.341 0.86", AnchorMax = "0.75 0.955" },
                Text = { Text = Msg("MB_Calendar_Player", player.userID.ToString()), Color = "1 1 1 0.9", Align = TextAnchor.MiddleLeft, FontSize = 30 }
            }, centerPanel);

            container.Add(new CuiLabel
            {
                RectTransform = { AnchorMin = "0.341 0.8", AnchorMax = "0.8 0.868" },
                Text = { Text = Msg("MB_Calendar_Player_2", player.userID.ToString()), Color = "1 1 1 0.9", Align = TextAnchor.MiddleLeft, FontSize = 21, Font = "permanentmarker.ttf" }
            }, centerPanel);

            container.Add(new CuiLabel
            {
                Text = { Text = Msg("MB_Close_Calendar", player.userID.ToString()), FontSize = 13, Color = "1 1 1 0.4", Align = TextAnchor.MiddleCenter },
                RectTransform = { AnchorMin = "0.2 -0.06", AnchorMax = "0.8 -0.02" }
            }, centerPanel);

            container.Add(new CuiButton
            {
                Button = {
                    Command = "mbcalendar.back",  // кастомная команда
                    Color = "0.2 0.5 0.8 0"
                },
                            RectTransform = { AnchorMin = "0.865 0.04", AnchorMax = "0.947 0.12" },
                            Text = {
                    Text = Msg("MB_Back", player.UserIDString),
                    FontSize = 15,
                    Align = TextAnchor.MiddleCenter,
                    Color = "1 1 1 1"
                }
            }, centerPanel);

            string calendarPanel = container.Add(new CuiPanel
            {
                Image = { Color = "0 0 0 0" },
                RectTransform = {
                    AnchorMin = "0.337 0.21", AnchorMax = "0.7 0.79"    // правый верхний угол
                }
            }, centerPanel);



            AddCalendar(player, container, calendarPanel);


            CuiHelper.AddUi(player, container);
        }

        [ConsoleCommand("mbcalendar.back")]
        private void CmdBack(ConsoleSystem.Arg arg)
        {
            var player = arg.Connection?.player as BasePlayer;
            if (player == null) return;

            CuiHelper.DestroyUi(player, "MBCalendar_UI");

            MBMainMenu?.Call("ShowMainMenu", player);
        }


        #endregion

        #region AddCalendar

        private void AddCalendar(BasePlayer player, CuiElementContainer container, string parent)
        {

            DateTime now = NowInKiev();

            int year = now.Year;
            int month = now.Month;
            int daysInMonth = DateTime.DaysInMonth(year, month);

            int prevMonth = month == 1 ? 12 : month - 1;
            int nextMonth = month == 12 ? 1 : month + 1;
            int prevMonthYear = month == 1 ? year - 1 : year;
            int nextMonthYear = month == 12 ? year + 1 : year;
            int daysInPrevMonth = DateTime.DaysInMonth(prevMonthYear, prevMonth);

            int startDay = (int)new DateTime(year, month, 1).DayOfWeek;
            startDay = startDay == 0 ? 6 : startDay - 1;

            float xStart = 0f;
            float yStart = 0.9f;
            float xEnd = 1f;
            float yEnd = 0f;


            float spacingX = 0.007f;
            float spacingY = 0.007f;

            float totalSpacingX = spacingX * 6;
            float totalSpacingY = spacingY * 5;

            float cellW = (xEnd - xStart - totalSpacingX) / 7f;
            float cellH = (yStart - yEnd - totalSpacingY) / 6f;

            string[] dayLangKeys = {
                "Day_Mon", "Day_Tue", "Day_Wed", "Day_Thu", "Day_Fri", "Day_Sat", "Day_Sun"
            };

            for (int i = 0; i < 7; i++)
            {
                float xMin = xStart + i * (cellW + spacingX);
                float xMax = xMin + cellW;
                float yMin = yStart + spacingY;
                float yMax = yMin + (cellH * 0.6f);

                container.Add(new CuiLabel
                {
                    RectTransform = { AnchorMin = $"{xMin:0.###} {yMin:0.###}", AnchorMax = $"{xMax:0.###} {yMax:0.###}" },
                    Text = {
                        Text = Msg(dayLangKeys[i], player.UserIDString),
                        Align = TextAnchor.MiddleCenter,
                        FontSize = 13,
                        Color = "1 1 1 0.8",
                        Font = "robotocondensed-regular.ttf"
                    }
                }, parent);
            }

            int cell = 0;
            for (int row = 0; row < 6; row++)
            {
                for (int col = 0; col < 7; col++)
                {
                    int dayNum = cell - startDay + 1;

                    float xMin = xStart + col * (cellW + spacingX);
                    float xMax = xMin + cellW;
                    float yMax = yStart - row * (cellH + spacingY);
                    float yMin = yMax - cellH;

                    string anchorMin = $"{xMin:0.###} {yMin:0.###}";
                    string anchorMax = $"{xMax:0.###} {yMax:0.###}";
                    string panelName = $"CalDay_{row}_{col}";

                    string text;
                    string textColor = "1 1 1 1";
                    string imageKey;
                    bool isWeekend = col >= 5;
                    bool isCurrentMonth = true;
                    DateTime thisDate;

                    if (dayNum < 1)
                    {
                        int actualDay = daysInPrevMonth + dayNum;
                        text = actualDay.ToString();
                        textColor = "1 1 1 0.4";
                        imageKey = isWeekend ? "Day_Prev_Weekend" : "Day_Prev_Normal";
                        thisDate = new DateTime(prevMonthYear, prevMonth, actualDay);
                        isCurrentMonth = false;
                    }
                    else if (dayNum > daysInMonth)
                    {
                        int actualDay = dayNum - daysInMonth;
                        text = actualDay.ToString();
                        textColor = "1 1 1 0.4";
                        imageKey = isWeekend ? "Day_Prev_Weekend" : "Day_Prev_Normal";
                        thisDate = new DateTime(nextMonthYear, nextMonth, actualDay);
                        isCurrentMonth = false;
                    }
                    else
                    {
                        text = dayNum.ToString();
                        thisDate = new DateTime(year, month, dayNum);

                        bool isWipeDay = thisDate.DayOfWeek == configData.WipeDay;
                        bool isGlobalWipe = false;

                        if (isWipeDay)
                        {
                            int wipeIndex = 0;
                            int globalWipeIndex = 0;
                            string firstWipeType = GetMonthlyFirstWipeType(year, month);

                            // Посчитаем номер текущего вайпа и глобального вайпа
                            for (int d = 1; d <= dayNum; d++)
                            {
                                var dt = new DateTime(year, month, d);
                                if (dt.DayOfWeek == configData.WipeDay)
                                {
                                    wipeIndex++;
                                    bool thisIsGlobal = (wipeIndex % 2 == 1) == (firstWipeType == "global");
                                    if (thisIsGlobal)
                                        globalWipeIndex++;
                                }
                            }

                            // Текущий день — глобальный?
                            isGlobalWipe = (wipeIndex % 2 == 1) == (firstWipeType == "global");

                            if (isGlobalWipe)
                            {
                                if (thisDate.Date == DateTime.Today)
                                    imageKey = "Day_Wipe_Today_Global"; // 🔵 Сегодня глобал
                                else if (thisDate < DateTime.Today)
                                    imageKey = "Day_Wipe_Global_Past";  // ⛔ Уже прошёл
                                else
                                    imageKey = "Day_Wipe_Global";       // ✅ Будущий
                            }

                            else
                            {
                                imageKey = "Day_Wipe_Normal";
                            }
                        }
                        else if (thisDate.Date == DateTime.Today)
                        {
                            imageKey = "Day_Today";
                        }
                        else
                        {
                            imageKey = isWeekend ? "Day_Current_Weekend" : "Day_Current_Normal";
                        }
                    }


                    string bgImageId = imageUI.GetImage(imageKey);
                    if (string.IsNullOrEmpty(bgImageId))
                    {
                        cell++;
                        continue;
                    }

                    container.Add(new CuiElement
                    {
                        Name = panelName,
                        Parent = parent,
                        Components =
                        {
                            new CuiRawImageComponent
                            {
                                Png = bgImageId,
                                Sprite = "assets/content/textures/generic/fulltransparent.tga",
                                Color = "1 1 1 1"
                            },
                            new CuiRectTransformComponent
                            {
                                AnchorMin = anchorMin,
                                AnchorMax = anchorMax
                            }
                        }
                    });

                    container.Add(new CuiLabel
                    {
                        RectTransform = { AnchorMin = "0 0", AnchorMax = "1 1" },
                        Text = {
                            Text = text,
                            Align = TextAnchor.MiddleCenter,
                            FontSize = 14,
                            Color = textColor
                        }
                    }, panelName);

                    if (isCurrentMonth && new[] { 1, 8, 15, 22, 29 }.Contains(dayNum))
                    {
                        container.Add(new CuiLabel
                        {
                            RectTransform = { AnchorMin = "0.65 0.6", AnchorMax = "0.95 0.9" },
                            Text = {
                                Text = "",
                                Align = TextAnchor.MiddleCenter,
                                FontSize = 16,
                                Color = "1 1 0 1"
                            }
                        }, panelName);
                    }

                    cell++;
                }
            }
        }

        private string GetMonthlyFirstWipeType(int year, int month)
        {
            DateTime now = NowInKiev();
            DateTime inputDate = new DateTime(year, month, 1);

            // если дата раньше 2023 года — остановим рекурсию
            if (inputDate.Year < 2023)
                return "global"; // или другой дефолт

            if (year == now.Year && month == now.Month)
            {
                string type = configData?.FirstWipeType?.ToLower();
                if (string.IsNullOrEmpty(type) || (type != "global" && type != "normal"))
                    return "global";
                return type;
            }

            DateTime prevMonth = inputDate.AddMonths(-1);
            string prevType = GetMonthlyFirstWipeType(prevMonth.Year, prevMonth.Month);
            return prevType == "global" ? "normal" : "global";
        }


        private DateTime NowInKiev()
        {
            try
            {
                var kievTimeZone = TimeZoneInfo.FindSystemTimeZoneById("FLE Standard Time");
                return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, kievTimeZone);
            }
            catch
            {
                return DateTime.UtcNow.AddHours(3); // fallback
            }
        }




        private string GetMonthlyFirstWipeType_Static(int year, int month)
        {
            DayOfWeek wipeDay = configData.WipeDay;
            int index = 0;

            for (int d = 1; d <= DateTime.DaysInMonth(year, month); d++)
            {
                if (new DateTime(year, month, d).DayOfWeek == wipeDay)
                {
                    index++;
                    return (index % 2 == 1) == (configData.FirstWipeType.ToLower() == "global") ? "global" : "normal";
                }
            }

            return null;
        }

        private DateTime GetNextGlobalWipeDate()
        {
            DateTime now = NowInKiev();
            int year = now.Year;
            int month = now.Month;
            DayOfWeek wipeDay = configData.WipeDay;

            // Сначала получаем все вайпы в текущем месяце
            List<DateTime> wipes = GetAllWipesForMonth(year, month, wipeDay);
            string firstWipeType = GetMonthlyFirstWipeType(year, month);

            int index = 0;
            foreach (var date in wipes)
            {
                index++;
                bool isGlobal = (index % 2 == 1) == (firstWipeType == "global");

                if (isGlobal && date > now)
                    return date;
            }

            // Если в этом месяце больше нет глобальных — смотрим следующий месяц
            DateTime nextMonth = new DateTime(year, month, 1).AddMonths(1);
            wipes = GetAllWipesForMonth(nextMonth.Year, nextMonth.Month, wipeDay);
            string nextType = GetMonthlyFirstWipeType(nextMonth.Year, nextMonth.Month);

            index = 0;
            foreach (var date in wipes)
            {
                index++;
                bool isGlobal = (index % 2 == 1) == (nextType == "global");
        
                if (isGlobal)
                    return date;
            }

            // fallback
            return now.AddDays(30);
        }

        private List<DateTime> GetAllWipesForMonth(int year, int month, DayOfWeek wipeDay)
        {
            List<DateTime> dates = new List<DateTime>();
            DateTime day = new DateTime(year, month, 1);
            while (day.Month == month)
            {
                if (day.DayOfWeek == wipeDay)
                    dates.Add(day);
                day = day.AddDays(1);
            }
            return dates;

        }


        private DateTime GetFirstWipeDate(int year, int month, DayOfWeek wipeDay)
        {
            DateTime day = new DateTime(year, month, 1);
            while (day.DayOfWeek != wipeDay)
                day = day.AddDays(1);
            return day;
        }



        private DateTime GetLastGlobalWipeDate()
        {
            DateTime now = NowInKiev();

            DayOfWeek wipeDay = configData.WipeDay;
            string firstWipeType = GetMonthlyFirstWipeType(now.Year, now.Month);
            DateTime? lastWipe = null;

            // Перевіряємо поточний місяць
            for (int d = now.Day - 1; d >= 1; d--)
            {
                DateTime date = new DateTime(now.Year, now.Month, d);
                if (date.DayOfWeek != wipeDay) continue;

                int index = 0;
                for (int i = 1; i <= d; i++)
                    if (new DateTime(now.Year, now.Month, i).DayOfWeek == wipeDay)
                        index++;

                bool isGlobal = (index % 2 == 1) == (firstWipeType == "global");
                if (isGlobal)
                {
                    lastWipe = date;
                    break;
                }
            }


            // Якщо не знайдено — беремо з попереднього місяця
            if (lastWipe == null)
            {
                DateTime prevMonth = new DateTime(now.Year, now.Month, 1).AddMonths(-1);
                string prevType = GetMonthlyFirstWipeType(prevMonth.Year, prevMonth.Month);

                for (int d = DateTime.DaysInMonth(prevMonth.Year, prevMonth.Month); d >= 1; d--)
                {
                    DateTime date = new DateTime(prevMonth.Year, prevMonth.Month, d);
                    if (date.DayOfWeek != wipeDay) continue;

                    int index = 0;
                    for (int i = 1; i <= d; i++)
                        if (new DateTime(prevMonth.Year, prevMonth.Month, i).DayOfWeek == wipeDay)
                            index++;

                    bool isGlobal = (index % 2 == 1) == (prevType == "global");
                    if (isGlobal)
                    {
                        lastWipe = date;
                        break;
                    }
                }
            }

            // Повертаємо з часом 17:00
            return lastWipe?.Date.AddHours(17) ?? DateTime.Now;
        }
        #endregion

        #region ImageUI

        // Встроенный класс ImageUI
        private class ImageUI
        {
            private const string PathFolder = "MBSystem/MBCalendar/Images/";
            private readonly Dictionary<string, ImageData> _images = new()
            {
                { "MBWelcome_Two_Os", new ImageData() },
                { "Day_Current_Normal", new ImageData() },
                { "Day_Current_Weekend", new ImageData() },
                { "Day_Prev_Normal", new ImageData() },
                { "Day_Prev_Weekend", new ImageData() },
                { "Day_Today", new ImageData() },
                { "Day_Wipe_Normal", new ImageData() },
                { "Day_Wipe_Global", new ImageData() },
                { "Day_Wipe_Today_Global", new ImageData() },
                { "Day_Wipe_Today_Normal", new ImageData() },
                { "Day_Wipe_Global_Past", new ImageData() }
            };

            private enum ImageStatus { NotLoaded, Loaded, Failed }

            private class ImageData
            {
                public ImageStatus Status = ImageStatus.NotLoaded;
                public string Id { get; set; }
            }

            public string GetImage(string name)
            {
                if (_images.TryGetValue(name, out var image) && image.Status == ImageStatus.Loaded)
                    return image.Id;
                return null;
            }

            public void DownloadImages()
            {
                string fullPath = Interface.Oxide.DataDirectory + System.IO.Path.DirectorySeparatorChar + PathFolder;
                if (!System.IO.Directory.Exists(fullPath))
                {
                    System.IO.Directory.CreateDirectory(fullPath);
                    Interface.Oxide.LogInfo($"[MBCalendar] Создана папка: {fullPath}");
                }

                var nextImage = _images.FirstOrDefault(img => img.Value.Status == ImageStatus.NotLoaded);
                if (!string.IsNullOrEmpty(nextImage.Key))
                    ServerMgr.Instance.StartCoroutine(LoadImage(nextImage));
                else
                    Interface.Oxide.LogInfo("[MBCalendar] Все изображения загружены!");
            }

            private IEnumerator LoadImage(KeyValuePair<string, ImageData> image)
            {
                string filePath = "file://" + Interface.Oxide.DataDirectory + System.IO.Path.DirectorySeparatorChar + PathFolder + image.Key + ".png";
                using (var www = UnityEngine.Networking.UnityWebRequestTexture.GetTexture(filePath))
                {
                    yield return www.SendWebRequest();

                    if (www.result != UnityEngine.Networking.UnityWebRequest.Result.Success)
                    {
                        image.Value.Status = ImageStatus.Failed;
                        Interface.Oxide.LogWarning($"[MBCalendar] Ошибка загрузки {image.Key}");
                    }
                    else
                    {
                        Texture2D texture = UnityEngine.Networking.DownloadHandlerTexture.GetContent(www);
                        image.Value.Id = FileStorage.server.Store(texture.EncodeToPNG(), FileStorage.Type.png, CommunityEntity.ServerInstance.net.ID).ToString();
                        image.Value.Status = ImageStatus.Loaded;
                        UnityEngine.Object.DestroyImmediate(texture);
                    }

                    DownloadImages(); // Попытка загрузить следующую
                }
            }

            public void UnloadImages()
            {
                foreach (var img in _images)
                {
                    if (img.Value.Status == ImageStatus.Loaded && img.Value.Id != null)
                        FileStorage.server.Remove(uint.Parse(img.Value.Id), FileStorage.Type.png, CommunityEntity.ServerInstance.net.ID);
                }
                _images.Clear();
            }
        }

        #endregion

        #region lang
        protected override void LoadDefaultMessages()
        {
            lang.RegisterMessages(new Dictionary<string, string>
            {
                ["MB_Close_Calendar"] = "Click on an empty space to close the menu",
                ["MB_Calendar_Player"] = "WIPE SCHEDULE",
                ["MB_Calendar_Player_2"] = "<color=#FFD700>Don't miss</color> the wipe and dominate!",
                ["Day_Mon"] = "Mon",
                ["Day_Tue"] = "Tue",
                ["Day_Wed"] = "Wed",
                ["Day_Thu"] = "Thu",
                ["Day_Fri"] = "Fri",
                ["Day_Sat"] = "Sat",
                ["Day_Sun"] = "Sun",
                ["MB_Next_Global_Wipe"] = "Next global wipe will happen on",
                ["MB_GlobalWipeAgo"] = "Last global wipe was {0}d {1}h {2}m ago",
                ["MB_At_1700"] = "at 17:00",
                ["MB_Back"] = "Back",



            }, this);

            lang.RegisterMessages(new Dictionary<string, string>
            {
                ["MB_Close_Calendar"] = "Натисніть на порожнє місце, щоб закрити меню",
                ["MB_Calendar_Player"] = "ГРАФІК ВАЙПІВ",
                ["MB_Calendar_Player_2"] = "<color=#FFD700>Не пропусти</color> вайп і домінуй!",
                ["Day_Mon"] = "Пн",
                ["Day_Tue"] = "Вт",
                ["Day_Wed"] = "Ср",
                ["Day_Thu"] = "Чт",
                ["Day_Fri"] = "Пт",
                ["Day_Sat"] = "Сб",
                ["Day_Sun"] = "Нд",
                ["MB_Next_Global_Wipe"] = "Наступний глобал вайп відбудеться",
                ["MB_GlobalWipeAgo"] = "Відбувся глобал вайп {0} дн {1} год {2} хв тому",
                ["MB_At_1700"] = "в 17:00",
                ["MB_Back"] = "Назад",


            }, this, "uk");
            
            lang.RegisterMessages(new Dictionary<string, string>
            {
                ["MB_Close_Calendar"] = "Нажмите на пустое место, чтобы закрыть меню",
                ["MB_Calendar_Player"] = "ГРАФИК ВАЙПОВ",
                ["MB_Calendar_Player_2"] = "<color=#FFD700>Не пропусти</color> вайп и доминируй!",
                ["Day_Mon"] = "Пн",
                ["Day_Tue"] = "Вт",
                ["Day_Wed"] = "Ср",
                ["Day_Thu"] = "Чт",
                ["Day_Fri"] = "Пт",
                ["Day_Sat"] = "Сб",
                ["Day_Sun"] = "Вс",
                ["MB_Next_Global_Wipe"] = "Следующий глобальный вайп произойдет",
                ["MB_GlobalWipeAgo"] = "Глобальный вайп был {0} дн {1} ч {2} мин назад",
                ["MB_At_1700"] = "в 17:00",
                ["MB_Back"] = "Назад"
            }, this, "ru");

        }
        private string Msg(string key, string userid = null, params object[] obj)
        {
            return string.Format(lang.GetMessage(key, this, userid), obj);
        }
        #endregion
    }
}

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