on_player_cursor_stack_changed is not raised immediately

curiosity
Filter Inserter
Filter Inserter
Posts: 484
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

on_player_cursor_stack_changed is not raised immediately

Post by curiosity »

IDK when it is raised, but it should be pointed out in the docs that it's not immediately.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: on_player_cursor_stack_changed is not raised immediately

Post by Bilka »

Hey, it already says that it is raised in the current_tick (instead of instantly) here: https://lua-api.factorio.com/latest/cla ... ear_cursor

I see no other mention of that event in the docs, except for the event itself. Do you mean that it should be mentioned in the event description?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
curiosity
Filter Inserter
Filter Inserter
Posts: 484
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: on_player_cursor_stack_changed is not raised immediately

Post by curiosity »

Sorry, didn't notice that. Yes, it should be in the event description, since it's the property of the event and not merely how it was raised. You can operate on the stack directly to change it and that also raises the event (and isn't mentioned anywhere, AFAICT).
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: on_player_cursor_stack_changed is not raised immediately

Post by Bilka »

Okay, added for the next release (1.1.102).
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”