Give bandages infinite uses (#689)

* infinite bandages for medics

* Little nitpick

* Set stack_max to 1

Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com>
This commit is contained in:
KaylebJay 2020-10-24 16:20:16 -06:00 committed by GitHub
parent 2501173aac
commit 1bc44d16ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -8,6 +8,7 @@ minetest.register_craftitem("ctf_bandages:bandage", {
"Heals teammates for 3-4 HP until target's HP is equal to " .. "Heals teammates for 3-4 HP until target's HP is equal to " ..
ctf_bandages.heal_percent * 100 .. "% of their maximum HP", ctf_bandages.heal_percent * 100 .. "% of their maximum HP",
inventory_image = "ctf_bandages_bandage.png", inventory_image = "ctf_bandages_bandage.png",
stack_max = 1,
on_use = function(itemstack, player, pointed_thing) on_use = function(itemstack, player, pointed_thing)
if pointed_thing.type ~= "object" then if pointed_thing.type ~= "object" then
return return
@ -28,7 +29,6 @@ minetest.register_craftitem("ctf_bandages:bandage", {
hp = limit hp = limit
end end
object:set_hp(hp) object:set_hp(hp)
itemstack:take_item()
minetest.chat_send_player(pname, minetest.colorize("#C1FF44", name .. " has healed you!")) minetest.chat_send_player(pname, minetest.colorize("#C1FF44", name .. " has healed you!"))
return itemstack return itemstack
else else

View file

@ -74,7 +74,7 @@ ctf_classes.register("medic", {
speed = 1.1, speed = 1.1,
initial_stuff = { initial_stuff = {
"ctf_bandages:bandage 50", "ctf_bandages:bandage",
"default:pick_steel", "default:pick_steel",
"default:shovel_steel", "default:shovel_steel",
"default:cobble 99" "default:cobble 99"