Плагин Meteor Event 2.0.4

Ignored unexpected plugin compilation failure: MeteorEvent
Error while compiling MeteorEvent: The type or namespace name 'CarbonAliases' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) | Line: 17, Pos: 17
 
Ignored unexpected plugin compilation failure: MeteorEvent
Error while compiling MeteorEvent: The type or namespace name 'CarbonAliases' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) | Line: 17, Pos: 17
Зависимости карбона нет! Сейчас у себя толкну, я вроде все обновил=)
 
SAMEONE обновил(а) ресурс Meteor Event новой записью:

FIX

  • Исправлено неправильное выкупание бонусных предметов.
  • Исправлено сообщение о помощи для администраторов.
  • Удалено оставшееся отладочное сообщение.
For eng users
  • Fixed bonus items not redeemed correctly.
  • Fixed help message for admins.
  • Removed leftover debug message.

Узнать больше об этом обновлении...
 
на данный момент не в рабочем стостоянии


Код:
Oxide.Ext.CarbonAliases is referenced by MeteorEvent plugin but is not loaded
22:21:02
[CSharp] Started Oxide.Compiler v1.0.26.0 successfully
22:21:06
Ignored unexpected plugin compilation failure: MeteorEvent
22:21:06
Error while compiling MeteorEvent: The type or namespace name 'CarbonAliases' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) | Line: 17, Pos: 17
 
на данный момент не в рабочем стостоянии


Код:
Oxide.Ext.CarbonAliases is referenced by MeteorEvent plugin but is not loaded
22:21:02
[CSharp] Started Oxide.Compiler v1.0.26.0 successfully
22:21:06
Ignored unexpected plugin compilation failure: MeteorEvent
22:21:06
Error while compiling MeteorEvent: The type or namespace name 'CarbonAliases' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) | Line: 17, Pos: 17
Он в рабочем состоянии, у тебя отсутствуют длл, о чем и написано в ошибке.
 
Паходу на главной странице плагина "обзор" по леыолту не та его версия скачивается , еб я абобус....
 
не чет не то даже если закоментить строки
#if CARBON - все что с ним связанно

Error while compiling MeteorEvent: Preprocessor directive expected | Line: 13, Pos: 2

то что он ругается на коменты это конечно мощно
 
вырезал весь "интересный форк"


Error while compiling MeteorEvent: The type or namespace name 'CUI' could not be found (are you missing a using directive or an assembly reference?) | Line: 1211, Pos: 41

что прикольно но там ведь он есть
using Oxide.Game.Rust.Cui;

"компилятор не может найти тип или пространство имён CUI в вашем коде. "
 
"Error while compiling MeteorEvent: The type or namespace name 'CarbonAliases' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) | Line: 17, Pos: 17"
 
Привет,

Я хочу поговорить о нашем плагине MeteorEvent. Я обнаружил, что в нем есть зависимость от Carbon, что представляет проблему для нашего проекта. Я планирую запускать этот плагин на хостинге, который не поддерживает расширение Carbon. Это означает, что я не смогу использовать наш плагин в текущем виде.

Я понимаю, что Carbon может быть полезным для некоторых проектов, но для нашего конкретного случая он не является необходимым и представляет ограничение в использовании плагина. Я хотел бы предложить нам удалить зависимость от Carbon, чтобы плагин стал доступен для использования на различных хостингах.

Пожалуйста, обратите внимание на это и рассмотрите возможность удаления зависимости от Carbon из нашего плагина. Если необходимо, я готов обсудить альтернативные решения или помочь внести соответствующие изменения в коде.

Спасибо за внимание к этому вопросу. Буду ждать вашего ответа и готов обсудить дальнейшие шаги.
 
Oxide.Ext.CarbonAliases is referenced by MeteorEvent plugin but is not loaded
[CSharp] Started Oxide.Compiler v1.0.28.0 successfully
Ignored unexpected plugin compilation failure: MeteorEvent
Error while compiling MeteorEvent: The type or namespace name 'CarbonAliases' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) | Line: 17, Pos: 17
 
для корректной работы новой версии требуется поставить ,

Put this extension in /RustDedicated_Data/Managed/ folder.

Plugins that use CarbonAliases:


https://lone.design/product/carbon-aliases/

на хостинге выглядит так :

1715424583539.png


P.s
Возможно стоит поправить описание данного плагина и добавить что он теперь зависим от другой библиотеки

Исходя из вашего кода, кажется, что вы используете условную компиляцию для выбора между пространством имен Carbon и Oxide.Ext.CarbonAliases. Если символ CARBON не определен, то компилятор выберет ветвь с пространством имен Oxide.Ext.CarbonAliases, что приводит к ошибке в вашем случае, потому что у вас нет этого пространства имен


но даже если мы поставим
using Oxide.Ext.CarbonAliases; возникают различные ошибки компиляции

итого :
поправить способ включения или исключения импортов
Код:
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using UnityEngine;
using VLB;
using Network;
using Oxide.Core;
using Oxide.Core.Libraries;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using System.Linq;
using UnityEngine.UI;

#if !CARBON
    using Oxide.Ext.CarbonAliases;
    using System.Reflection;
#endif

блок private void UpdateDisplay(BasePlayer player, string oldKey)

