[2.0.72] Item spoil_to_trigger_result does not consistently fire in assembling machines for fast spoiling items

Bugs that are actually features.
raspberrypuppies
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue Mar 26, 2019 4:43 am
Contact:

[2.0.72] Item spoil_to_trigger_result does not consistently fire in assembling machines for fast spoiling items

Post by raspberrypuppies »

I found that item prototype's spoil_to_trigger_result does not consistently fire in assembling machines when spoil_ticks is < 60, but it always fires when the player crafts it. The really weird thing is that the spoil_ticks threshold varies seemingly at random. Through trial and error I found it stopped firing at 47 ticks in one mod, but it fired at 30 ticks in this bug report mod.

How to reproduce:
  1. Load the mod
  2. Craft a wooden chest as a player, it should log "on_script_trigger_effect..." to the game console
  3. Have an assembling machine craft a wooden chest, it should not log "on_script_trigger_effect..." to the game console
  4. Change the bug-report-spoil-ticks to > 60 (the default is 1 tick to hopefully guarantee that the bug triggers on the first try)
  5. Repeat the process with different numbers
Attachments
bug_report_spoil_trigger.zip
(1.67 KiB) Downloaded 7 times
GAME SAVE bug_report_spoil_trigger.zip
(1.05 MiB) Downloaded 6 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16414
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.72] Item spoil_to_trigger_result does not consistently fire in assembling machines for fast spoiling items

Post by Rseding91 »

Thanks for the report. This is intended; the trigger will not run if the item(s) spoil mid-craft and end up producing fully spoiled at the time the machine finishes crafting.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”