From aa1dcecdb3d622598632552ffb93ecb70f65da72 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Sat, 5 Aug 2017 09:56:09 -0400 Subject: [PATCH] Cleaning regrowth logic, anything player built is now off limits. --- control.lua | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/control.lua b/control.lua index fffdd51..0c8d28d 100755 --- a/control.lua +++ b/control.lua @@ -298,23 +298,11 @@ if ENABLE_REGROWTH then end) script.on_event(defines.events.on_built_entity, function (event) - if (event.created_entity.name == "straight-rail") then - OarcRegrowthOffLimits(event.created_entity.position, 1) - elseif (event.created_entity.name == "curved-rail") then - OarcRegrowthOffLimits(event.created_entity.position, 1) - else - OarcRegrowthOffLimits(event.created_entity.position, 1) - end + OarcRegrowthOffLimits(event.created_entity.position, 1) end) script.on_event(defines.events.on_robot_built_entity, function (event) - if (event.created_entity.name == "straight-rail") then - OarcRegrowthOffLimits(event.created_entity.position, 1) - elseif (event.created_entity.name == "curved-rail") then - OarcRegrowthOffLimits(event.created_entity.position, 1) - else - OarcRegrowthOffLimits(event.created_entity.position, 1) - end + OarcRegrowthOffLimits(event.created_entity.position, 1) end) end