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(195, 120), 1.75, 1.25)))
    walkTo(1795, false, 1.0, false)
    local luanet = _G.luanet
    player.Facing = luanet.enum(luanet.import_type("Celeste.Facings"), "Right")
	celeste.Audio.SetMusicParam("dialog", 1.0)
	if not getFlag("bhotel_power_on") then
		say("bhotel_elevator_find_off")
	else
		say("bhotel_elevator_find_on")
	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