Skip to content

Commit

Permalink
Merge pull request #1099 from Refactorio/crash-site-artillery-wagon-c…
Browse files Browse the repository at this point in the history
…hanges

Crash Site: Enemy combat robots now explode when they timeout
  • Loading branch information
Jayefuu authored Nov 5, 2020
2 parents 5a82550 + 64d78f5 commit 92373bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ local function do_bot_spawn(entity_name, entity, event)
end
end

-- Drops coins when biter/spitter spawners and worms are killed
local function do_coin_drop(entity_name, entity)
local position = entity.position
local bounds = entity_drop_amount[entity_name]
Expand Down Expand Up @@ -478,3 +479,17 @@ Event.add(
set_timeout_in_ticks(1, spawn_player, player)
end
)

Event.add(
defines.events.on_combat_robot_expired,
function(event)

local entity = event.robot
local position = entity.position
if entity.force.name == 'enemy' then
entity.surface.create_entity{name = "cluster-grenade", position=position, target=position, speed=1}
end

end
)

2 changes: 1 addition & 1 deletion map_gen/maps/crash_site/scenario.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'map_gen.maps.crash_site.blueprint_extractor'
require 'map_gen.maps.crash_site.entity_died_events'
require 'map_gen.maps.crash_site.events'
require 'map_gen.maps.crash_site.weapon_balance'

local b = require 'map_gen.shared.builders'
Expand Down

0 comments on commit 92373bc

Please sign in to comment.