make it possible to use advanced protector on normally protected mob

This commit is contained in:
TenPlus1 2021-04-13 12:41:09 +01:00
parent f6e16a5503
commit 9be934ec25
1 changed files with 2 additions and 1 deletions

View File

@ -4618,7 +4618,8 @@ function mobs:protect(self, clicker)
return true
end
if self.protected then
if (self.protected and tool_name == "mobs:protector")
or (self.protected == 2 and tool_name == "mobs:protector2") then
minetest.chat_send_player(name, S("Already protected!"))
return true
end