Page 1 of 1

number of crafts in on_pre_player_crafted_item event

Posted: Tue Nov 17, 2020 4:32 pm
by seky16
Hello,
I'd like to monitor player's handcrafting, but I hit an API limitation.

on_pre_player_crafted_item gets fired once no matter whether player crafts 1, 5 or all items. Knowing this would be very helpful.

Same thing is already built into on_player_cancelled_crafting, called cancel_count. Although when player cancels all (shift+click) cancel_count always equals 65535. I understand why this number (maximal value of unsigned int16), but both cancel_count and my proposed addition could contain exact number that get’s queued/canceled.

Re: number of crafts in on_pre_player_crafted_item event

Posted: Tue Nov 17, 2020 10:01 pm
by Rseding91
Ok, I've done both.

Changed on_player_cancelled_crafting 'cancel_count' to report the exact number of crafts cancelled.
Added 'queued_count' to on_pre_player_crafted_item.

Re: number of crafts in on_pre_player_crafted_item event

Posted: Tue Nov 17, 2020 11:24 pm
by seky16
Thanks for such a quick response. Awesome as always