local assets=
{
	Asset("ANIM", "anim/whitegem.zip"),
    Asset("ATLAS", "inventoryimages/whitegem.xml"),
	Asset("IMAGE", "inventoryimages/whitegem.tex"),
}

local prefabs =
{

}


    local function Sparkle(inst)
        if not inst.AnimState:IsCurrentAnimation("sparkle") then
            inst.AnimState:PlayAnimation("sparkle")
            inst.AnimState:PushAnimation("idle", true)
        end
        inst:DoTaskInTime(4 + math.random(), Sparkle)
    end

local function fn(Sim)



    local inst = CreateEntity()
	local trans = inst.entity:AddTransform()
	local anim = inst.entity:AddAnimState()

	inst.entity:AddNetwork()
    MakeInventoryPhysics(inst)

    anim:SetBank("whitegem")
    anim:SetBuild("whitegem")
    anim:PlayAnimation("idle")

      inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end




	inst.entity:SetPristine()




    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.imagename = "whitegem"
	inst.components.inventoryitem.atlasname = "inventoryimages/whitegem.xml"

    inst:AddComponent("inspectable")

    inst:AddComponent("stackable")


        inst:DoTaskInTime(1, Sparkle)




    return inst
end

return Prefab( "common/inventory/whitegem", fn, assets)
