1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00
RedMew/features/base_data.lua
Matthew c9369c3d14 Features cleanup (#414)
* Fix scoping, var names, unused functions, etc.

* Autoformat
2018-11-20 11:46:19 +01:00

14 lines
362 B
Lua

local Event = require 'utils.event'
if not global.score_biter_total_kills then
global.score_biter_total_kills = 0
end
local function biter_kill_counter(event)
if event.entity.force.name == 'enemy' then
global.score_biter_total_kills = global.score_biter_total_kills + 1
end
end
Event.add(defines.events.on_entity_died, biter_kill_counter)