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

local function fn()
    local inst = CreateEntity()

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

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("ast")
    inst.AnimState:SetBuild("ast")
    inst.AnimState:PlayAnimation("BUILD")

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end
	inst:AddTag("molebait")
    inst:AddComponent("inspectable")
	inst:AddComponent("talker")
    inst:AddComponent("inventoryitem")
	--随机调查
	inst.components.inspectable.getstatus = function(inst,viewer)
	local say = ""
	local probably = math.random(1,5)
	if probably == 1 then
	inst.components.talker:Say("说明1/5  \n [研磨器可以分解几乎所有的材料，但是注意，不是所有东西都可以分解出物品的，啥，你当垃圾桶用？]")
	end
	if probably == 2 then
	inst.components.talker:Say("说明2/5  \n [研磨器目前可以分解的物品有：大块金属，金块，燧石，木炭，以后会有更多，别的被吞了活该哦]")
	end
	if probably == 3 then
	inst.components.talker:Say("说明3/5  \n [下一个版本将会完善矿物系统，并且作者正在努力研究生物工程和有机化学(伪)]")
	end
	if probably == 4 then
	inst.components.talker:Say("说明4/5  \n [矿物因为数据传输不完整的问题，掉在地面上会像素化]")
	end
	if probably == 5 then
	inst.components.talker:Say("说明5/5  \n [研磨器研磨东西你也许会发现看上去矿物变少了，实际上是自动叠加功能，一次性自动叠加两个哦]")
	end
	return say
	end
	--
	inst:AddComponent("tradable")
    inst.components.inventoryitem.imagename = "ast"
    inst.components.inventoryitem.atlasname = "images/inventoryimages/ast.xml"
    inst:AddComponent("selfstacker")

    MakeHauntableLaunchAndSmash(inst)

    return inst
end

return Prefab("ast", fn, assets)
