From 72d4940bf2f4c38cd620d55f737c3bbf628f97cf Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 7 May 2018 15:35:52 +0200 Subject: [PATCH] Remove unused code in mcl_throwing --- mods/ITEMS/mcl_throwing/bow.lua | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/mods/ITEMS/mcl_throwing/bow.lua b/mods/ITEMS/mcl_throwing/bow.lua index 4e24a42d43..08dd1af816 100644 --- a/mods/ITEMS/mcl_throwing/bow.lua +++ b/mods/ITEMS/mcl_throwing/bow.lua @@ -1,8 +1,5 @@ mcl_throwing = {} -dofile(minetest.get_modpath("mcl_throwing").."/arrow.lua") -dofile(minetest.get_modpath("mcl_throwing").."/throwable.lua") - local arrows = { ["mcl_throwing:arrow"] = "mcl_throwing:arrow_entity", } @@ -75,28 +72,6 @@ local player_shoot_arrow = function(itemstack, player, power, damage) return true end -local powerup_function = function(nextbow) - return function(itemstack, placer, pointed_thing) - -- Use pointed node's on_rightclick function first, if present - if pointed_thing.type == "node" then - local node = minetest.get_node(pointed_thing.under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end - end - end - - -- Check for arrow or Creative Mode - if minetest.settings:get_bool("creative_mode") or get_arrow(placer) ~= nil then - local wear = itemstack:get_wear() - itemstack:replace(nextbow) - itemstack:set_wear(wear) - end - return itemstack - end -end - minetest.register_tool("mcl_throwing:bow", { description = "Bow", _doc_items_longdesc = "Bows are ranged weapons to shoot arrows at your foes.", @@ -203,10 +178,6 @@ end) minetest.register_globalstep(function(dtime) for _, player in pairs(minetest.get_connected_players()) do local wielditem = player:get_wielded_item() - --if wielditem:get_name()=="bow:bow_dropped" then - -- wielditem:set_name("bow:bow") - -- player:set_wielded_item(wielditem) - --end local controls = player:get_player_control() local inv = minetest.get_inventory({type="player", name = player:get_player_name()}) if bow_load[player:get_player_name()] and (wielditem:get_name()~="mcl_throwing:bow_0" and wielditem:get_name()~="mcl_throwing:bow_1" and wielditem:get_name()~="mcl_throwing:bow_2") then