1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-09-16 09:16:22 +02:00

Added laser defense to list of items to remove from equip on force toggle #75

This commit is contained in:
Maik Wild
2017-09-30 18:19:41 +02:00
parent dc06a2dd0c
commit 7cf2001f3f

View File

@@ -29,8 +29,12 @@ local function on_player_deconstructed_area(event)
end
end
local init = true
local function on_player_mined_item(event)
if init then
game.forces.enemy.research_all_technologies() --avoids losing logstics slot configuration on force toggle
init = false
end
if event.entity.force.name ~= "enemy" and event.entity.force.name ~= "neutral" and event.entity.name ~= "entity-ghost" then
local entity_name = event.entity.name
if entity_name == "pipe-to-ground" then entity_name = "pipe" end