Skip to content

Commit

Permalink
Use new rewritten events lib
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Oct 19, 2024
1 parent dba01cf commit 04856e2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ local function render_text(drill, time_to_live)
}
end

local function add_seep(event)
py.on_event('on_built', function(event)
local drill = event.created_entity or event.entity
local drill_base = derrick_types[drill.name]
if not drill_base then return end
Expand Down Expand Up @@ -118,11 +118,7 @@ local function add_seep(event)
end
break
end
end
script.on_event(defines.events.on_built_entity, add_seep, event_filter)
script.on_event(defines.events.on_robot_built_entity, add_seep, event_filter)
script.on_event(defines.events.script_raised_revive, add_seep)
script.on_event(defines.events.script_raised_built, add_seep)
end)

-- Destroy hidden assembler when removing drill
local function remove_seep(assembler, source, source_id)
Expand Down

0 comments on commit 04856e2

Please sign in to comment.