local assets =
{
    Asset("ANIM", "anim/aspirator.zip"),
    Asset("SOUND", "sound/common.fsb"),
	Asset("ATLAS", "images/inventoryimages/compressor.xml")
	
	
}

local prefabs =
{
    "water",
}
local function OnIsDay(inst)
local unknow2 = {"astwater","seaweed","limpets","astwater","astwater","astwater","astwater"}
local unknow1 = unknow2[math.random(#unknow2)]
local kelp = SpawnPrefab("seaweed")
local water = SpawnPrefab("astwater",4) 
local limpet = SpawnPrefab("limpets")
local unknow = SpawnPrefab(unknow1)
inst.components.container:GiveItem(limpet)
inst.components.container:GiveItem(kelp)
inst.components.container:GiveItem(water)
inst.components.container:GiveItem(unknow)
inst.components.container:GiveItem(water)
inst.components.container:GiveItem(unknow)
inst.components.container:GiveItem(water)
end
local function fn()
    local inst = CreateEntity()

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

    inst.AnimState:SetBank("aspirator")
    inst.AnimState:SetBuild("aspirator")
    inst.AnimState:PlayAnimation("idle", true)

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end
    inst:AddComponent("container")
    inst.components.container:WidgetSetup("chester") 
    inst:AddComponent("inspectable")

    ---------------------        
	
	inst:WatchWorldState("isday", OnIsDay)
    ---------------------   
	inst.entity:AddDynamicShadow()
	inst.DynamicShadow:SetSize( 4,4 )
	MakeObstaclePhysics(inst, .2)
	

    return inst
end

return Prefab("aspirator", fn, assets, prefabs),
MakePlacer("aspirator_placer", "aspirator", "aspirator", "idle")