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(100, 130), 1.75, 1.25)))
    walkTo(4004, 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_101_lock") then
		say("bhotel_staff_key_find_1")
		setFlag("bhotel_101_lock")
	else
		say("bhotel_staff_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