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(1404, 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_power_on") then
		say("bhotel_power_room")
	else
		say("bhotel_breaker_check_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