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

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