summaryrefslogtreecommitdiff
path: root/sheep.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-01-22 16:09:22 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2018-01-22 16:09:22 +0000
commit468f459fb68363b5ec2bb12062fa360415f838f8 (patch)
tree34f36fd5942e3966cfaf741afda8fb2477239468 /sheep.lua
parent284021ebb79d9de81e6621f92b3ac6cf8df17c94 (diff)
can only shear your own sheep
Diffstat (limited to 'sheep.lua')
-rw-r--r--sheep.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/sheep.lua b/sheep.lua
index ae5e6c9..27e48a2 100644
--- a/sheep.lua
+++ b/sheep.lua
@@ -94,12 +94,14 @@ stepheight = 0.6,
local item = clicker:get_wielded_item()
local itemname = item:get_name()
+ local name = clicker:get_player_name()
--are we giving a haircut>
if itemname == "mobs:shears" then
if self.gotten ~= false
or self.child ~= false
+ or name ~= self.owner
or not minetest.get_modpath("wool") then
return
end
@@ -132,8 +134,6 @@ stepheight = 0.6,
return
end
- local name = clicker:get_player_name()
-
--are we coloring?
if itemname:find("dye:") then