zombiesurvival-evolved/gamemodes/zombiesurvival/gamemode/itemstocks/sh_stock.lua
William Moodhe e9da54c2f9 ZS updates for 2014-2018
Too many changes to list.
2018-05-01 18:32:59 -04:00

19 lines
347 B
Lua

GM.ItemStocks = {}
function GM:GetItemStocks(itemid)
if self.ItemStocks[itemid] then
return self.ItemStocks[itemid]
end
local item = FindItem(itemid)
if item and item.MaxStock then
return item.MaxStock
end
return -1
end
function GM:HasItemStocks(itemid)
local stock = self:GetItemStocks(itemid)
return stock > 0 or stock == -1
end