mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-11 10:20:21 +01:00
players with protection_bypass can pick up owned animals from other players
This commit is contained in:
parent
6750d176ee
commit
ccbfe93f12
7
api.lua
7
api.lua
@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi")
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20210405",
|
version = "20210406",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
@ -4499,8 +4499,9 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net,
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- cannot pick up if not owner
|
-- cannot pick up if not owner (unless player has protection_bypass priv)
|
||||||
if self.owner ~= name and force_take == false then
|
if not minetest.check_player_privs(name, "protection_bypass")
|
||||||
|
and self.owner ~= name and force_take == false then
|
||||||
|
|
||||||
minetest.chat_send_player(name, S("@1 is owner!", self.owner))
|
minetest.chat_send_player(name, S("@1 is owner!", self.owner))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user