From fe53e069660ca943e9847c534239b16884b99627 Mon Sep 17 00:00:00 2001 From: Apelta <54854228+TSafa-23@users.noreply.github.com> Date: Sat, 20 Feb 2021 13:31:34 -0600 Subject: [PATCH] Remove antisabotage in favor of human moderation (#806) * Purge antisabotage for active moderation Not needed with more active moderation (guardians, moderator increases as of recent) * Fix luacheck --- mods/ctf/ctf_classes/medic.lua | 5 ----- mods/pvp/antisabotage/init.lua | 32 ------------------------------- mods/pvp/antisabotage/license.txt | 7 ------- mods/pvp/antisabotage/mod.conf | 2 -- mods/pvp/antisabotage/readme.md | 3 --- 5 files changed, 49 deletions(-) delete mode 100644 mods/pvp/antisabotage/init.lua delete mode 100644 mods/pvp/antisabotage/license.txt delete mode 100644 mods/pvp/antisabotage/mod.conf delete mode 100644 mods/pvp/antisabotage/readme.md diff --git a/mods/ctf/ctf_classes/medic.lua b/mods/ctf/ctf_classes/medic.lua index 49a771b..af74623 100644 --- a/mods/ctf/ctf_classes/medic.lua +++ b/mods/ctf/ctf_classes/medic.lua @@ -153,11 +153,6 @@ local function remove_pillar(pos, pname) if name:find("default") and isdiggable(name) then local player = minetest.get_player_by_name(pname) - if minetest.get_modpath("antisabotage") then - -- Fix paxel being capable of mining blocks under teammates - if antisabotage.is_sabotage(pos, minetest.get_node(pos), player) then return end - end - minetest.dig_node(pos) if player and diggers[pname] and type(diggers[pname]) ~= "table" then diff --git a/mods/pvp/antisabotage/init.lua b/mods/pvp/antisabotage/init.lua deleted file mode 100644 index cd8f2f1..0000000 --- a/mods/pvp/antisabotage/init.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Code by Apelta. Mutelated by Lone_Wolf. Mutelated again by Apelta. -antisabotage = {} - -function antisabotage.is_sabotage(pos, oldnode, digger) -- used for paxel - local dname = digger:get_player_name() - - for _, player in pairs(minetest.get_connected_players()) do - local name = player:get_player_name() - - if name ~= dname and ctf.players[name].team == ctf.players[dname].team then - local player_pos = player:get_pos() - - if math.floor(player_pos.y) == pos.y and vector.distance(player_pos, pos) <= 1.5 then - minetest.set_node(pos, oldnode) - - -- Remove all node drops - for _, item in pairs(minetest.get_node_drops(oldnode)) do - digger:get_inventory():remove_item("main", ItemStack(item)) - end - - minetest.chat_send_player(dname, "You can't mine blocks under your teammates!") - return true - end - end - end -end - -minetest.register_on_dignode(function(pos, oldnode, digger) - if not digger:is_player() then return end - - antisabotage.is_sabotage(pos, oldnode, digger) -end) diff --git a/mods/pvp/antisabotage/license.txt b/mods/pvp/antisabotage/license.txt deleted file mode 100644 index 9026f4b..0000000 --- a/mods/pvp/antisabotage/license.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2020 Apelta - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/mods/pvp/antisabotage/mod.conf b/mods/pvp/antisabotage/mod.conf deleted file mode 100644 index b810098..0000000 --- a/mods/pvp/antisabotage/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = antisabotage -depends = ctf diff --git a/mods/pvp/antisabotage/readme.md b/mods/pvp/antisabotage/readme.md deleted file mode 100644 index 7fc21cc..0000000 --- a/mods/pvp/antisabotage/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Anti Sabotage - -A simple mod that prevents players from sabotaging their teammates by digging blocks out from underneath them