The new version seemed to break certain itemsFixed

Had a stressful few hours trying to work all this out :D

I updated the plugin and did a restart (and kept the same config), but while certain pickups did still work (metal, stone etc), all food and hemp stopped working (they were just stock).

My config originally was:

"PickupResourceModifiers": {
"*": 2.0,
"Sulfur Ore": 1.0,
"Diesel Fuel": 1.0
},

But I tried specifying cloth specifically to test:

"PickupResourceModifiers": {
"*": 2.0,
"Sulfur Ore": 1.0,
"Diesel Fuel": 1.0,
"Cloth": 2.0
},

But it made no difference. I rolled back to the previous version and it all instantly worked again.

so you restarted.. does that mean you you have the newest oxide version? I'm still at 2.0.5619 and did notice it ignored my 'seed' setting, everything seems normal expect when you pick hemp (or food that comes with seeds) it also multiplies the seeds, seeds should only be 1x, I assume the new loop added needs reevaluated

Oh, I think you've added GatherResourceModifiers instead of PickupResourceModifiers in the OnCollectiblePickup hook?


(but yep I'm on oxide 2.0.5625)

for me the first if never triggers, it always ends up on the 'else if' (2) even tho "Pumpkin Seed": 1.0,

[Aug 06 2022 02:40:06] - [Oxide] 02:40 [Info] [Gathering Manager] Pumpkin
[Aug 06 2022 02:40:06] - [Oxide] 02:40 [Info] [Gathering Manager] 2: 10
[Aug 06 2022 02:40:06] - [Oxide] 02:40 [Info] [Gathering Manager] Pumpkin Seed
[Aug 06 2022 02:40:06] - [Oxide] 02:40 [Info] [Gathering Manager] 2: 10                                               

        private void OnCollectiblePickup(CollectibleEntity collectible, BasePlayer player)
        {
            foreach (ItemAmount item in collectible.itemList)
            {
                float modifier; 
					Puts($"{item.itemDef.displayName.english}");
                if (GatherResourceModifiers.TryGetValue(item.itemDef.displayName.english, out modifier))
                {
					Puts($"1: {modifier}");
                    item.amount = (int)(item.amount * modifier);
                }
                else if (GatherResourceModifiers.TryGetValue("*", out modifier))
                {
					Puts($"2: {modifier}");
                    item.amount = (int)(item.amount * modifier);
                }
            }
        }


Merged post

you're right, misstype somehow in the new update that first if should be
if (PickupResourceModifiers.TryGetValue(item.itemDef.displayName.english, out modifier))​


@wulf

Which line is the mistype on @Wulf?

Edit - Dont worry I found it. Its Line 564.

I think the GitHub AI wrote that and I didn't notice it changed it haha. I'll get an update out with it, thanks.

Thanks Wulf 👍

Can confirm. Even on latest version I'm also experiencing vanilla rated pickups. Metal/Stone/Sulfur pickups seem fine, but others like cloth aren't affected regardless of the value they're set at. 

+1 to what Lone said. Have latest, 2.2.78, and musrooms/seeds/hemp/etc are vanilla even though all modifiers set to 2.0

TheCodeHouse

+1 to what Lone said. Have latest, 2.2.78, and musrooms/seeds/hemp/etc are vanilla even though all modifiers set to 2.0

Lone was using an outdated version of Oxide, by at least 4 versions.

Was just coming back in here to say we just discovered that same thing on our server.  Updated oxide and all is right with the world again. Apologies for the distraction.