;;-*-Lisp-*-
(in-package goal)

(import "goal_src/jak1/import/mayor-ag.gc")

;; definition of type mayor
(deftype mayor (process-taskable)
  ()
  :heap-base #x110
  :method-count-assert 53
  :size-assert         #x17c
  :flag-assert         #x350110017c
  )

;; definition for method 3 of type mayor
(defmethod inspect mayor ((obj mayor))
  (let ((t9-0 (method-of-type process-taskable inspect)))
    (t9-0 obj)
    )
  obj
  )

;; failed to figure out what this is:
(defskelgroup *mayor-sg* mayor mayor-lod0-jg mayor-idle-ja
              ((mayor-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 2.5)
              :shadow mayor-shadow-mg
              )

;; definition for method 52 of type mayor
;; INFO: Return type mismatch int vs none.
(defmethod dummy-52 mayor ((obj mayor))
  (let ((v1-1 (-> obj draw shadow-ctrl)))
    (when v1-1
      (let ((f0-0 (-> obj root-override trans y)))
        (let ((a0-2 v1-1))
          (set! (-> a0-2 settings bot-plane w) (- (+ -2048.0 f0-0)))
          )
        0
        (set! (-> v1-1 settings top-plane w) (- (+ 2048.0 f0-0)))
        )
      0
      )
    )
  (none)
  )

;; definition for method 48 of type mayor
(defmethod draw-npc-shadow mayor ((obj mayor))
  (-> obj draw shadow-ctrl)
  (cond
    ((and (-> obj draw shadow)
          (zero? (-> obj draw cur-lod))
          (logtest? (-> obj draw status) (draw-status was-drawn))
          )
     (let ((v1-9 (-> obj draw shadow-ctrl)))
       (logclear! (-> v1-9 settings flags) (shadow-flags disable-draw))
       )
     0
     (update-direction-from-time-of-day (-> obj draw shadow-ctrl))
     )
    (else
      (let ((v1-14 (-> obj draw shadow-ctrl)))
        (set! (-> v1-14 settings flags) (the-as shadow-flags (logior (the-as int (-> v1-14 settings flags)) 32)))
        )
      0
      )
    )
  (none)
  )

;; definition for function mayor-lurkerm-reward-speech
(defun mayor-lurkerm-reward-speech ((arg0 mayor) (arg1 symbol))
  (when arg1
    (set! (-> arg0 cell-for-task) (game-task jungle-lurkerm))
    (close-specific-task! (game-task jungle-lurkerm) (task-status need-reward-speech))
    (first-any (-> arg0 tasks) #t)
    )
  (new 'static 'spool-anim :name "mayor-resolution-beams" :index 7 :parts 6 :command-list '())
  )

;; definition for method 32 of type mayor
(defmethod play-anim! mayor ((obj mayor) (arg0 symbol))
  (set! (-> obj talk-message) (game-text-id press-to-talk))
  (case (current-status (-> obj tasks))
    (((task-status need-hint) (task-status need-introduction))
     (when arg0
       (close-specific-task! (game-task jungle-lurkerm) (task-status need-introduction))
       (close-specific-task! (game-task village1-mayor-money) (task-status need-introduction))
       )
     (cond
       ((closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder))
        (mayor-lurkerm-reward-speech obj arg0)
        )
       (else
         (new 'static 'spool-anim :name "mayor-introduction" :index 4 :parts 16 :command-list '())
         (new 'static 'spool-anim
           :name "mayor-introduction"
           :index 4
           :parts 16
           :command-list '((0 kill "villagea-part-65")
             (0 kill "villagea-part-70")
             (0 kill "med-res-level-2")
             (0 kill "med-res-level-3")
             (0 kill "med-res-level-4")
             (0 kill "med-res-level-6")
             (0 kill "med-res-level-7")
             (0 kill "med-res-level-8")
             (0 kill "med-res-level-11")
             (0 kill "med-res-level-14")
             (0 kill "fishermans-boat-2")
             (0 kill "windspinner-9")
             (0 kill "sagesail-6")
             (0 kill "sharkey-12")
             (0 kill "windmill-sail-4")
             (0 kill "water-vol-7")
             (0 kill "windspinner-8")
             (0 kill "villagea-part-32")
             (0 kill "water-vol-10")
             (0 kill "ropebridge-4")
             (0 kill "ropebridge-5")
             (0 kill "reflector-end-1")
             (0 kill "eco-10")
             (0 kill "eco-11")
             (0 kill "warp-gate-switch-3")
             (0 kill "reflector-middle-2")
             (0 kill "evilplant-2")
             (0 kill "crate-3147")
             (0 kill "villagea-water-2")
             (0 kill "med-res-level-22")
             (0 kill "med-res-level-23")
             (0 kill "villagea-part-50")
             (0 kill "water-vol-9")
             (0 kill "crate-3144")
             (0 kill "orb-cache-top-4")
             (0 kill "village-cam-2")
             (0 kill "villagea-part-18")
             (0 kill "villagea-part-24")
             (0 kill "money-2676")
             (0 kill "villagea-part-64")
             (0 kill "villagea-part-13")
             (0 kill "villagea-part-17")
             (0 kill "money-2689")
             (0 kill "money-2690")
             (0 kill "farmer-3")
             (0 kill "villagea-part-26")
             (0 kill "money-2692")
             (0 kill "villagea-part-37")
             (0 kill "villagea-part-38")
             (0 kill "villagea-part-64")
             (0 kill "crate-3142")
             (0 kill "crate-3143")
             (0 kill "money-2688")
             (0 kill "villagea-part-14")
             (0 kill "money-2691")
             (0 kill "villagea-part-62")
             (0 kill "villagea-part-63")
             (0 kill "sharkey-1")
             (0 kill "eco-82")
             (0 kill "eco-83")
             (0 kill "crate-2470")
             (0 kill "villagea-part-3")
             (0 kill "villagea-part-15")
             (0 kill "villagea-part-22")
             (0 kill "villagea-part-28")
             (0 kill "explorer-4")
             (0 kill "oracle-1")
             (0 kill "crate-3141")
             (0 kill "crate-3145")
             (0 kill "water-vol-8")
             (0 kill "water-vol-63")
             (0 kill "lrocklrg-1")
             (0 kill "crate-2469")
             (0 kill "villagea-part-69")
             (0 display-level beach special)
             (565 joint "cameraB")
             (850 joint "camera")
             (915 joint "cameraB")
             )
           )
         )
       )
     )
    (((task-status need-reminder-a) (task-status need-reminder))
     (set! (-> obj skippable) #t)
     (cond
       ((closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reward-speech))
        (new 'static 'spool-anim
          :name "mayor-reminder-donation"
          :index 6
          :parts 3
          :command-list '((0 kill "villagea-part-65")
            (0 kill "villagea-part-70")
            (0 kill "med-res-level-2")
            (0 kill "med-res-level-3")
            (0 kill "med-res-level-4")
            (0 kill "med-res-level-6")
            (0 kill "med-res-level-7")
            (0 kill "med-res-level-8")
            (0 kill "med-res-level-11")
            (0 kill "med-res-level-14")
            (0 kill "fishermans-boat-2")
            (0 kill "windspinner-9")
            (0 kill "sagesail-6")
            (0 kill "sharkey-12")
            (0 kill "windmill-sail-4")
            (0 kill "water-vol-7")
            (0 kill "windspinner-8")
            (0 kill "villagea-part-32")
            (0 kill "water-vol-10")
            (0 kill "ropebridge-4")
            (0 kill "ropebridge-5")
            (0 kill "reflector-end-1")
            (0 kill "eco-10")
            (0 kill "eco-11")
            (0 kill "warp-gate-switch-3")
            (0 kill "reflector-middle-2")
            (0 kill "evilplant-2")
            (0 kill "crate-3147")
            (0 kill "villagea-water-2")
            (0 kill "med-res-level-22")
            (0 kill "med-res-level-23")
            (0 kill "villagea-part-50")
            (0 kill "water-vol-9")
            (0 kill "crate-3144")
            (0 kill "orb-cache-top-4")
            (0 kill "village-cam-2")
            (0 kill "villagea-part-18")
            (0 kill "villagea-part-24")
            (0 kill "money-2676")
            (0 kill "villagea-part-64")
            (0 kill "villagea-part-13")
            (0 kill "villagea-part-17")
            (0 kill "money-2689")
            (0 kill "money-2690")
            (0 kill "farmer-3")
            (0 kill "villagea-part-26")
            (0 kill "money-2692")
            (0 kill "villagea-part-37")
            (0 kill "villagea-part-38")
            (0 kill "villagea-part-64")
            (0 kill "crate-3142")
            (0 kill "crate-3143")
            (0 kill "money-2688")
            (0 kill "villagea-part-14")
            (0 kill "money-2691")
            (0 kill "villagea-part-62")
            (0 kill "villagea-part-63")
            (0 kill "sharkey-1")
            (0 kill "eco-82")
            (0 kill "eco-83")
            (0 kill "crate-2470")
            (0 kill "villagea-part-3")
            (0 kill "villagea-part-15")
            (0 kill "villagea-part-22")
            (0 kill "villagea-part-28")
            (0 kill "explorer-4")
            (0 kill "oracle-1")
            (0 kill "crate-3141")
            (0 kill "crate-3145")
            (0 kill "water-vol-8")
            (0 kill "water-vol-63")
            (0 kill "lrocklrg-1")
            (0 kill "crate-2469")
            (0 kill "villagea-part-69")
            (0 display-level beach special)
            )
          )
        )
       ((closed? (-> obj tasks) (game-task village1-mayor-money) (task-status need-reward-speech))
        (new 'static 'spool-anim
          :name "mayor-reminder-beams"
          :index 5
          :parts 3
          :command-list '((0 kill "villagea-part-65")
            (0 kill "villagea-part-70")
            (0 kill "med-res-level-2")
            (0 kill "med-res-level-3")
            (0 kill "med-res-level-4")
            (0 kill "med-res-level-6")
            (0 kill "med-res-level-7")
            (0 kill "med-res-level-8")
            (0 kill "med-res-level-11")
            (0 kill "med-res-level-14")
            (0 kill "fishermans-boat-2")
            (0 kill "windspinner-9")
            (0 kill "sagesail-6")
            (0 kill "sharkey-12")
            (0 kill "windmill-sail-4")
            (0 kill "water-vol-7")
            (0 kill "windspinner-8")
            (0 kill "villagea-part-32")
            (0 kill "water-vol-10")
            (0 kill "ropebridge-4")
            (0 kill "ropebridge-5")
            (0 kill "reflector-end-1")
            (0 kill "eco-10")
            (0 kill "eco-11")
            (0 kill "warp-gate-switch-3")
            (0 kill "reflector-middle-2")
            (0 kill "evilplant-2")
            (0 kill "crate-3147")
            (0 kill "villagea-water-2")
            (0 kill "med-res-level-22")
            (0 kill "med-res-level-23")
            (0 kill "villagea-part-50")
            (0 kill "water-vol-9")
            (0 kill "crate-3144")
            (0 kill "orb-cache-top-4")
            (0 kill "village-cam-2")
            (0 kill "villagea-part-18")
            (0 kill "villagea-part-24")
            (0 kill "money-2676")
            (0 kill "villagea-part-64")
            (0 kill "villagea-part-13")
            (0 kill "villagea-part-17")
            (0 kill "money-2689")
            (0 kill "money-2690")
            (0 kill "farmer-3")
            (0 kill "villagea-part-26")
            (0 kill "money-2692")
            (0 kill "villagea-part-37")
            (0 kill "villagea-part-38")
            (0 kill "villagea-part-64")
            (0 kill "crate-3142")
            (0 kill "crate-3143")
            (0 kill "money-2688")
            (0 kill "villagea-part-14")
            (0 kill "money-2691")
            (0 kill "villagea-part-62")
            (0 kill "villagea-part-63")
            (0 kill "sharkey-1")
            (0 kill "eco-82")
            (0 kill "eco-83")
            (0 kill "crate-2470")
            (0 kill "villagea-part-3")
            (0 kill "villagea-part-15")
            (0 kill "villagea-part-22")
            (0 kill "villagea-part-28")
            (0 kill "explorer-4")
            (0 kill "oracle-1")
            (0 kill "crate-3141")
            (0 kill "crate-3145")
            (0 kill "water-vol-8")
            (0 kill "water-vol-63")
            (0 kill "lrocklrg-1")
            (0 kill "crate-2469")
            (0 kill "villagea-part-69")
            (0 display-level beach special)
            )
          )
        )
       ((zero? (get-reminder (-> obj tasks) 0))
        (if arg0
            (save-reminder (-> obj tasks) 1 0)
            )
        (new 'static 'spool-anim
          :name "mayor-reminder-beams"
          :index 5
          :parts 3
          :command-list '((0 kill "villagea-part-65")
            (0 kill "villagea-part-70")
            (0 kill "med-res-level-2")
            (0 kill "med-res-level-3")
            (0 kill "med-res-level-4")
            (0 kill "med-res-level-6")
            (0 kill "med-res-level-7")
            (0 kill "med-res-level-8")
            (0 kill "med-res-level-11")
            (0 kill "med-res-level-14")
            (0 kill "fishermans-boat-2")
            (0 kill "windspinner-9")
            (0 kill "sagesail-6")
            (0 kill "sharkey-12")
            (0 kill "windmill-sail-4")
            (0 kill "water-vol-7")
            (0 kill "windspinner-8")
            (0 kill "villagea-part-32")
            (0 kill "water-vol-10")
            (0 kill "ropebridge-4")
            (0 kill "ropebridge-5")
            (0 kill "reflector-end-1")
            (0 kill "eco-10")
            (0 kill "eco-11")
            (0 kill "warp-gate-switch-3")
            (0 kill "reflector-middle-2")
            (0 kill "evilplant-2")
            (0 kill "crate-3147")
            (0 kill "villagea-water-2")
            (0 kill "med-res-level-22")
            (0 kill "med-res-level-23")
            (0 kill "villagea-part-50")
            (0 kill "water-vol-9")
            (0 kill "crate-3144")
            (0 kill "orb-cache-top-4")
            (0 kill "village-cam-2")
            (0 kill "villagea-part-18")
            (0 kill "villagea-part-24")
            (0 kill "money-2676")
            (0 kill "villagea-part-64")
            (0 kill "villagea-part-13")
            (0 kill "villagea-part-17")
            (0 kill "money-2689")
            (0 kill "money-2690")
            (0 kill "farmer-3")
            (0 kill "villagea-part-26")
            (0 kill "money-2692")
            (0 kill "villagea-part-37")
            (0 kill "villagea-part-38")
            (0 kill "villagea-part-64")
            (0 kill "crate-3142")
            (0 kill "crate-3143")
            (0 kill "money-2688")
            (0 kill "villagea-part-14")
            (0 kill "money-2691")
            (0 kill "villagea-part-62")
            (0 kill "villagea-part-63")
            (0 kill "sharkey-1")
            (0 kill "eco-82")
            (0 kill "eco-83")
            (0 kill "crate-2470")
            (0 kill "villagea-part-3")
            (0 kill "villagea-part-15")
            (0 kill "villagea-part-22")
            (0 kill "villagea-part-28")
            (0 kill "explorer-4")
            (0 kill "oracle-1")
            (0 kill "crate-3141")
            (0 kill "crate-3145")
            (0 kill "water-vol-8")
            (0 kill "water-vol-63")
            (0 kill "lrocklrg-1")
            (0 kill "crate-2469")
            (0 kill "villagea-part-69")
            (0 display-level beach special)
            )
          )
        )
       (else
         (if arg0
             (save-reminder (-> obj tasks) 0 0)
             )
         (new 'static 'spool-anim
           :name "mayor-reminder-donation"
           :index 6
           :parts 3
           :command-list '((0 kill "villagea-part-65")
             (0 kill "villagea-part-70")
             (0 kill "med-res-level-2")
             (0 kill "med-res-level-3")
             (0 kill "med-res-level-4")
             (0 kill "med-res-level-6")
             (0 kill "med-res-level-7")
             (0 kill "med-res-level-8")
             (0 kill "med-res-level-11")
             (0 kill "med-res-level-14")
             (0 kill "fishermans-boat-2")
             (0 kill "windspinner-9")
             (0 kill "sagesail-6")
             (0 kill "sharkey-12")
             (0 kill "windmill-sail-4")
             (0 kill "water-vol-7")
             (0 kill "windspinner-8")
             (0 kill "villagea-part-32")
             (0 kill "water-vol-10")
             (0 kill "ropebridge-4")
             (0 kill "ropebridge-5")
             (0 kill "reflector-end-1")
             (0 kill "eco-10")
             (0 kill "eco-11")
             (0 kill "warp-gate-switch-3")
             (0 kill "reflector-middle-2")
             (0 kill "evilplant-2")
             (0 kill "crate-3147")
             (0 kill "villagea-water-2")
             (0 kill "med-res-level-22")
             (0 kill "med-res-level-23")
             (0 kill "villagea-part-50")
             (0 kill "water-vol-9")
             (0 kill "crate-3144")
             (0 kill "orb-cache-top-4")
             (0 kill "village-cam-2")
             (0 kill "villagea-part-18")
             (0 kill "villagea-part-24")
             (0 kill "money-2676")
             (0 kill "villagea-part-64")
             (0 kill "villagea-part-13")
             (0 kill "villagea-part-17")
             (0 kill "money-2689")
             (0 kill "money-2690")
             (0 kill "farmer-3")
             (0 kill "villagea-part-26")
             (0 kill "money-2692")
             (0 kill "villagea-part-37")
             (0 kill "villagea-part-38")
             (0 kill "villagea-part-64")
             (0 kill "crate-3142")
             (0 kill "crate-3143")
             (0 kill "money-2688")
             (0 kill "villagea-part-14")
             (0 kill "money-2691")
             (0 kill "villagea-part-62")
             (0 kill "villagea-part-63")
             (0 kill "sharkey-1")
             (0 kill "eco-82")
             (0 kill "eco-83")
             (0 kill "crate-2470")
             (0 kill "villagea-part-3")
             (0 kill "villagea-part-15")
             (0 kill "villagea-part-22")
             (0 kill "villagea-part-28")
             (0 kill "explorer-4")
             (0 kill "oracle-1")
             (0 kill "crate-3141")
             (0 kill "crate-3145")
             (0 kill "water-vol-8")
             (0 kill "water-vol-63")
             (0 kill "lrocklrg-1")
             (0 kill "crate-2469")
             (0 kill "villagea-part-69")
             (0 display-level beach special)
             )
           )
         )
       )
     )
    (((task-status need-reward-speech))
     (if (not arg0)
         (set! (-> obj will-talk) #t)
         )
     (case (current-task (-> obj tasks))
       (((game-task jungle-lurkerm))
        (mayor-lurkerm-reward-speech obj arg0)
        )
       (else
         (cond
           (arg0
             (set! (-> obj cell-for-task) (current-task (-> obj tasks)))
             (close-current! (-> obj tasks))
             (send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc)))
             )
           (else
             (set! (-> obj talk-message) (game-text-id press-to-trade-money))
             )
           )
         (new 'static 'spool-anim
           :name "mayor-resolution-donation"
           :index 8
           :parts 5
           :command-list '((0 kill "villagea-part-65")
             (0 kill "villagea-part-70")
             (0 kill "med-res-level-2")
             (0 kill "med-res-level-3")
             (0 kill "med-res-level-4")
             (0 kill "med-res-level-6")
             (0 kill "med-res-level-7")
             (0 kill "med-res-level-8")
             (0 kill "med-res-level-11")
             (0 kill "med-res-level-14")
             (0 kill "fishermans-boat-2")
             (0 kill "windspinner-9")
             (0 kill "sagesail-6")
             (0 kill "sharkey-12")
             (0 kill "windmill-sail-4")
             (0 kill "water-vol-7")
             (0 kill "windspinner-8")
             (0 kill "villagea-part-32")
             (0 kill "water-vol-10")
             (0 kill "ropebridge-4")
             (0 kill "ropebridge-5")
             (0 kill "reflector-end-1")
             (0 kill "eco-10")
             (0 kill "eco-11")
             (0 kill "warp-gate-switch-3")
             (0 kill "reflector-middle-2")
             (0 kill "evilplant-2")
             (0 kill "crate-3147")
             (0 kill "villagea-water-2")
             (0 kill "med-res-level-22")
             (0 kill "med-res-level-23")
             (0 kill "villagea-part-50")
             (0 kill "water-vol-9")
             (0 kill "crate-3144")
             (0 kill "orb-cache-top-4")
             (0 kill "village-cam-2")
             (0 kill "villagea-part-18")
             (0 kill "villagea-part-24")
             (0 kill "money-2676")
             (0 kill "villagea-part-64")
             (0 kill "villagea-part-13")
             (0 kill "villagea-part-17")
             (0 kill "money-2689")
             (0 kill "money-2690")
             (0 kill "farmer-3")
             (0 kill "villagea-part-26")
             (0 kill "money-2692")
             (0 kill "villagea-part-37")
             (0 kill "villagea-part-38")
             (0 kill "villagea-part-64")
             (0 kill "crate-3142")
             (0 kill "crate-3143")
             (0 kill "money-2688")
             (0 kill "villagea-part-14")
             (0 kill "money-2691")
             (0 kill "villagea-part-62")
             (0 kill "villagea-part-63")
             (0 kill "sharkey-1")
             (0 kill "eco-82")
             (0 kill "eco-83")
             (0 kill "crate-2470")
             (0 kill "villagea-part-3")
             (0 kill "villagea-part-15")
             (0 kill "villagea-part-22")
             (0 kill "villagea-part-28")
             (0 kill "explorer-4")
             (0 kill "oracle-1")
             (0 kill "crate-3141")
             (0 kill "crate-3145")
             (0 kill "water-vol-8")
             (0 kill "water-vol-63")
             (0 kill "lrocklrg-1")
             (0 kill "crate-2469")
             (0 kill "villagea-part-69")
             (0 display-level beach special)
             )
           )
         )
       )
     )
    (else
      (if arg0
          (format
            0
            "ERROR: <GMJ>: ~S playing anim for task status ~S~%"
            (-> obj name)
            (task-status->string (current-status (-> obj tasks)))
            )
          )
      (-> obj draw art-group data 3)
      )
    )
  )

