Page 1 of 1

BUG spoil_to_trigger_result not triggered

Posted: Wed Dec 18, 2024 6:32 am
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.

Re: BUG spoil_to_trigger_result not triggered

Posted: Wed Dec 18, 2024 12:19 pm
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.