Page 1 of 1

[2.0.23] Items doesn't trigger spoil effect if spoiled during crafting

Posted: Tue Dec 03, 2024 8:00 am
by RockPaperKatana
If an item with spoilable results is spoiled before crafting finishes, its trigger effect won't trigger.

How to reproduce:
1. Add a mod with following code in data.lua:

Code: Select all

data.raw.item["captive-biter-spawner"].spoil_ticks = 1
data.raw.capsule["jelly"].spoil_ticks = 1
2. Build a infinity chest test setup with the recipe crafting those two items, and observe:
No biter is spawned from the captive biter spawner recipe, and nothing is outputted.
Jellynut processing outputs spoilage.
12-03-2024, 16-00-00.png
12-03-2024, 16-00-00.png (385.25 KiB) Viewed 215 times
What should happen:
Biter captive spawner recipe should instantly generate a behemoth biter.
Or alternatively:
Spoil trigger only activates when it appears in the output slot.

Re: [2.0.23] Items doesn't trigger spoil effect if spoiled during crafting

Posted: Tue Dec 03, 2024 8:04 am
by RockPaperKatana
test mod:
test_mod_0.1.0.zip
(1.53 KiB) Downloaded 6 times
test save:
test-platform.zip
(1.11 MiB) Downloaded 6 times

Re: [2.0.23] Items doesn't trigger spoil effect if spoiled during crafting

Posted: Tue Dec 03, 2024 8:15 am
by RockPaperKatana
I know this bug is somewhat obscure but a mod I'm making depends on the instant spoil trigger of an item, hope this can be fixed.

Re: [2.0.23] Items doesn't trigger spoil effect if spoiled during crafting

Posted: Tue Dec 03, 2024 4:27 pm
by Rseding91
Thanks for the report however I'm going to mark this one as "won't fix". If I do make this function, then it severely complicates crafting machines that run above 1 cycle/tick code wise and gets into performance concerns.