forked from mtcontrib/mobs_redo
added fallback to nil min/max for drops
This commit is contained in:
parent
331c4e96d2
commit
5e238b168c
4
api.lua
4
api.lua
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
mobs.version = "20180113"
|
mobs.version = "20180118"
|
||||||
|
|
||||||
|
|
||||||
-- Intllib
|
-- Intllib
|
||||||
@ -368,7 +368,7 @@ local item_drop = function(self, cooked)
|
|||||||
|
|
||||||
if random(1, self.drops[n].chance) == 1 then
|
if random(1, self.drops[n].chance) == 1 then
|
||||||
|
|
||||||
num = random(self.drops[n].min, self.drops[n].max)
|
num = random(self.drops[n].min or 1, self.drops[n].max or 1)
|
||||||
item = self.drops[n].name
|
item = self.drops[n].name
|
||||||
|
|
||||||
-- cook items when true
|
-- cook items when true
|
||||||
|
Loading…
Reference in New Issue
Block a user