From 0c3b2472890993cce3fdec6f0d2e3a9820fe61d1 Mon Sep 17 00:00:00 2001 From: oof2win2 Date: Wed, 29 Dec 2021 16:49:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20has=5Fflag=20not=20existin?= =?UTF-8?q?g=20on=20Roles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/addons/deconlog.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/addons/deconlog.lua b/modules/addons/deconlog.lua index 74279a3f..95d18912 100644 --- a/modules/addons/deconlog.lua +++ b/modules/addons/deconlog.lua @@ -19,14 +19,14 @@ end) Event.add(defines.events.on_player_deconstructed_area, function (e) local player = game.get_player(e.player_index) - if Roles.has_flag(player, "deconlog-bypass") then return end + if Roles.player_has_flag(player, "deconlog-bypass") then return end add_log(get_secs() .. player.name .. ",decon_area," .. pos_tostring(e.area.left_top) .. "," .. pos_tostring(e.area.right_bottom)) end) Event.add(defines.events.on_built_entity, function (e) if not e.player_index then return end local player = game.get_player(e.player_index) - if Roles.has_flag(player, "deconlog-bypass") then return end + if Roles.player_has_flag(player, "deconlog-bypass") then return end local ent = e.created_entity add_log(get_secs() .. player.name .. ",built_entity," .. ent.name .. "," .. pos_tostring(ent.position) .. "," .. tostring(ent.direction) .. "," .. tostring(ent.orientation)) end) @@ -34,7 +34,7 @@ end) Event.add(defines.events.on_player_mined_entity, function (e) local player = game.get_player(e.player_index) - if Roles.has_flag(player, "deconlog-bypass") then return end + if Roles.player_has_flag(player, "deconlog-bypass") then return end local ent = e.entity add_log(get_secs() .. player.name .. ",mined_entity," .. ent.name .. "," .. pos_tostring(ent.position) .. "," .. tostring(ent.direction) .. "," .. tostring(ent.orientation)) end) \ No newline at end of file