plugin-hub icon indicating copy to clipboard operation
plugin-hub copied to clipboard

new bank-black-list plugin

Open spektrum1 opened this issue 1 year ago • 9 comments

This plugin allows you to blacklist certain items, causing a warning every time you leave them in your bank. Helpful for group ironmen forgetting to put their items back in the group storage.

spektrum1 avatar Apr 29 '24 12:04 spektrum1

New plugin bank-black-list: https://github.com/spektrum1/bank-black-list/tree/3a7903026531d62ddc502f25d0dd4ffed099a5e1

Don't use reflection

raiyni avatar Apr 29 '24 21:04 raiyni

Don't use reflection

Fair. Is there a preferred way to retrieve an ItemID from a name string? Looking around the existing plugins I can't seem to manage to find an example

spektrum1 avatar Apr 30 '24 00:04 spektrum1

Why do you need an itemid? Why not get the item name and see if it matches the input?

ItemManager is probably what you want to use. It can get you the name from the id.

geheur avatar Apr 30 '24 00:04 geheur

Why do you need an itemid? Why not get the item name and see if it matches the input?

ItemManager is probably what you want to use. It can get you the name from the id.

I was hoping to avoid doing a lookup for every bank item instead of just the items on the black list, but I made the change now. Thanks for the input

spektrum1 avatar Apr 30 '24 09:04 spektrum1

I think you are too worried about performance. Also, in the old version the reflective lookup was inside the double loop instead of in the config reading... so this new version is definitely faster XD.

geheur avatar Apr 30 '24 09:04 geheur

I think you are too worried about performance. Also, in the old version the reflective lookup was inside the double loop instead of in the config reading... so this new version is definitely faster XD.

True woops. Talking about it might as well optimise a little more

spektrum1 avatar Apr 30 '24 10:04 spektrum1

Can you change your config group? "Block List" on its own is not as specific as "Bank Block List", or something of the like--I'd rather this be more specific than less to avoid possible conflicts down the line. Code LGTM otherwise

Nightfirecat avatar May 14 '24 02:05 Nightfirecat

Done, thanks

spektrum1 avatar May 14 '24 09:05 spektrum1