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

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBuild("bloodbag")
	inst.AnimState:SetBank("bloodbag")
    inst.AnimState:PlayAnimation("anim")

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    ---------------------

    inst:AddComponent("inspectable")

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

    inst:AddComponent("stackable")
    inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

    inst:AddComponent("healer")
    inst.components.healer:SetHealthAmount(TUNING.HEALING_SUPERHUGE)

    MakeHauntableLaunch(inst)

    return inst
end

return Prefab("bloodbag", fn, assets)
