local monocle = require("#monocle")

local vector2 = require("#microsoft.xna.framework.vector2")

function onBegin()
  disableMovement()
  disableRetry()
  player.ForceCameraUpdate = false
  setFlag("donk_FinalAscentTimer_Stop1", true)
  engine.Scene:NextColorGrade("Donker19/LackOfInsiration/A_HighContrastBrightness")
  wait(1.5)
  say("donk_OrionsBeltCh3_End1")
  wait(1)
  engine.Scene:NextColorGrade("Donker19/LackOfInsiration/A_HighContrastBrightness")
  setFlag("donk_SummonShip_Ch3", true)
  playSound("event:/Donk_MoreOrionsBelt/sfx_ShipLand", player.Position)
  player.DummyAutoAnimate = false
  player.Sprite:Play("sitDown", false)
  wait(5)
  engine.Scene:NextColorGrade("Donker19/LackOfInsiration/0_WhiteFade")
  wait(4)
  completeArea(True, False, True)
  enableMovement()
end

function onEnd(room, wasSkipped)
  enableMovement()
  completeArea(True, False, True)
  player.DummyAutoAnimate = true
  player.ForceCameraUpdate = true
  getLevel():ResetZoom()
  enableMovement()
end