local vector2 = require("#microsoft.xna.framework.vector2")
local coroutineEntity = monocle.Entity()

function onTalk()
    disableMovement()
    player.ForceCameraUpdate = true
	engine.Scene:add(coroutineEntity)
	coroutineEntity:add(monocle.Coroutine(getLevel():ZoomTo(vector2(120, 120), 1.75, 1.25)))
    walkTo(5578, false, 1.0, false)
    local luanet = _G.luanet
    player.Facing = luanet.enum(luanet.import_type("Celeste.Facings"), "Left")
	celeste.Audio.SetMusicParam("dialog", 1.0)
	if not getFlag("bhotel_laundry_lock") then
		say("bhotel_laundry_key_find_START")
		setFlag("bhotel_slow_fade_to_black")
		wait(0.2)
		say("bhotel_laundry_key_find_CONT")
		setFlag("bhotel_laundry_lock")
		setFlag("bhotel_slow_fade_to_norm")
	else
		say("bhotel_laundry_key_find_2")
	end
	
	coroutine.yield(getLevel():ZoomBack(0.5))
end

function onEnd()
	getLevel():remove(coroutineEntity)
    player.ForceCameraUpdate = false
	celeste.Audio.SetMusicParam("dialog", 0.0)
	setPlayerState ("StNormal")
    enableMovement()
end