1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-03 13:12:11 +02:00
This commit is contained in:
MewMew 2020-04-13 06:39:04 +02:00
parent 913d42d6d8
commit a78861f0ca

View File

@ -689,6 +689,7 @@ local function on_entity_damaged(event)
if event.cause.force.index == 2 then return end
if event.cause.name ~= "character" then return end
if event.damage_type.name ~= "physical" then return end
if not event.entity.valid then return end
if event.cause.get_inventory(defines.inventory.character_ammo)[event.cause.selected_gun_index].valid_for_read
and event.cause.get_inventory(defines.inventory.character_guns)[event.cause.selected_gun_index].valid_for_read then return end
if not event.cause.player then return end