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

function onTalk()
    disableMovement()
	if not getFlag("oshiroTalkedFirstTime") then
		coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_oshiroIntro"))
		setFlag("oshiroTalkedFirstTime",true)
		playSound("event:/ashleybl/SYS_quest_get")
		endCutscene()
	elseif not getFlag("AllCatsHaveBeenPet") then
		coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_oshiroStillHere"))
		endCutscene()
	else
		coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CC_omori_oshiroGone"))
		endCutscene()
	end
end

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