Add message when player can't heal another player (#805)

* Add message when player can't heal

* Edit message
This commit is contained in:
Toby1710 2021-02-21 04:52:13 +02:00 committed by GitHub
parent d717547d41
commit c56c4a9de2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,6 +99,7 @@ minetest.override_item("ctf_bandages:bandage", {
if ctf.player(pname).team == ctf.player(name).team then
local nodename = minetest.get_node(object:get_pos()).name
if ctf_classes.dont_heal[pname] or nodename:find("lava") or nodename:find("water") or nodename:find("trap") then
minetest.chat_send_player(name, "You can't heal player in lava, water or spikes!")
return -- Can't heal players in lava/water/spikes
end