Ishadijcks / MooLite

Open source Milky Way Idle client
11 stars 4 forks source link

feat(ConsumableNotifierPlugin): Add new Consumable Notifier Plugin #79

Closed KevinLee3627 closed 1 year ago

KevinLee3627 commented 1 year ago

Closes #23

Hi, wanted to take a crack at #23. Only done it for drinks, but I'm hoping food will be a quick add if the drinks implementation seems good.

I was a bit confused about what should happen in this situation:

Is the current behavior expected, or should it only notify if the consumable is depleted for the current action in the action queue?

And one small note - the actual notification message is ugly at the moment - I wasn't sure what might be good but I figure it would be a simpler change to make if the meat of this PR looks ok.

Thanks for taking a look, let me know if there's stuff that needs fixing/changing.

Ishadijcks commented 1 year ago

I think this pull reques has some overlap with the just merged #72

KevinLee3627 commented 1 year ago

I think this pull reques has some overlap with the just merged #72

I took a look (and fixed the merge conflicts) - and I'm a little confused on where the overlap with #72 is. Should I be using getEquippedDrinks(), or integrating the new ItemLocationHrid/ItemLocationDetail somewhere?

Ishadijcks commented 1 year ago

I think these are the same

    private _actionTypeFoodSlotsMap: Record<ActionTypeHrid, CharacterConsumable[]> = {};

    _characterDrinks: Record<ActionTypeHrid, (CharacterConsumable | null)[]> = {};

But I like your naming better. Can you change it for food as well and clean up the old ones?

Side note: Can it really be null in the dictionary?

KevinLee3627 commented 1 year ago

Side note: Can it really be null in the dictionary?

image

Yes, if there's nothing in equipped

KevinLee3627 commented 1 year ago

Alright, applied the changes to handle food as well.

Ishadijcks commented 1 year ago

Currently it triggers when the item count reaches 0, at which point there are 300s left before it's actually "depleted". I like the current behavior better so let's keep it this way

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

Ishadijcks commented 1 year ago

@KevinLee3627 I'm adding you to the author section of this plugin, under what name would you like to be credited?

KevinLee3627 commented 1 year ago

@KevinLee3627 I'm adding you to the author section of this plugin, under what name would you like to be credited?

I'd prefer Granttank2 - thanks!

Ishadijcks commented 1 year ago

Done! #108