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

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