Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: on_entity_cloned event
  • Loading branch information
KoharaKazuya committed Dec 19, 2020
1 parent ae46076 commit 859b57d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion changelog.txt
Expand Up @@ -2,7 +2,7 @@
Version: 1.2.0
Date: 2020.12.12
Features:
- More mods compatibility. Battery Locomotive has come to handle `script_raised_built` and `script_raised_destroy` events.
- More mods compatibility. Battery Locomotive has come to handle `script_raised_built`, `script_raised_destroy` and `on_entity_cloned` events.
Bugfixes:
- Fixed a bug that caused a crash when an invalid BatteryLocomotive receiver entity was created for some reason.
Modding:
Expand Down
4 changes: 2 additions & 2 deletions control.lua
Expand Up @@ -68,9 +68,9 @@ end)

script.on_event({
defines.events.on_built_entity, defines.events.on_robot_built_entity,
defines.events.script_raised_built
defines.events.script_raised_built, defines.events.on_entity_cloned
}, function(event)
local entity = event.created_entity or event.entity
local entity = event.created_entity or event.entity or event.destination
create_receiver(entity)
end)

Expand Down

0 comments on commit 859b57d

Please sign in to comment.