Page 1 of 1

[0.17.52] put_item not always followed by build_item

Posted: Thu Jun 27, 2019 9:13 pm
by Jelmergu
I noticed that a put_item event doesn't fire a build_item event if there is a put_item event in the very next gametick. I noticed while bugfixing my There is my ghost mod.

To reproduce:
- open attached save
- turn on There is my ghost and There is my ghost Blueprint only mode(ctrl+g, ctrl+shift+b by default)
- place an copper pipe on (23,92) and hold
- move between (23,92) and (23,93) quickly while holding the mousebutton
- see the copper UG pipe on (23,93) get brighter because of layered ghosts

Note: The version of There is my ghost that is attached logs the start and end of put_item and build_item including the event parameter of put_item(which shows that there are put items following eachother without build_items)

I realize this might be expected behavior, but it is not documented in put_item, which says that it will be called before a build_item event. This kinda implies that one put_item for every build_item

Re: [0.17.52] put_item not always followed by build_item

Posted: Thu Jun 27, 2019 9:58 pm
by Rseding91
Thanks for the report. That is correct behavior: put_item will always exist before build_item however build_item does not always follow a put_item. I can change the wording on the event but I don't know if that's even useful. Most events do not have this strict relationship defined in comments because even if a relationship exists there's most likely nothing actually making sure it stays working that way and is probably just "how it worked when the person made that comment".