ITEM.Name = "GravelCrate"
ITEM.Description = "Crate a Gravels."
ITEM.Model = "models/Zerochain/props_mining/zrms_gravelcrate.mdl"
ITEM.Base = "base_darkrp"
ITEM.Stackable = false
ITEM.DropStack = false

function ITEM:GetDescription()
    local desc = self.Description
    local iron = self:GetData("cIron")
    local bronze = self:GetData("cBronze")
    local silver = self:GetData("cSilver")
    local gold = self:GetData("cGold")
    local coal = self:GetData("cCoal")
    desc = "Iron: " .. tostring(iron) .. " | Bronze: " .. tostring(bronze) .. " | Silver: " .. tostring(silver) .. " | Gold: " .. tostring(gold) .. " | Coal: " .. tostring(coal)

    return self:GetData("Description", desc)
end

function ITEM:SaveData(ent)
    self:SetData("cIron", ent:GetcIron())
    self:SetData("cBronze", ent:GetcBronze())
    self:SetData("cSilver", ent:GetcSilver())
    self:SetData("cGold", ent:GetcGold())
    self:SetData("cCoal", ent:GetcCoal())
end

function ITEM:LoadData(ent)
    ent:SetcIron(self:GetData("cIron"))
    ent:SetcBronze(self:GetData("cBronze"))
    ent:SetcSilver(self:GetData("cSilver"))
    ent:SetcGold(self:GetData("cGold"))
    ent:SetcCoal(self:GetData("cCoal"))
    ent:SpawnFromInventory()
end
