From 1bc44d16ee69939e4d16a7bfe5677c8c338fe92d Mon Sep 17 00:00:00 2001 From: KaylebJay <44441970+KaylebJay@users.noreply.github.com> Date: Sat, 24 Oct 2020 16:20:16 -0600 Subject: [PATCH] Give bandages infinite uses (#689) * infinite bandages for medics * Little nitpick * Set stack_max to 1 Co-authored-by: LoneWolfHT --- mods/ctf/ctf_bandages/init.lua | 2 +- mods/ctf/ctf_classes/classes.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ctf/ctf_bandages/init.lua b/mods/ctf/ctf_bandages/init.lua index 8e2e5a1..a6a4bec 100644 --- a/mods/ctf/ctf_bandages/init.lua +++ b/mods/ctf/ctf_bandages/init.lua @@ -8,6 +8,7 @@ minetest.register_craftitem("ctf_bandages:bandage", { "Heals teammates for 3-4 HP until target's HP is equal to " .. ctf_bandages.heal_percent * 100 .. "% of their maximum HP", inventory_image = "ctf_bandages_bandage.png", + stack_max = 1, on_use = function(itemstack, player, pointed_thing) if pointed_thing.type ~= "object" then return @@ -28,7 +29,6 @@ minetest.register_craftitem("ctf_bandages:bandage", { hp = limit end object:set_hp(hp) - itemstack:take_item() minetest.chat_send_player(pname, minetest.colorize("#C1FF44", name .. " has healed you!")) return itemstack else diff --git a/mods/ctf/ctf_classes/classes.lua b/mods/ctf/ctf_classes/classes.lua index da9a32a..c8332e4 100644 --- a/mods/ctf/ctf_classes/classes.lua +++ b/mods/ctf/ctf_classes/classes.lua @@ -74,7 +74,7 @@ ctf_classes.register("medic", { speed = 1.1, initial_stuff = { - "ctf_bandages:bandage 50", + "ctf_bandages:bandage", "default:pick_steel", "default:shovel_steel", "default:cobble 99"