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("bozoC") then
			coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_bozoFound"))
			endCutscene()
		else
			coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_bozoC"))
			setFlag("bozoC",true)
			endCutscene()
		end
	else
		coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_noBozo"))
	end
end

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