;; definition for method 31 of type mayor
(defmethod get-art-elem mayor ((obj mayor))
  (-> obj draw art-group data 3)
  )

;; definition for method 39 of type mayor
(defmethod should-display? mayor ((obj mayor))
  (if *target*
      (< (- (-> (target-pos 0) z) (-> obj root-override trans z)) 57344.0)
      (< (- (-> (camera-pos) z) (-> obj root-override trans z)) 57344.0)
      )
  )

;; definition for method 43 of type mayor
(defmethod TODO-RENAME-43 mayor ((obj mayor))
  (when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
    (let ((f0-2 (rand-float-gen)))
      (cond
        ((< 0.8888889 f0-2)
         (if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
             (play-ambient (-> obj ambient) "CHI-LO01" #f (-> obj root-override trans))
             )
         )
        ((< 0.7777778 f0-2)
         (if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
             (play-ambient (-> obj ambient) "CHI-LO02" #f (-> obj root-override trans))
             )
         )
        ((< 0.6666667 f0-2)
         (if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
             (play-ambient (-> obj ambient) "CHI-AM07" #f (-> obj root-override trans))
             )
         )
        ((< 0.5555556 f0-2)
         (play-ambient (-> obj ambient) "CHI-AM06" #f (-> obj root-override trans))
         )
        ((< 0.44444445 f0-2)
         (play-ambient (-> obj ambient) "CHI-AM05" #f (-> obj root-override trans))
         )
        ((< 0.33333334 f0-2)
         (play-ambient (-> obj ambient) "CHI-AM04" #f (-> obj root-override trans))
         )
        ((< 0.22222222 f0-2)
         (if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
             (play-ambient (-> obj ambient) "CHI-AM03" #f (-> obj root-override trans))
             )
         )
        ((< 0.11111111 f0-2)
         (if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
             (play-ambient (-> obj ambient) "CHI-AM02" #f (-> obj root-override trans))
             )
         )
        (else
          (if (not (closed? (-> obj tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
              (play-ambient (-> obj ambient) "CHI-AM01" #f (-> obj root-override trans))
              )
          )
        )
      )
    )
  )

;; failed to figure out what this is:
(defstate idle (mayor)
  :virtual #t
  :trans (behavior ()
    (if (not (should-display? self))
        (go-virtual hidden)
        )
    ((-> (method-of-type process-taskable idle) trans))
    (none)
    )
  :post (behavior ()
    (let ((t9-0 (-> (method-of-type process-taskable idle) post)))
      (if t9-0
          ((the-as (function none) t9-0))
          )
      )
    (do-push-aways! (-> self root-override))
    (none)
    )
  )

;; definition for method 11 of type mayor
(defmethod init-from-entity! mayor ((obj mayor) (arg0 entity-actor))
  (dummy-40 obj arg0 *mayor-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
  (set! (-> obj bounce-away) #f)
  (set! (-> obj tasks) (get-task-control (game-task jungle-lurkerm)))
  (set! (-> obj sound-flava) (music-flava mayor))
  (set! (-> obj draw light-index) (the-as uint 2))
  (dummy-42 obj)
  (none)
  )
