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


function onTalk()

    if getFlag("book3") then
        disableMovement()
        coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CBR_BlackSpace_door2_treehouse_book3"))
        enableMovement()
    end

    if getFlag("book2") then
        setFlag("book2", false)
        setFlag("book3")
        disableMovement()
        coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CBR_BlackSpace_door2_treehouse_book2"))
        enableMovement()
    end

    if not getFlag("book2") and not getFlag("book3") then
        setFlag("book2")
        disableMovement()
        coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CBR_BlackSpace_door2_treehouse_book1"))
        enableMovement()
    end

end