local monocle = require("#monocle")

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

function onBegin(room)
  disableMovement()
  disableRetry()
  player.ForceCameraUpdate = true
  walkTo(19241, false, 1, false)
  wait(0.1)
  playSound("event:/Donk_OrionsBelt/sfx_RingRingRing", player.Position)
  coroutine.yield(getLevel():ZoomTo(vector2(160, 90), 1.6, 2))
  wait(0.5)
  say("Ch1_RingRingRing_Donk")
  wait(0.1)
  playSound("event:/char/madeline/crystaltheo_lift", player.Position)
  setFlag("donk_RingRingRing_PhoneCh1", true)
  wait(1)
  playSound("event:/Donk_OrionsBelt/sfx_RingRingRing", player.Position)
  say("Ch1_RingRingRing_Donk2")
  wait(1)
  playSound("event:/char/madeline/crystaltheo_throw", player.Position)
  setFlag("donk_RingRingRing_PhoneCh1", false)
  coroutine.yield(engine.Scene:ZoomBack(1))
  enableMovement()
end

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