Skip to content

Commit

Permalink
add support for Replicating Belts
Browse files Browse the repository at this point in the history
  • Loading branch information
mspielberg committed Nov 28, 2018
1 parent f60952b commit 987b05b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ function Editor:on_built_entity(event)
end
end

function Editor:script_raised_built(event)
local entity = event.created_entity
if entity and entity.name == "entity-ghost" then
super.on_built_entity(self, event)
end
end

function Editor:on_robot_built_entity(event)
local entity = event.created_entity
if not entity.valid then return end
Expand Down
4 changes: 4 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ local function on_load()
end

local event_handlers = {
script_raised_built = function(event)
editor:script_raised_built(event)
end,

on_built_entity = function(event)
editor:on_built_entity(event)
end,
Expand Down

0 comments on commit 987b05b

Please sign in to comment.