summaryrefslogtreecommitdiff
path: root/warthog.lua
diff options
context:
space:
mode:
Diffstat (limited to 'warthog.lua')
-rw-r--r--warthog.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/warthog.lua b/warthog.lua
index 436e468..81daacf 100644
--- a/warthog.lua
+++ b/warthog.lua
@@ -48,12 +48,9 @@ mobs:register_mob("mobs_animal:pumba", {
},
on_rightclick = function(self, clicker)
- if mobs:feed_tame(self, clicker, 8, true, true) then
- return
- end
-
- mobs:protect(self, clicker)
- mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
+ if mobs:feed_tame(self, clicker, 8, true, true) then return end
+ if mobs:protect(self, clicker) then return end
+ if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
end,
})