local result
local vector2 = require("#microsoft.xna.framework.vector2")
local coroutineEntity = monocle.Entity()

function onTalk()
	makeUnskippable()
    disableRetry()
    disableMovement()
    player.ForceCameraUpdate = true
	engine.Scene:add(coroutineEntity)
	coroutineEntity:add(monocle.Coroutine(getLevel():ZoomTo(vector2(213, 92), 1.5, 1.25)))
	walkTo(15439, false, 1.15, false)
    local luanet = _G.luanet    
    player.Facing = luanet.enum(luanet.import_type("Celeste.Facings"), "Right")
	celeste.Audio.SetMusicParam("dialog", 1.0)
	
repeat
	if not getFlag("solex_suiteconvo_A") then
		say("SJ2021_SOLOIINI_LUXURYSUITE_F")
		setFlag("solex_suiteconvo_A")
	
	else
		result = choice("SJ2021_SOLOIINI_LUXURYSUITE_H_ASK", "SJ2021_SOLOIINI_LUXURYSUITE_I_ASK", "SJ2021_SOLOIINI_LUXURYSUITE_G")
		if result == 1 then
			say("SJ2021_SOLOIINI_LUXURYSUITE_H_SAY")
		elseif result == 2 then
			say("SJ2021_SOLOIINI_LUXURYSUITE_I_SAY")
		else
			result = 9
		end
	end
	until result == 9
	coroutine.yield(getLevel():ZoomBack(0.5))
end

function onEnd()
	getLevel():remove(coroutineEntity)
	celeste.Audio.SetMusicParam("dialog", 0.0)
    player.ForceCameraUpdate = false
    enableRetry()
    enableMovement()
end