From 72e8b5509d24af6258b48a6743735071882a1c8c Mon Sep 17 00:00:00 2001 From: Wyrrrd Date: Tue, 20 Apr 2021 09:24:40 +0200 Subject: [PATCH] Update control.lua --- control.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/control.lua b/control.lua index aabe8e4..f9e9780 100644 --- a/control.lua +++ b/control.lua @@ -76,11 +76,11 @@ script.on_nth_tick(600, function (event) --Every 10 seconds recheck and give alerts to players for car and ammo-turret entities on the same force as them. for _,player in pairs(game.connected_players) do - turret_enabled = player.mod_settings["gun-turret-alerts-enabled"].value - car_enabled = player.mod_settings["gun-turret-alerts-car-enabled"].value - mode = player.mod_settings["gun-turret-alerts-mode"].value - player_threshold = player.mod_settings["gun-turret-alerts-threshold"].value - ammo_entities = global.ammo_entities[player.surface.name] + local turret_enabled = player.mod_settings["gun-turret-alerts-enabled"].value + local car_enabled = player.mod_settings["gun-turret-alerts-car-enabled"].value + local mode = player.mod_settings["gun-turret-alerts-mode"].value + local player_threshold = player.mod_settings["gun-turret-alerts-threshold"].value + local ammo_entities = global.ammo_entities[player.surface.name] if ammo_entities then for _,entity in pairs(ammo_entities) do