Closed Klonan closed 5 years ago
https://github.com/troelsbjerre/Bottleneck/blob/f6f19c1a35b29bd10421e0760d81007a7e3c18f4/control.lua#L168
Your event looks for created_entity.
created_entity
However the base game sends script raised revive with just entity: https://lua-api.factorio.com/latest/events.html#script_raised_revive
entity
Which causes your script to crash if someone calls entity.revive().
The fix is simple, change it to:
local entity = event.created_entity or event.entity
Thanks. Fixed, pushed, and released as 0.10.3
https://github.com/troelsbjerre/Bottleneck/blob/f6f19c1a35b29bd10421e0760d81007a7e3c18f4/control.lua#L168
Your event looks for
created_entity
.However the base game sends script raised revive with just
entity
: https://lua-api.factorio.com/latest/events.html#script_raised_reviveWhich causes your script to crash if someone calls entity.revive().
The fix is simple, change it to: