From bf28bab427afb5f5167ebf62ae7afa977e13698a Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 13 Jul 2023 23:52:36 +0200 Subject: [PATCH] Remove duplicated creacode --- mods/PLAYER/mcl_gamemode/init.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/mods/PLAYER/mcl_gamemode/init.lua b/mods/PLAYER/mcl_gamemode/init.lua index aa2c2ba0c..cce6c0b46 100644 --- a/mods/PLAYER/mcl_gamemode/init.lua +++ b/mods/PLAYER/mcl_gamemode/init.lua @@ -57,21 +57,6 @@ function minetest.is_creative_enabled(name) return false end --- Insta "digging" nodes in gamemode-creative -minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) - if not puncher or not puncher:is_player() then return end - if minetest.is_creative_enabled() then return end - local name = puncher:get_player_name() - if not minetest.is_creative_enabled(name) then return end - if pointed_thing.type ~= "node" then return end - local def = minetest.registered_nodes[node.name] - if def then - if def.on_destruct then def.on_destruct(pos) end - minetest.node_dig(pos, node, puncher) - return true - end -end) - -- Don't subtract from inv when placing in gamemode-creative minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing) if placer and placer:is_player() and minetest.is_creative_enabled(placer:get_player_name()) then return true end