Код:
private void UpdateDisplay(BasePlayer player, string oldKey)
        {
            using CUI cui = new CUI(CuiHandler);
            CUI.Handler.UpdatePool elements = cui.UpdatePool();
            string currEvent = cachedSelectedEvent[player.userID];
            //Event Button - New Selected
            elements.Add(cui.UpdateProtectedButton($"MeteorEventUI_eventButton_{currEvent}", BetterColors.GreenBackgroundTransparent, BetterColors.Transparent, "", 1, command: ""));
            //Event Button Text - New Selected
            elements.Add(cui.UpdateText($"MeteorEventUI_eventButton_{currEvent}_text", BetterColors.GreenText, Lang($"EventName_{currEvent}", player.UserIDString), 11, align: TextAnchor.MiddleLeft));
            //Event Button - Old Selected
            elements.Add(cui.UpdateProtectedButton($"MeteorEventUI_eventButton_{oldKey}", BetterColors.Transparent, BetterColors.Transparent, "", 1, command: $"UI_MeteorEvent switch {oldKey}"));
            //Event Button Text - Old Selected
            elements.Add(cui.UpdateText($"MeteorEventUI_eventButton_{oldKey}_text", BetterColors.LightGray, Lang($"EventName_{oldKey}", player.UserIDString), 11, align: TextAnchor.MiddleLeft));
            //Event Name
            elements.Add(cui.UpdateText("MeteorEventUI_eventName", BetterColors.LightGray, Lang($"EventName_{currEvent}", player.UserIDString), 16, align: TextAnchor.MiddleLeft, font: CUI.Handler.FontTypes.RobotoCondensedBold));
            //Event Description
            elements.Add(cui.UpdateText("MeteorEventUI_eventDescription", BetterColors.LightGrayTransparent73, Lang($"EventDescription_{currEvent}", player.UserIDString), 8, align: TextAnchor.UpperLeft));
            MeteorConfig configValue = config.profiles[currEvent];
            //Cooldown Amount
            elements.Add(cui.UpdateText("MeteorEventUI_cooldownAmount", BetterColors.LightGrayTransparent73, FormatTime(configValue.purchaseConfig.showerCooldown), 10));
            //Meteor Amount Text
            elements.Add(cui.UpdateText("MeteorEventUI_meteorAmount", BetterColors.LightGrayTransparent73, configValue.purchaseConfig.showerMeteorAmount.ToString(), 10));
            bool hasRequiredItem;
            if (configValue.purchaseConfig.requiredShortname == "")
                hasRequiredItem = HaveCurrency(player, configValue.purchaseConfig.economyPlugin, configValue.purchaseConfig.economyCurrency) >= configValue.purchaseConfig.showerItemAmount;
            else
            {
                int itemAmount = 0;
                foreach (var item in player.inventory.AllItems())
                    if (item.info.shortname == configValue.purchaseConfig.requiredShortname && item.skin == configValue.purchaseConfig.requiredSkin)
                        itemAmount += item.amount;
                hasRequiredItem = itemAmount >= configValue.purchaseConfig.showerItemAmount;
            }
            string textColor = hasRequiredItem ? BetterColors.LightGrayTransparent73 : BetterColors.RedText;
            //Requirement Text
            elements.Add(cui.UpdateText("MeteorEventUI_requirementsText", textColor, Lang($"ItemRequirement_{currEvent}", player.UserIDString, configValue.purchaseConfig.showerItemAmount), 12, align: TextAnchor.MiddleLeft));
            if (permission.UserHasPermission(player.UserIDString, "meteorevent.admin"))
            {
                //Admin Spawn Input
                var inputField = cui.UpdateProtectedInputField("MeteorEventUI_adminSetInput", BetterColors.RedText, "0", 15, 3, false, align: TextAnchor.MiddleCenter, font: CUI.Handler.FontTypes.RobotoCondensedBold, command: $"UI_MeteorEvent forceStart {currEvent}", lineType: InputField.LineType.MultiLineSubmit);
                elements.Add(inputField);
            }
            bool onCooldown = cooldowns.ContainsKey(player.userID) && cooldowns[player.userID].ContainsKey(currEvent);
            string bottomText;
            if (!hasRequiredItem)
                bottomText = Lang("NoRequiredItems", player.UserIDString);
            else if (onCooldown)
                bottomText = Lang("EventOnCooldown", player.UserIDString, FormatTime(cooldowns[player.userID][currEvent]));
            else
                bottomText = Lang("CanStartEventInfo", player.UserIDString);
            bool locked = !hasRequiredItem || onCooldown;
            string buttonColor = locked ? BetterColors.RedBackgroundTransparent : BetterColors.GreenBackgroundTransparent;
            string buttonTextColor = locked ? BetterColors.RedText : BetterColors.GreenText;
            string buttonTextText = locked ? Lang("EventLocked", player.UserIDString) : Lang("RunEvent", player.UserIDString);
            string command = locked ? "" : $"UI_MeteorEvent start {currEvent}";
            //Info Text
            elements.Add(cui.UpdateText("MeteorEventUI_bottomInfoText", BetterColors.LightGrayTransparent73, bottomText, 7, align: TextAnchor.MiddleLeft, font: CUI.Handler.FontTypes.RobotoCondensedBold));
            //Run Button
            elements.Add(cui.UpdateProtectedButton("MeteorEventUI_runButton", buttonColor, BetterColors.Transparent, "", 15, command: command));
            elements.Add(cui.UpdateText("MeteorEventUI_runButtonText", buttonTextColor, buttonTextText, 15, font: CUI.Handler.FontTypes.RobotoCondensedBold));
            elements.Send(player);
        }

отписать в патчноут :


Изменения:

  • Исправлена ошибка компиляции, связанная с использованием InputField.
  • Удален параметр charLimit из вызова метода UpdateProtectedInputField, так как он не существует в его сигнатуре.
  • Использование директивы препроцессора #if CARBON заменено на условные операторы в коде для включения или исключения импортов в зависимости от условий.
  • Все изменения в коде были адаптированы для лучшей читаемости и поддерживаемости.
Пожалуйста, протестируйте обновленный код в вашем проекте, и если у вас есть какие-либо вопросы или дополнения, не стесняйтесь сообщить.
 
Активность
Пока никто не печатает сообщение