BUG spoil_to_trigger_result not triggered

Bugs that are actually features.
plexpt
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Feb 07, 2022 2:32 am
Contact:

BUG spoil_to_trigger_result not triggered

Post by plexpt »

spoil_to_trigger_result not triggered
I wrote a spoil_to_trigger_result for an item.
code

Code: Select all

 spoil_to_trigger_result ={
    items_per_trigger = 1,
    trigger = {
        type = "direct",
        action_delivery = {
            type = "instant",
            source_effects = {
                {
                    type = "script",
                    effect_id = "myid",
                },
                {
                    type = "insert-item",
                    item = name,
                }
            }
        }
    }
}
It can be triggered normally when the item is in the player's inventory
When the item is in the result slot of the assembler, the event will not be triggered !!!
It is expected that the on_script_trigger_effect event will be triggered.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14891
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: BUG spoil_to_trigger_result not triggered

Post by Rseding91 »

Thanks for the report. It does trigger and run while in the result slot but it will not run *if triggered while crafting finishes*, this is by design as lua events and potential entity invalidation must not happen while crafting is finishing for a machine.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”