Weapons and Command Prompt BugFixed

Hello. Thanks a lot for your much appreciated work, this plugin is awesome! Love it!

1. Just noticed something when spawning weapons and stacking them. Weapons which are spawning with some ammo (pistol, lr-300, etc) are bugged. Not displaying that how many is actually stacked.

2. The command prompt error message is still on when admin would spawn more than 1 item with durability. (lanter, miners hat, water bottle, etc).

Any known methods to resolve these 2 please? Or any ideas, roughly when these would be fixed?

Thanks a lot, and again: love your work and passion, keep it up! :))
Phoenix

Failed to call hook 'CanStackItem' on plugin 'StackSizeController v3.1.4' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanStackItem (Item item, Item targetItem) [0x0020d] in <23f0cd4cc4d34ae5b35d99890045a0e0>:0 ts, 0 slprs                                                                             3kb/s in, 19kb/s out
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0073e] in <23f0cd4cc4d34ae5b35d99890045a0e0>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0​

P.S.: +1. Once you edit config file, reload plugin in oxide. Open oxide/data/StackSizeController.json

Example:

"ItemId": 722955039,
        "Shortname": "gun.water",
        "HasDurability": true,
        "VanillaStackSize": 5,
        "CustomStackSize": 0​

So it displays VanillaStackSize: 5 and CustomStackSize: 0. I have adjusted to 5 in the config file. So thats correct, but why does it say VanillaStockSize is 5 and custom is 0? Should be the opposite way, isnt it?

Thanks a lot!

CustomStackSize doesn't update in the data file. That's for people who want to modify the stack size of each individual item manually by going through the datafile. The stack size is being set though. Weapons don't spawn with ammo, and I can't make it show how many guns are in a stack. Rust wasn't built to support it. Thanks for issue #2, several others reported it but didn't bother to tell me how to reproduce it. I'm still not getting it, but I might have already unintentionally fixed it. Hopefully if it's still there, testers can reproduce before next release.

It's bugged currently as well (already fixed for next release though) but using itemsearch or listitemcategories will in the next version reflect the custom stack size, as the plugin would set it, which will help me help others debug as well.

At some point in the future, I might create a UI addition that shows stack amounts of items that don't show stack amounts, it'll look obviously different but I think players would find that absolutely invaluable. I would. Right now you have to check the default split amount and double it to know the stack amount for weapons.

Oh wow, man! You awesome, thanks a lot!!! Much-much appreciated! :)

Locked automatically