Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update3 #3

Merged
merged 1 commit into from
Feb 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion map_gen/maps/diggy/feature/alien_spawner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ local rocks_to_find = Template.diggy_rocks
local do_alien_mining = Token.register(function(params)
local surface = params.surface
local create_entity = surface.create_entity
local create_particle = surface.create_particle
local find_non_colliding_position = surface.find_non_colliding_position

local rocks = surface.find_entities_filtered({area = params.clear_area, name = rocks_to_find})
Expand All @@ -76,7 +77,7 @@ local do_alien_mining = Token.register(function(params)
for rock_index = rock_count, 1, -1 do
local rock = rocks[rock_index]
raise_event(defines.events.on_entity_died, {entity = rock})
destroy_rock(create_entity, particle_count, rock.position)
destroy_rock(create_particle, particle_count, rock.position)
rock.destroy()
end
end
Expand Down