Jump to content

Bradley Drop/Heli Signals issue with Shop UI by David

Not a Bug 1.1.17

CoreSnap
CoreSnap

Posted

Below is the information I provided to David for his Shop UI plugin. This issue only occurs when using Shop, but he said there's nothing he can do, which obviously does nothing to help with solving the problem. Hopefully you're able to assist on this and maybe it's something with BradleyDrops/Heli Signals that you're able to find that's causing this issue within Shop UI. 

I also have Shop by Mevent and will try that tomorrow, as I'm unable to do any further testing today. I believe it's said below, but want to emphasize that this was working before I updated my server. I first updated to what is seen below. However, after the crash I saw that there was another new update, 17991047. I'm currently on this and nothing has changed. 

Thank you in advance for the assistance. Definitely don't mean to throw this on you, but hopefully it IS an issue with this that you can assist with since David is unable to. 

Let me know what else you need from me. 




++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hello,

I've been working on getting this fixed all morning, but can't find an answer or fix. 

I have Brad/Heli signals in the shop. Had them setup for months with no issue. When Server Update 17982604 was released and downloaded this morning, Brad and Heli signals stopped working when purchased from the shop. They work just fine when giving them thru native commands. I don't have anything else that is affected by the shop.

When throwing a Brad signal, console shows:

Failed to call internal hook 'OnExplosiveThrown' on plugin 'BradleyDrops v1.1.17' [1930466752] (The given key 'BradleyDropEasy' was not present in the dictionary.)
   at APCData System.Collections.Generic.Dictionary<string, Oxide.Plugins.BradleyDrops+APCData>.get_Item(string key)
   at void Oxide.Plugins.BradleyDrops.BradleySignalThrown(BasePlayer player, SupplySignal entity, Item signal) in C:/RustServer/FuturesWNT/carbon/plugins/BradleyDrops.cs:line 959
   at void Oxide.Plugins.BradleyDrops.OnExplosiveThrown(BasePlayer player, SupplySignal entity, ThrownWeapon item) in C:/RustServer/FuturesWNT/carbon/plugins/BradleyDrops.cs:line 372
   at object Oxide.Plugins.BradleyDrops.InternalCallHook(uint hook, object[] args) in BradleyDrops.cs/Internal:line 464

 

IN THE PLUGIN FILE:

line 959
var permSuffix = config.bradley.apcConfig[apcProfile].GiveItemCommand.ToLower();

line 372
BradleySignalThrown(player, entity, signal);

line 464
blank
            BradleyDrop bradComp = bradley.GetComponent<BradleyDrop>();
            if (bradComp == null)
                return null;

            if (bradComp.isDespawning)
            {
                info.damageTypes.ScaleAll(0);
                return true;
            }
<<<<<----- {THIS IS WHERE LINE 464 IS}
            var apcName = config.bradley.apcConfig[apcProfile].APCName;
            BasePlayer attacker = Initiator as BasePlayer;
            if (Initiator is BasePlayer)
            {
                attacker = Initiator as BasePlayer;
            }
            else if (Initiator is AutoTurret)

 

When throwing a Heli Signal, I simply get the chat notification "You don't have permission to use this heli signal".

 

Again, when not purchasing thru the shop and just giving the items thru "hsgive easy coresnap 1" or "bdgive easy coresnap 1", no errors occur.

I've downloaded new versions of each of those and this changed nothing.

I have so much configured thru Shop that I have yet to fully disassemble it and start fresh, but I kind of assume that's what you'll want me to do. I just wanted to be proactive and send this along to see if you might know what else may be causing this issue, or if I really need to just wipe the shop, input the items into shop and try from there.

Thanks!!



EDIT: I redownloaded Shop, installed it fresh, new config, manually input brad and heli signal info into new/fresh Item and Category files (no copy/pasting), and same issue occurred. 

Please let me know if you need anything further from me. Thank you!

ZEODE

Posted

The issue is how you are adding the items to your shop. You are using an incorrect name for the item. I would need to see your BradleyDrops config file and the relevant section of the config where you add the item to the shop, but this is what is happening. "BradleyDropEasy" is incorrect. By default my plugin loads a config which names each signal "Bradley Drop (Easy)", "Bradley Drop (Medium)", "Bradley Drop (Hard)" etc.

So unless you edited your config and renamed the profile to "BradleyDropEasy", then this is what is causing the issue.

Upload your Bradley Drops config files here for me and paste the relevant config portion where you add the drops to your shop plugin and I can help further.

CoreSnap

Posted

Hello,

I would like to stress again that this was literally working perfectly fine up until the updates I'd mentioned.

I have not edited the Bradley Drops config file regarding the names. I know those are important to remain as-is, but I've attached that file in case I did mess something up and didn't see/realize it.

In the Shop 'Items' config, this is how the Brad drop is specified:

  "supply.signal{1}": {
    "DisplayName": "BradleyDropMedium",
    "Skin": 2905355312,
    "Image": "",
    "DefaultAmount": 1,
    "BlockAmountChange": false,
    "ShowDisplayName": true,
    "BuyPrice": 300,
    "SellPrice": 25,
    "Currency": "eco"
  },

Again, was working before update. lol I stress that because in this instance, this 'display name' is just that...the skinID and item shortname that's being used is what Shop uses, at least to my understanding. In which this is how they're formatted in the 'Categories' config file within Shop:

  "Bradley/HeliSignals": {
    "Image": "https://rustplugins.net/products/shop/box.png",
    "Permission": "discord",
    "Sale": 0.0,
    "Items": [
      "supply.signal{0}",
      "supply.signal{1}",
      "supply.signal{2}",
      "supply.signal{3}",
      "supply.signal{4}",
      "supply.signal{5}",
      "supply.signal{6}",
      "supply.signal{7}",
      "supply.signal{8}",
      "supply.signal{9}",
      "supply.signal{10}",
      "supply.signal{11}",
      "supply.signal{12}",
      "supply.signal{13}",
      "supply.signal{14}",
      "supply.signal{15}",
      "supply.signal{16}",
      "supply.signal{17}",
      "supply.signal{18}",
      "supply.signal{19}"
    ]
  },

 

 

 

 

 

Literally as I'm writing this and testing stuff out, it all started working again. I didn't even restart my server since I created this ticket. Just removed all Shop files from server, placed Mevent's Shop on, added a brad signal and worked perfect. Removed all that, added David's shop back on, same exact configuration and now it works with no errors. 

Makes me feel back for wasting your time, but nothing was working at all last night. 

Welp, I guess we can close this out. 

BradleyDrops.json

ZEODE

Posted (edited)

Ok, I am unsure what was going on for you then. BUT, you are inputting the display names incorrectly and it is important for the plugins function. The display name for the signal item must be the same as the heli profile. So for easy heli signal, you should put the display name in the shop config as "Bradley Drop (Easy)" or "Bradley Drop (Medium)" etc, so it matches the Bradley Drops config.

The fact it works is because I added some check code which corrects incorrect display names from incorrectly adding to shop plugins 😉 However, I would recommend changing this and putting the correct display names so you don't have anymore issues in future. The same goes for Heli Signals.

Edited by ZEODE
  • Like 1
ZEODE

Posted

Changed Status from Pending to Not a Bug

1.7m

Downloads

Total number of downloads.

7.9k

Customers

Total customers served.

119.1k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.