1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-11-29 22:47:52 +02:00

no friendly fire xp gain

This commit is contained in:
MewMew
2019-10-28 09:52:58 +01:00
parent d6e7d317e5
commit 8b858cee14

View File

@@ -556,9 +556,14 @@ local get_cause_player = {
local function on_entity_died(event)
if not event.entity.valid then return end
--Grant XP for hand placed land mines
--Grant XP for detonated land mines
if event.entity.last_user then
if event.entity.type == "land-mine" then
if event.entity.type == "land-mine" then
if event.cause then
if event.cause.valid then
if event.cause.force.index == event.entity.force.index then return end
end
end
gain_xp(event.entity.last_user, 1)
return
end