Page 1 of 1

cancel_crafting works in unexpected ways

Posted: Tue Dec 16, 2025 4:01 pm
by galgtonold
Let's assume an item is added to the crafting queue that causes multiple items to appear in the crafting queue because the player doesn't have all the direct ingredients for it. For example after adding a solar-panel-equipment the crafting queue might look like this:
12-16-2025, 16-55-50.png
12-16-2025, 16-55-50.png (15.83 KiB) Viewed 155 times
Given the description of the documentation if I call
12-16-2025, 16-56-29.png
12-16-2025, 16-56-29.png (2.43 KiB) Viewed 155 times
I would expect one of the copper cables to be removed from the queue. What happens instead is that the entire queue gets cancelled because the "cancel_crafting" seems to look at the queue of composite items that were added through "begin_crafting" instead.

With other words it only considers items that are not a prerequisite to be cancelled. All other items would only indirectly be affected.

Many thanks!
12-16-2025, 16-53-43.png
12-16-2025, 16-53-43.png (41.05 KiB) Viewed 155 times

Re: cancel_crafting works in unexpected ways

Posted: Tue Dec 16, 2025 4:26 pm
by Rseding91
How it works:

When starting any given craft the game will also queue any required items to craft the original request. If one or more of those dependencies are cancelled then the original craft is updated to show the reduced total. If you ask for an iron chest and it needs 1 iron plate crafted, and you cancel the iron plate - the chest obviously can't be crafted. (just an example).

This is what "prerequisite" in the read data means: it is a prerequisite of a later crafting queue entry.

By removing one of the copper cables it's causing one of the electronic circuits to be cancelled which makes the total crafted insufficient for the solar panel which cancels that which cancels the entire queue because the solar panel is what caused all previous crafting entries to exist.

Re: cancel_crafting works in unexpected ways

Posted: Tue Dec 16, 2025 4:34 pm
by curiosity
And it works the same as the player manually cancelling. That's hardly unexpected.

Re: cancel_crafting works in unexpected ways

Posted: Wed Dec 17, 2025 4:50 pm
by galgtonold
Thanks for elaborating, that makes sense from a logical standpoint!

I guess I was thinking about it too naively, expecting it to behave like a list that you modify. :D