local luaCutscenesUtils = require("#Celeste.Mod.MaxHelpingHand.Module.LuaCutscenesUtils")

function onTalk()
    disableMovement()
	playSound("event:/ashleybl/SE_doorknock")
	wait(0.5)
	if getFlag("deliveryQuestOngoing") then
		if getFlag("bozoE") then
			coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_bozoFound"))
			endCutscene()
		else
			coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_bozoE"))
			setFlag("bozoE",true)
			endCutscene()
		end
	else
		coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_noBozo"))
	end
end

function onEnd(wasSkipped)
	if wasSkipped then
		setFlag("bozoE",true)
	end
    enableMovement()
end