Page 1 of 1

RecipePrototype::single_use

Posted: Fri Feb 13, 2026 1:09 pm
by thesixthroc
Several times I have wanted to give the player a handcrafting recipe that they are only supposed to craft once. The recipe is disabled by script after they craft it (nowadays likely by a spoilage trigger), and a script processes the player's crafting queue to cancel any additional crafts of the one-off recipe.

What cannot currently be prevented is that such recipes will appear with a '41' in the lower-right corner of the Crafting window icon if the player has 41x the ingredients it needs.

As a fairly minimal proposal, RecipePrototype::single_craft could remove the small number and also prevent characters adding more than 1 of this recipe to their crafting queue. For non-character crafters I assume it has no effect.

Re: RecipePrototype::single_craft

Posted: Fri Feb 13, 2026 5:03 pm
by Osmo
You can cancel cancel crafts in progress to leave only one https://lua-api.factorio.com/latest/cla ... l_crafting

Re: RecipePrototype::single_craft

Posted: Fri Feb 13, 2026 6:04 pm
by thesixthroc
That is addressed in the OP.

Re: RecipePrototype::single_craft

Posted: Sat Feb 14, 2026 12:34 pm
by Osmo
thesixthroc wrote: Fri Feb 13, 2026 6:04 pm That is addressed in the OP.
I thought you meant 41 displaying in the crafting queue, nevermind