mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
remove useless|old|unused code in mobs api.lua
This commit is contained in:
parent
2da8ce1c1a
commit
13c7e14a3e
@ -1637,22 +1637,6 @@ function mobs:feed_tame(self, clicker, feed_count, breed)
|
|||||||
if not self.follow then return false end
|
if not self.follow then return false end
|
||||||
|
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
local follow_item = false
|
|
||||||
local t = type(self.follow)
|
|
||||||
|
|
||||||
-- single item
|
|
||||||
if t == "string"
|
|
||||||
and item:get_name() == self.follow then
|
|
||||||
follow_item = true
|
|
||||||
|
|
||||||
-- multiple items
|
|
||||||
elseif t == "table" then
|
|
||||||
for no = 1, #self.follow do
|
|
||||||
if self.follow[no] == item:get_name() then
|
|
||||||
follow_item = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- can eat/tame with item in hand
|
-- can eat/tame with item in hand
|
||||||
if follow_holding(self, clicker) then
|
if follow_holding(self, clicker) then
|
||||||
|
Loading…
Reference in New Issue
Block a user