From c2d01f7534ddb682929f98b7d6554e1f6936f7d0 Mon Sep 17 00:00:00 2001 From: "Tai @ Flex" Date: Mon, 22 Aug 2016 04:00:00 +0100 Subject: [PATCH] issue orders if holding mob tamer --- capturing.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/capturing.lua b/capturing.lua index 4a0c358..e438e7b 100644 --- a/capturing.lua +++ b/capturing.lua @@ -79,7 +79,19 @@ function captivate(mobname,modset) mobs:capture_mob(self, clicker, handchance, netchance, lassochance, override, replacement) if rc_func then - rc_func(self,clicker) + --rc_func(self,clicker) + end + if clicker:get_wielded_item():get_name() == "vivarium:mobtamer" then + if self.order == "follow" then + self.order = "stand" + minetest.chat_send_player(clicker:get_player_name(),self.name .." will now stand.") + elseif self.order == "stand" then + self.order = "" + minetest.chat_send_player(clicker:get_player_name(),self.name .." is free to roam around.") + else + self.order = "follow" + minetest.chat_send_player(clicker:get_player_name(),self.name .." will now follow you.") + end end end mobe.on_rightclick = capturefunction