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

;; name: ctyfarm-obs.gc
;; name in dgo: ctyfarm-obs
;; dgos: CFB, CFA

;; DECOMP BEGINS

(defpartgroup group-farm-marrow-explode
  :id 1025
  :duration (seconds 3.335)
  :flags (use-local-clock unk-6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4462 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4463 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4464 :fade-after (meters 40) :falloff-to (meters 60) :flags (bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4465 :fade-after (meters 100) :falloff-to (meters 120) :flags (bit7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4466 :fade-after (meters 90) :falloff-to (meters 110) :flags (bit7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4467 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    )
  )

(defpart 4465
  :init-specs ((:texture (specs effects))
    (:num 32.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) (meters 2))
    (:scale-x (meters 2) (meters 0.5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 64.0 64.0)
    (:g :copy r)
    (:b 255.0)
    (:a 92.0 32.0)
    (:vel-y (meters 0.033333335) (meters 0.06666667))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:fade-a -0.16 -0.16)
    (:accel-y (meters -0.0016666667) (meters -0.00083333335))
    (:friction 0.95 0.03)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4464
  :init-specs ((:texture (lakedrop effects))
    (:num 32.0)
    (:y (meters 0) (meters 5))
    (:scale-x (meters 0.1) (meters 0.05))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g :copy r)
    (:b 128.0 32.0)
    (:a 128.0)
    (:omega (degrees 0.01575) (degrees 0.009))
    (:vel-y (meters 0.033333335) (meters 0.083333336))
    (:accel-y (meters -0.003) (meters -0.00066666666))
    (:friction 0.96 0.02)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-21))
    (:userdata 36864.0)
    (:func 'check-water-level-drop-motion)
    (:conerot-x (degrees 0) (degrees 85))
    (:conerot-y (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    (:conerot-radius (meters 0) (meters 1))
    )
  )

(defpart 4466
  :init-specs ((:texture (bigpuff effects))
    (:num 12.0 2.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) (meters 2))
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 2) (meters 2))
    (:r 32.0 32.0)
    (:g 64.0 128.0)
    (:b 255.0)
    (:a 16.0 8.0)
    (:vel-y (meters 0.06666667) (meters 0.033333335))
    (:scalevel-x (meters 0) (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y (meters 0) (meters 0.0033333334))
    (:fade-a -0.02 -0.02)
    (:accel-y (meters -0.00083333335) (meters -0.00083333335))
    (:friction 0.82 0.07)
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4467
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:y (meters 3))
    (:scale-x (meters 7))
    (:rot-x (degrees 0.675))
    (:scale-y (meters 5))
    (:r 32.0)
    (:g 128.0)
    (:b 255.0)
    (:a 64.0)
    (:omega (degrees 1136.25))
    (:scalevel-x (meters 0.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -2.56)
    (:timer (seconds 0.085))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 1024.0)
    )
  )

(defpart 4463
  :init-specs ((:texture (ctyfarm-eggplant-body ctyfarma-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 12.0 6.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) 2.0 (meters 2))
    (:scale-x (meters 0.2) (meters 0.3))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.2) (meters 0.3))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.083333336) (meters 0.1))
    (:scalevel-x (meters -0.00022222222))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:scalevel-y (meters -0.00022222222))
    (:fade-a -0.21333334 -0.21333334)
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 -1368390400 -1368390656 -1368390912))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4462
  :init-specs ((:texture (ctyfarm-eggplant-body ctyfarma-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 12.0 3.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) 2.0 (meters 2))
    (:scale-x (meters 0.5) (meters 0.5))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.5) (meters 0.5))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.1) (meters 0.13333334))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 -1368390400 -1368390656 -1368390912))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

;; WARN: Return type mismatch number vs none.
(defun check-farm-piece-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
  (if (and (>= 35225.6 (-> arg2 vector 0 y)) (>= 0.0 (-> arg1 vel-sxvel y)))
      (set! (-> arg2 vector 0 y) 35225.6)
      (set! (-> arg1 next-time)
            (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2))
            )
      )
  (none)
  )

(defpart 4468
  :init-specs ((:rot-x (degrees 0))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0))
    (:vel-y (meters 0))
    (:rotvel-x (degrees 0))
    (:rotvel-y (degrees 0))
    (:rotvel-z (degrees 0))
    (:accel-y (meters 0))
    (:friction 0.8 0.1)
    (:timer (seconds 4))
    (:next-time (seconds 0.5) (seconds 0.997))
    (:next-launcher 4469)
    )
  )

(defpart 4469
  :init-specs ((:fade-a -0.21333334 -0.21333334) (:flags (sp-cpuinfo-flag-2 left-multiply-quat)))
  )

(defpartgroup group-farm-beetree-explode
  :id 1026
  :duration (seconds 3.335)
  :flags (use-local-clock unk-6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4470 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4471 :fade-after (meters 100) :falloff-to (meters 120) :flags (bit7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4472 :fade-after (meters 90) :falloff-to (meters 110) :flags (bit7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4473 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    (sp-item 4474 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4475 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.05))
    )
  )

(defpart 4475
  :init-specs ((:texture (ctyfarm-chili-stem ctyfarma-sprite))
    (:num 12.0 6.0)
    (:y (meters 0.5) (meters 9))
    (:z (meters -1) 2.0 (meters 2))
    (:scale-x (meters 0.2) (meters 0.2))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.4) (meters 0.3))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.083333336) (meters 0.1))
    (:scalevel-x (meters -0.00022222222))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:scalevel-y (meters -0.00022222222))
    (:fade-a -0.21333334 -0.21333334)
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4474
  :init-specs ((:texture (ctyfarm-chili-stem ctyfarma-sprite))
    (:num 12.0 3.0)
    (:y (meters 0.5) (meters 9))
    (:z (meters -1) 2.0 (meters 2))
    (:scale-x (meters 0.4) (meters 0.4))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 1) (meters 0.5))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.1) (meters 0.13333334))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-cabbage-explode
  :id 1027
  :duration (seconds 3.335)
  :flags (use-local-clock unk-6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4476 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4477 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4478 :fade-after (meters 40) :falloff-to (meters 60) :flags (bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4479 :fade-after (meters 100) :falloff-to (meters 120) :flags (bit7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4480 :fade-after (meters 90) :falloff-to (meters 110) :flags (bit7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4481 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    )
  )

(defpart 4479
  :init-specs ((:texture (specs effects))
    (:num 32.0)
    (:y (meters 0.5) (meters 3))
    (:z (meters -4) (meters 8))
    (:scale-x (meters 2) (meters 0.5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 196.0 64.0)
    (:g 255.0)
    (:b 0.0 64.0)
    (:a 92.0 32.0)
    (:vel-y (meters 0.033333335) (meters 0.06666667))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:fade-a -0.16 -0.16)
    (:accel-y (meters -0.0016666667) (meters -0.00083333335))
    (:friction 0.95 0.03)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4478
  :init-specs ((:texture (lakedrop effects))
    (:num 32.0)
    (:y (meters 0) (meters 2))
    (:scale-x (meters 0.1) (meters 0.05))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 128.0 64.0)
    (:g 255.0)
    (:b 0.0 128.0)
    (:a 128.0)
    (:omega (degrees 0.01575) (degrees 0.009))
    (:vel-y (meters 0.06666667) (meters 0.083333336))
    (:accel-y (meters -0.003) (meters -0.00066666666))
    (:friction 0.96 0.02)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-21))
    (:userdata 36864.0)
    (:func 'check-water-level-drop-motion)
    (:conerot-x (degrees 0) (degrees 85))
    (:conerot-y (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    (:conerot-radius (meters 0) (meters 1))
    )
  )

(defpart 4480
  :init-specs ((:texture (bigpuff effects))
    (:num 12.0 2.0)
    (:y (meters 0.5) (meters 3))
    (:z (meters -4) (meters 8))
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 2) (meters 2))
    (:r 196.0 64.0)
    (:g 255.0)
    (:b 0.0 64.0)
    (:a 16.0 8.0)
    (:vel-y (meters 0.06666667) (meters 0.033333335))
    (:scalevel-x (meters 0) (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y (meters 0) (meters 0.0033333334))
    (:fade-a -0.02 -0.02)
    (:accel-y (meters -0.00083333335) (meters -0.00083333335))
    (:friction 0.82 0.07)
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4481
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:y (meters 1.5))
    (:scale-x (meters 3))
    (:rot-x (degrees 0.675))
    (:scale-y (meters 5))
    (:r 128.0)
    (:g 255.0)
    (:b 0.0)
    (:a 64.0)
    (:omega (degrees 1136.25))
    (:scalevel-x (meters 0.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -2.56)
    (:timer (seconds 0.085))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 1024.0)
    )
  )

(defpart 4477
  :init-specs ((:texture (ctyfarm-cab-body ctyfarma-sprite))
    (:num 12.0 6.0)
    (:y (meters 0.5) (meters 2))
    (:z (meters -1.5) 2.0 (meters 3))
    (:scale-x (meters 0.5) (meters 0.3))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.5) (meters 0.3))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.083333336) (meters 0.1))
    (:scalevel-x (meters -0.00022222222))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:scalevel-y (meters -0.00022222222))
    (:fade-a -0.21333334 -0.21333334)
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4476
  :init-specs ((:texture (ctyfarm-cab-body ctyfarma-sprite))
    (:num 12.0 3.0)
    (:y (meters 0.5) (meters 2))
    (:z (meters -1.5) 2.0 (meters 3))
    (:scale-x (meters 1) (meters 0.5))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 1) (meters 0.5))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.1) (meters 0.13333334))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-small-cabbage-explode
  :id 1028
  :duration (seconds 3.335)
  :flags (use-local-clock unk-6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4470 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4471 :fade-after (meters 100) :falloff-to (meters 120) :flags (bit7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4472 :fade-after (meters 90) :falloff-to (meters 110) :flags (bit7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4473 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    )
  )

(defpart 4471
  :init-specs ((:texture (specs effects))
    (:num 20.0)
    (:y (meters 0.5) (meters 2))
    (:z (meters -2) (meters 4))
    (:scale-x (meters 1) (meters 0.5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 196.0 64.0)
    (:g 255.0)
    (:b 0.0 64.0)
    (:a 92.0 32.0)
    (:vel-y (meters 0.033333335) (meters 0.06666667))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:fade-a -0.16 -0.16)
    (:accel-y (meters -0.0016666667) (meters -0.00083333335))
    (:friction 0.95 0.03)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4472
  :init-specs ((:texture (bigpuff effects))
    (:num 8.0 2.0)
    (:y (meters 0.5) (meters 2))
    (:z (meters -2) (meters 4))
    (:scale-x (meters 1) (meters 1))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 1) (meters 1))
    (:r 196.0 64.0)
    (:g 255.0)
    (:b 0.0 64.0)
    (:a 16.0 8.0)
    (:vel-y (meters 0.06666667) (meters 0.033333335))
    (:scalevel-x (meters 0) (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y (meters 0) (meters 0.0033333334))
    (:fade-a -0.02 -0.02)
    (:accel-y (meters -0.00083333335) (meters -0.00083333335))
    (:friction 0.82 0.07)
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4473
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:y (meters 1.5))
    (:scale-x (meters 2))
    (:rot-x (degrees 0.675))
    (:scale-y (meters 3.5))
    (:r 128.0)
    (:g 255.0)
    (:b 0.0)
    (:a 64.0)
    (:omega (degrees 1136.25))
    (:scalevel-x (meters 0.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -2.56)
    (:timer (seconds 0.085))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 1024.0)
    )
  )

(defpart 4470
  :init-specs ((:texture (ctyfarm-cab-body ctyfarma-sprite))
    (:num 12.0 6.0)
    (:y (meters 0.5) (meters 1))
    (:z (meters -1.5) 2.0 (meters 3))
    (:scale-x (meters 0.5) (meters 0.3))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.5) (meters 0.3))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.083333336) (meters 0.1))
    (:scalevel-x (meters -0.00022222222))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:scalevel-y (meters -0.00022222222))
    (:fade-a -0.21333334 -0.21333334)
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-chilirots-explode
  :id 1029
  :duration (seconds 3.335)
  :flags (use-local-clock unk-6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4482 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4483 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d bit7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4484 :fade-after (meters 90) :falloff-to (meters 110) :flags (bit7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4485 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    (sp-item 4486 :fade-after (meters 100) :falloff-to (meters 120) :flags (bit7) :period (seconds 4) :length (seconds 0.1))
    )
  )

(defpart 4486
  :init-specs ((:texture (specs effects))
    (:num 32.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) (meters 2))
    (:scale-x (meters 2) (meters 0.5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 64.0 64.0)
    (:g 0.0 32.0)
    (:b 0.0)
    (:a 92.0 32.0)
    (:vel-y (meters 0.033333335) (meters 0.06666667))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:fade-a -0.16 -0.16)
    (:accel-y (meters -0.0016666667) (meters -0.00083333335))
    (:friction 0.95 0.03)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4484
  :init-specs ((:texture (bigpuff effects))
    (:num 12.0 2.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) (meters 2))
    (:scale-x (meters 2) (meters 2))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 2) (meters 2))
    (:r 64.0)
    (:g 0.0 16.0)
    (:b 0.0)
    (:a 16.0 8.0)
    (:vel-y (meters 0.06666667) (meters 0.033333335))
    (:scalevel-x (meters 0) (meters 0.0033333334))
    (:rotvel-z (degrees -0.2) (degrees 0.4))
    (:scalevel-y (meters 0) (meters 0.0033333334))
    (:fade-a -0.02 -0.02)
    (:accel-y (meters -0.00083333335) (meters -0.00083333335))
    (:friction 0.82 0.07)
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4485
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:y (meters 3))
    (:scale-x (meters 7))
    (:rot-x (degrees 0.675))
    (:scale-y (meters 5))
    (:r 255.0)
    (:g 0.0)
    (:b 0.0)
    (:a 64.0)
    (:omega (degrees 1136.25))
    (:scalevel-x (meters 0.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -2.56)
    (:timer (seconds 0.085))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 1024.0)
    )
  )

(defpart 4483
  :init-specs ((:texture (ctyfarm-chili-stem ctyfarma-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 12.0 6.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) 2.0 (meters 2))
    (:scale-x (meters 0.2) (meters 0.3))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.2) (meters 0.3))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.083333336) (meters 0.1))
    (:scalevel-x (meters -0.00022222222))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:scalevel-y (meters -0.00022222222))
    (:fade-a -0.21333334 -0.21333334)
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 -1368391424 -1368391168))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4482
  :init-specs ((:texture (ctyfarm-chili-stem ctyfarma-sprite))
    (:birth-func 'birth-func-texture-group)
    (:num 12.0 3.0)
    (:y (meters 0.5) (meters 5))
    (:z (meters -1) 2.0 (meters 2))
    (:scale-x (meters 0.5) (meters 0.5))
    (:rot-x (degrees 0) (degrees 3600))
    (:rot-y (degrees 0) (degrees 3600))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 0.5) (meters 0.5))
    (:r 64.0 128.0)
    (:g :copy r)
    (:b :copy g)
    (:a 128.0)
    (:vel-y (meters 0.1) (meters 0.13333334))
    (:rotvel-x (degrees -4.8) (degrees 9.6))
    (:rotvel-y (degrees -4.8) (degrees 9.6))
    (:rotvel-z (degrees -4.8) (degrees 9.6))
    (:accel-y (meters -0.0033333334) (meters -0.0016666667))
    (:friction 0.92 0.07)
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 -1368391424 -1368391168))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4468)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-sprinkler-barrels-water
  :id 1030
  :duration (seconds 0.5)
  :linger-duration (seconds 1)
  :flags (use-local-clock unk-4)
  :bounds (static-bspherem 0 0 0 128)
  :parts ((sp-item 4487 :fade-after (meters 300) :falloff-to (meters 300) :flags (bit7) :period (seconds 2) :length (seconds 0.167) :offset 80)
    (sp-item 4488 :fade-after (meters 200) :falloff-to (meters 300) :flags (bit7) :period (seconds 2) :length (seconds 0.167) :offset 80)
    (sp-item 4489 :fade-after (meters 180) :falloff-to (meters 180) :flags (bit7) :period (seconds 2) :length (seconds 0.335) :offset 30)
    (sp-item 4489 :fade-after (meters 180) :falloff-to (meters 180) :flags (bit7) :period (seconds 2) :length (seconds 0.25) :offset 55)
    (sp-item 4489 :fade-after (meters 180) :falloff-to (meters 180) :flags (bit7) :period (seconds 2) :length (seconds 0.335) :offset 80)
    (sp-item 4490 :fade-after (meters 100) :falloff-to (meters 100) :flags (bit7) :period (seconds 2) :length (seconds 0.167) :offset 80)
    )
  )

(defpart 4488
  :init-specs ((:texture (bigpuff effects))
    (:num 6.0 1.0)
    (:z (meters -0.5))
    (:scale-x (meters 1) (meters 0.1))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 32.0 64.0)
    (:vel-z (meters 0.2) (meters 0.06666667))
    (:scalevel-x (meters 0.026666667) (meters 0.01))
    (:rotvel-z (degrees -0.6) (degrees 1.2))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.28444445 -0.28444445)
    (:accel-y (meters -0.00033333333) (meters -0.00033333333))
    (:friction 0.8 0.08)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12 use-global-acc))
    (:launchrot-x (degrees -15) (degrees 30))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4487
  :init-specs ((:texture (lakedrop effects))
    (:num 10.0 1.0)
    (:z (meters -0.5))
    (:scale-x (meters 0.1) (meters 0.1))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 128.0)
    (:omega (degrees 0.0225))
    (:vel-z (meters 0.2) (meters 0.06666667))
    (:accel-y (meters -0.0033333334) (meters 0.00033333333))
    (:friction 0.99)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12 use-global-acc))
    (:userdata 32768.0)
    (:func 'check-drop-level-ctyfarma-drop-userdata)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4491)
    (:launchrot-x (degrees -5) (degrees 10))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4489
  :init-specs ((:texture (lakedrop effects))
    (:num 2.0 0.5)
    (:z (meters -0.5))
    (:scale-x (meters 0.1) (meters 0.1))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 128.0)
    (:omega (degrees 0.0225))
    (:vel-z (meters 0.13333334) (meters 0.13333334))
    (:accel-y (meters -0.0033333334) (meters 0.00033333333))
    (:friction 0.99)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12 use-global-acc))
    (:userdata 32768.0)
    (:func 'check-drop-level-ctyfarma-drop-userdata)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4491)
    (:launchrot-x (degrees -16) (degrees 32))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4490
  :init-specs ((:texture (lakedrop effects))
    (:num 2.0 0.5)
    (:z (meters -0.5))
    (:scale-x (meters 0.1) (meters 0.1))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 128.0)
    (:omega (degrees 0.0225))
    (:vel-z (meters 0.1) (meters 0.06666667))
    (:accel-y (meters -0.0033333334) (meters 0.00033333333))
    (:friction 0.99)
    (:timer (seconds 1.5))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12 use-global-acc))
    (:userdata 32768.0)
    (:func 'check-drop-level-ctyfarma-drop-userdata)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4491)
    (:launchrot-x (degrees -70) (degrees 140))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(deftype shaker (structure)
  ((axis          vector  :inline)
   (start-time    time-frame)
   (decay-time    float)
   (amplitude     float)
   (freq          float)
   (y-decay-time  float)
   (y-amplitude   float)
   (y-freq        float)
   (shake         float)
   (y-shake       float)
   )
  (:methods
    (shaker-method-9 (_type_) none)
    )
  )


;; WARN: Return type mismatch float vs none.
(defmethod shaker-method-9 ((this shaker))
  (let ((s5-0 (- (current-time) (-> this start-time))))
    (set! (-> this shake) (* (-> this amplitude)
                             (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this decay-time))
                             (cos (* 65536.0 (/ (the float s5-0) (-> this freq))))
                             )
          )
    (set! (-> this y-shake) (* (-> this y-amplitude)
                               (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this y-decay-time))
                               (cos (* 65536.0 (/ (the float s5-0) (-> this y-freq))))
                               )
          )
    )
  (none)
  )

;; WARN: Return type mismatch int vs knocked-type.
(defun pu->knocked-type ((arg0 penetrate))
  (the-as knocked-type (cond
                         ((logtest? arg0 (penetrate vehicle))
                          7
                          )
                         ((logtest? (penetrate jak-blue-shot) arg0)
                          6
                          )
                         ((logtest? (penetrate jak-yellow-shot enemy-yellow-shot) arg0)
                          4
                          )
                         ((logtest? (penetrate jak-red-shot) arg0)
                          5
                          )
                         ((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0)
                          2
                          )
                         ((logtest? (penetrate dark-bomb dark-giant) arg0)
                          3
                          )
                         ((logtest? arg0 (penetrate mech-punch))
                          1
                          )
                         (else
                           0
                           )
                         )
          )
  )

(defskelgroup skel-farm-marrow farm-marrow farm-marrow-lod0-jg farm-marrow-idle-ja
              ((farm-marrow-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 2.4 0 4)
              )

(defskelgroup skel-farm-marrow-explode farm-marrow farm-marrow-explode-lod0-jg farm-marrow-explode-idle-ja
              ((farm-marrow-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 80)
              )

(define *farm-marrow-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
      )
    :collide-spec #x1
    )
  )

(deftype farm-marrow (process-focusable)
  ((shakers             shaker  5 :inline)
   (incoming-attack-id  uint32)
   )
  (:state-methods
    idle
    die
    )
  (:methods
    (farm-marrow-method-29 (_type_) none)
    (farm-marrow-method-30 (_type_) none)
    )
  )


(defun farm-marrow-callback ((arg0 cspace) (arg1 transformq))
  (let ((s4-0 (the-as farm-marrow (-> arg0 param1)))
        (s3-0 (the-as int (-> arg0 param2)))
        )
    (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle!
                                                  (new 'stack-no-clear 'quaternion)
                                                  (the-as vector (-> s4-0 shakers s3-0))
                                                  (-> s4-0 shakers s3-0 shake)
                                                  )
                  )
    (quaternion-rotate-local-y! (-> arg1 quat) (-> arg1 quat) (-> s4-0 shakers s3-0 y-shake))
    (if (< (the int (-> s4-0 shakers s3-0 decay-time)) (- (current-time) (-> s4-0 shakers s3-0 start-time)))
        (set! (-> arg0 param0) #f)
        )
    )
  (cspace<-parented-transformq-joint! arg0 arg1)
  0
  (none)
  )

(defstate die (farm-marrow)
  :virtual #t
  :enter #f
  :exit #f
  :trans #f
  :code (behavior ()
    (let ((v1-1 (-> self root root-prim)))
      (set! (-> v1-1 prim-core collide-as) (collide-spec))
      (set! (-> v1-1 prim-core collide-with) (collide-spec))
      )
    0
    (logior! (-> self draw status) (draw-control-status no-draw))
    (while (-> self child)
      (suspend)
      )
    (cleanup-for-death self)
    )
  :post #f
  )

(defstate idle (farm-marrow)
  :virtual #t
  :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
    (case message
      (('attack)
       (let ((a1-1 (the-as object (-> block param 1)))
             (a0-2 proc)
             )
         (when (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id))
           (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id))
           (when a0-2
             (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1))))
               (when s5-0
                 (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)))
                   (cond
                     ((and (not (logtest? (penetrate dark-skin) a0-4)) (zero? (pu->knocked-type a0-4)))
                      (sound-play "hit-veggies")
                      (let ((gp-4 (new 'stack-no-clear 'vector)))
                        (vector-inv-orient-by-quat!
                          gp-4
                          (vector-cross!
                            (new 'stack-no-clear 'vector)
                            (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0)
                            *up-vector*
                            )
                          (-> self root quat)
                          )
                        (let ((v1-10 (-> self shakers)))
                          (set! (-> v1-10 0 axis quad) (-> gp-4 quad))
                          (set-time! (-> v1-10 0 start-time))
                          (set! (-> v1-10 0 decay-time) 300.0)
                          (set! (-> v1-10 0 freq) 150.0)
                          (set! (-> v1-10 0 amplitude) 1820.4445)
                          (set! (-> v1-10 0 y-amplitude) 0.0)
                          )
                        (let ((a0-17 (joint-node farm-marrow-lod0-jg marrow_a)))
                          (set! (-> a0-17 param0) farm-marrow-callback)
                          (set! (-> a0-17 param1) self)
                          (set! (-> a0-17 param2) (the-as basic 0))
                          )
                        (let ((v1-13 (-> self shakers 1)))
                          (set! (-> v1-13 axis quad) (-> gp-4 quad))
                          (set! (-> v1-13 start-time) (+ (current-time) (seconds -0.06)))
                          (set! (-> v1-13 decay-time) 450.0)
                          (set! (-> v1-13 freq) 150.0)
                          (set! (-> v1-13 amplitude) 1820.4445)
                          (set! (-> v1-13 y-amplitude) 0.0)
                          )
                        (let ((v1-15 (joint-node farm-marrow-lod0-jg marrow_b)))
                          (set! (-> v1-15 param0) farm-marrow-callback)
                          (set! (-> v1-15 param1) self)
                          (set! (-> v1-15 param2) (the-as basic 1))
                          )
                        (let ((v1-16 (-> self shakers 2)))
                          (set! (-> v1-16 axis quad) (-> gp-4 quad))
                          (set! (-> v1-16 start-time) (+ (current-time) (seconds -0.12)))
                          (set! (-> v1-16 decay-time) 600.0)
                          (set! (-> v1-16 freq) 150.0)
                          (set! (-> v1-16 amplitude) 1820.4445)
                          (set! (-> v1-16 y-amplitude) 0.0)
                          )
                        (let ((v1-18 (joint-node farm-marrow-lod0-jg marrow_c)))
                          (set! (-> v1-18 param0) farm-marrow-callback)
                          (set! (-> v1-18 param1) self)
                          (set! (-> v1-18 param2) (the-as basic 2))
                          )
                        (let ((v1-19 (-> self shakers 3)))
                          (set! (-> v1-19 axis quad) (-> gp-4 quad))
                          (set! (-> v1-19 start-time) (+ (current-time) (seconds -0.06)))
                          (set! (-> v1-19 decay-time) 300.0)
                          (set! (-> v1-19 freq) 150.0)
                          (set! (-> v1-19 amplitude) 910.2222)
                          (set! (-> v1-19 y-decay-time) 300.0)
                          (set! (-> v1-19 y-freq) 150.0)
                          (set! (-> v1-19 y-amplitude) -1820.4445)
                          )
                        (let ((v1-21 (joint-node farm-marrow-lod0-jg leaves_a)))
                          (set! (-> v1-21 param0) farm-marrow-callback)
                          (set! (-> v1-21 param1) self)
                          (set! (-> v1-21 param2) (the-as basic 3))
                          )
                        (let ((v1-22 (-> self shakers 4)))
                          (set! (-> v1-22 axis quad) (-> gp-4 quad))
                          (set! (-> v1-22 start-time) (+ (current-time) (seconds -0.12)))
                          (set! (-> v1-22 decay-time) 600.0)
                          (set! (-> v1-22 freq) 150.0)
                          (set! (-> v1-22 amplitude) 910.2222)
                          (set! (-> v1-22 y-amplitude) 0.0)
                          )
                        )
                      (let ((v0-0 (the-as object (joint-node farm-marrow-lod0-jg leaves_b))))
                        (set! (-> (the-as cspace v0-0) param0) farm-marrow-callback)
                        (set! (-> (the-as cspace v0-0) param1) self)
                        (set! (-> (the-as cspace v0-0) param2) (the-as basic 4))
                        v0-0
                        )
                      )
                     (else
                       (sound-play "veggie-burst")
                       (let ((gp-6 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
                         (set! (-> gp-6 fountain-rand-transv-lo quad) (-> s5-0 root trans quad))
                         (set! (-> gp-6 fountain-rand-transv-hi x) 4096.0)
                         (set! (-> gp-6 fountain-rand-transv-hi y) 122880.0)
                         (process-spawn
                           part-tracker
                           :init part-tracker-init
                           (-> *part-group-id-table* 1025)
                           300
                           #f
                           #f
                           #f
                           (-> self node-list data 3 bone transform)
                           :to self
                           )
                         (process-spawn
                           joint-exploder
                           (art-group-get-by-name *level* "skel-farm-marrow-explode" (the-as (pointer uint32) #f))
                           5
                           gp-6
                           *farm-marrow-exploder-params*
                           :to self
                           )
                         )
                       (go-virtual die)
                       )
                     )
                   )
                 )
               )
             )
           )
         )
       )
      )
    )
  :exit (behavior ()
    '()
    )
  :code sleep-code
  :post (behavior ()
    (dotimes (gp-0 5)
      (shaker-method-9 (-> self shakers gp-0))
      )
    (transform-post)
    )
  )

(defmethod farm-marrow-method-29 ((this farm-marrow))
  (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s5-0 reaction) cshape-reaction-default)
    (set! (-> s5-0 no-reaction)
          (the-as (function collide-shape-moving collide-query vector vector object) nothing)
          )
    (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-6 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-6 prim-core action) (collide-action solid rideable))
      (set! (-> v1-6 transform-index) 3)
      (set-vector! (-> v1-6 local-sphere) 0.0 9830.4 0.0 16384.0)
      (set! (-> s5-0 total-prims) (the-as uint 1))
      (set! (-> s5-0 root-prim) v1-6)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-9 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod farm-marrow-method-30 ((this farm-marrow))
  (logior! (-> this mask) (process-mask crate))
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this farm-marrow) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (farm-marrow-method-29 this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-farm-marrow" (the-as (pointer uint32) #f)))
    (the-as pair 0)
    )
  (farm-marrow-method-30 this)
  (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
  (let ((f0-2 (rand-vu-float-range 0.9 1.1)))
    (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)
    )
  (transform-post)
  (go (method-of-object this idle))
  (none)
  )

(defskelgroup skel-farm-beetree farm-beetree farm-beetree-lod0-jg farm-beetree-idle-ja
              ((farm-beetree-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 4 0 7)
              )

(defskelgroup skel-farm-beetree-explode farm-beetree farm-beetree-explode-lod0-jg farm-beetree-explode-idle-ja
              ((farm-beetree-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 80)
              )

(define *farm-beetree-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
      )
    :collide-spec #x1
    )
  )

(deftype farm-beetree (process-focusable)
  ((shakers             shaker  2 :inline)
   (incoming-attack-id  uint32)
   )
  (:state-methods
    idle
    die
    )
  (:methods
    (farm-beetree-method-29 (_type_) none)
    (farm-beetree-method-30 (_type_) none)
    )
  )


(defun farm-beetree-callback ((arg0 cspace) (arg1 transformq))
  (let ((s4-0 (the-as farm-beetree (-> arg0 param1)))
        (s3-0 (the-as int (-> arg0 param2)))
        )
    (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle!
                                                  (new 'stack-no-clear 'quaternion)
                                                  (the-as vector (-> s4-0 shakers s3-0))
                                                  (-> s4-0 shakers s3-0 shake)
                                                  )
                  )
    (quaternion-rotate-local-y! (-> arg1 quat) (-> arg1 quat) (-> s4-0 shakers s3-0 y-shake))
    (if (< (the int (-> s4-0 shakers s3-0 decay-time)) (- (current-time) (-> s4-0 shakers s3-0 start-time)))
        (set! (-> arg0 param0) #f)
        )
    )
  (cspace<-parented-transformq-joint! arg0 arg1)
  0
  (none)
  )

(defstate die (farm-beetree)
  :virtual #t
  :enter #f
  :exit #f
  :trans #f
  :code (behavior ()
    (let ((v1-1 (-> self root root-prim)))
      (set! (-> v1-1 prim-core collide-as) (collide-spec))
      (set! (-> v1-1 prim-core collide-with) (collide-spec))
      )
    0
    (logior! (-> self draw status) (draw-control-status no-draw))
    (while (-> self child)
      (suspend)
      )
    (cleanup-for-death self)
    )
  :post #f
  )

(defstate idle (farm-beetree)
  :virtual #t
  :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
    (case message
      (('attack)
       (let ((a1-1 (the-as object (-> block param 1)))
             (a0-2 proc)
             )
         (when (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id))
           (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id))
           (when a0-2
             (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1))))
               (when s5-0
                 (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)))
                   (cond
                     ((and (not (logtest? (penetrate dark-skin) a0-4)) (zero? (pu->knocked-type a0-4)))
                      (sound-play "hit-veggies")
                      (let ((gp-4 (new 'stack-no-clear 'vector)))
                        (vector-inv-orient-by-quat!
                          gp-4
                          (vector-cross!
                            (new 'stack-no-clear 'vector)
                            (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0)
                            *up-vector*
                            )
                          (-> self root quat)
                          )
                        (let ((v1-10 (-> self shakers)))
                          (set! (-> v1-10 0 axis quad) (-> gp-4 quad))
                          (set-time! (-> v1-10 0 start-time))
                          (set! (-> v1-10 0 decay-time) 300.0)
                          (set! (-> v1-10 0 freq) 150.0)
                          (set! (-> v1-10 0 amplitude) 1820.4445)
                          (set! (-> v1-10 0 y-amplitude) 0.0)
                          )
                        (let ((a0-17 (joint-node farm-beetree-lod0-jg bulb)))
                          (set! (-> a0-17 param0) farm-beetree-callback)
                          (set! (-> a0-17 param1) self)
                          (set! (-> a0-17 param2) (the-as basic 0))
                          )
                        (let ((v1-13 (-> self shakers 1)))
                          (set! (-> v1-13 axis quad) (-> gp-4 quad))
                          (set! (-> v1-13 start-time) (+ (current-time) (seconds -0.06)))
                          (set! (-> v1-13 decay-time) 600.0)
                          (set! (-> v1-13 freq) 150.0)
                          (set! (-> v1-13 amplitude) 364.0889)
                          (set! (-> v1-13 y-decay-time) 450.0)
                          (set! (-> v1-13 y-freq) 150.0)
                          (set! (-> v1-13 y-amplitude) 3640.889)
                          )
                        )
                      (let ((v0-0 (the-as object (joint-node farm-beetree-lod0-jg leaves))))
                        (set! (-> (the-as cspace v0-0) param0) farm-beetree-callback)
                        (set! (-> (the-as cspace v0-0) param1) self)
                        (set! (-> (the-as cspace v0-0) param2) (the-as basic 1))
                        v0-0
                        )
                      )
                     (else
                       (sound-play "veggie-burst")
                       (let ((gp-6 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
                         (set! (-> gp-6 fountain-rand-transv-lo quad) (-> s5-0 root trans quad))
                         (set! (-> gp-6 fountain-rand-transv-hi x) 4096.0)
                         (set! (-> gp-6 fountain-rand-transv-hi y) 122880.0)
                         (process-spawn
                           part-tracker
                           :init part-tracker-init
                           (-> *part-group-id-table* 1026)
                           300
                           #f
                           #f
                           #f
                           (-> self node-list data 3 bone transform)
                           :to self
                           )
                         (process-spawn
                           joint-exploder
                           (art-group-get-by-name *level* "skel-farm-beetree-explode" (the-as (pointer uint32) #f))
                           5
                           gp-6
                           *farm-beetree-exploder-params*
                           :to self
                           )
                         )
                       (go-virtual die)
                       )
                     )
                   )
                 )
               )
             )
           )
         )
       )
      )
    )
  :exit #f
  :code sleep-code
  :post (behavior ()
    (dotimes (gp-0 2)
      (shaker-method-9 (-> self shakers gp-0))
      )
    (transform-post)
    )
  )

(defmethod farm-beetree-method-29 ((this farm-beetree))
  (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s5-0 reaction) cshape-reaction-default)
    (set! (-> s5-0 no-reaction)
          (the-as (function collide-shape-moving collide-query vector vector object) nothing)
          )
    (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-6 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-6 prim-core action) (collide-action solid rideable))
      (set! (-> v1-6 transform-index) 3)
      (set-vector! (-> v1-6 local-sphere) 0.0 16384.0 0.0 28672.0)
      (set! (-> s5-0 total-prims) (the-as uint 1))
      (set! (-> s5-0 root-prim) v1-6)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-9 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod farm-beetree-method-30 ((this farm-beetree))
  (logior! (-> this mask) (process-mask crate))
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this farm-beetree) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (farm-beetree-method-29 this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-farm-beetree" (the-as (pointer uint32) #f)))
    (the-as pair 0)
    )
  (farm-beetree-method-30 this)
  (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
  (let ((f0-2 (rand-vu-float-range 0.9 1.1)))
    (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)
    )
  (transform-post)
  (go (method-of-object this idle))
  (none)
  )

(defskelgroup skel-farm-cabbage farm-cabbage farm-cabbage-lod0-jg farm-cabbage-idle-ja
              ((farm-cabbage-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 5)
              )

(defskelgroup skel-farm-cabbage-explode farm-cabbage farm-cabbage-explode-lod0-jg farm-cabbage-explode-idle-ja
              ((farm-cabbage-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 80)
              )

(define *farm-cabbage-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      )
    :collide-spec #x1
    )
  )

(deftype farm-cabbage (process-focusable)
  ((shakers             shaker  2 :inline)
   (incoming-attack-id  uint32)
   )
  (:state-methods
    idle
    die
    )
  (:methods
    (farm-cabbage-method-29 (_type_) none)
    (farm-cabbage-method-30 (_type_) none)
    )
  )


(defun farm-cabbage-callback ((arg0 cspace) (arg1 transformq))
  (let ((s4-0 (the-as farm-cabbage (-> arg0 param1)))
        (s3-0 (the-as int (-> arg0 param2)))
        )
    (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle!
                                                  (new 'stack-no-clear 'quaternion)
                                                  (the-as vector (-> s4-0 shakers s3-0))
                                                  (-> s4-0 shakers s3-0 shake)
                                                  )
                  )
    (quaternion-rotate-local-y! (-> arg1 quat) (-> arg1 quat) (-> s4-0 shakers s3-0 y-shake))
    (if (< (the int (-> s4-0 shakers s3-0 decay-time)) (- (current-time) (-> s4-0 shakers s3-0 start-time)))
        (set! (-> arg0 param0) #f)
        )
    )
  (cspace<-parented-transformq-joint! arg0 arg1)
  0
  (none)
  )

(defstate die (farm-cabbage)
  :virtual #t
  :enter #f
  :exit #f
  :trans #f
  :code (behavior ()
    (let ((v1-1 (-> self root root-prim)))
      (set! (-> v1-1 prim-core collide-as) (collide-spec))
      (set! (-> v1-1 prim-core collide-with) (collide-spec))
      )
    0
    (logior! (-> self draw status) (draw-control-status no-draw))
    (while (-> self child)
      (suspend)
      )
    (cleanup-for-death self)
    )
  :post #f
  )

(defstate idle (farm-cabbage)
  :virtual #t
  :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
    (case message
      (('attack)
       (let ((a1-1 (the-as object (-> block param 1)))
             (a0-2 proc)
             )
         (when (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id))
           (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id))
           (when a0-2
             (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1))))
               (when s5-0
                 (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)))
                   (cond
                     ((and (not (logtest? (penetrate dark-skin) a0-4)) (zero? (pu->knocked-type a0-4)))
                      (sound-play "hit-veggies")
                      (let ((gp-4 (new 'stack-no-clear 'vector)))
                        (vector-inv-orient-by-quat!
                          gp-4
                          (vector-cross!
                            (new 'stack-no-clear 'vector)
                            (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0)
                            *up-vector*
                            )
                          (-> self root quat)
                          )
                        (let ((v1-10 (-> self shakers)))
                          (set! (-> v1-10 0 axis quad) (-> gp-4 quad))
                          (set-time! (-> v1-10 0 start-time))
                          (set! (-> v1-10 0 decay-time) 300.0)
                          (set! (-> v1-10 0 freq) 150.0)
                          (set! (-> v1-10 0 amplitude) 1820.4445)
                          (set! (-> v1-10 0 y-amplitude) 0.0)
                          )
                        (let ((a0-17 (joint-node farm-cabbage-lod0-jg cabbage)))
                          (set! (-> a0-17 param0) farm-cabbage-callback)
                          (set! (-> a0-17 param1) self)
                          (set! (-> a0-17 param2) (the-as basic 0))
                          )
                        (let ((v1-13 (-> self shakers 1)))
                          (set! (-> v1-13 axis quad) (-> gp-4 quad))
                          (set! (-> v1-13 start-time) (+ (current-time) (seconds -0.06)))
                          (set! (-> v1-13 decay-time) 600.0)
                          (set! (-> v1-13 freq) 150.0)
                          (set! (-> v1-13 amplitude) 364.0889)
                          (set! (-> v1-13 y-decay-time) 450.0)
                          (set! (-> v1-13 y-freq) 150.0)
                          (set! (-> v1-13 y-amplitude) 910.2222)
                          )
                        )
                      (let ((v0-0 (the-as object (joint-node farm-cabbage-lod0-jg leaves))))
                        (set! (-> (the-as cspace v0-0) param0) farm-cabbage-callback)
                        (set! (-> (the-as cspace v0-0) param1) self)
                        (set! (-> (the-as cspace v0-0) param2) (the-as basic 1))
                        v0-0
                        )
                      )
                     (else
                       (sound-play "veggie-burst")
                       (let ((gp-6 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
                         (set! (-> gp-6 fountain-rand-transv-lo quad) (-> s5-0 root trans quad))
                         (set! (-> gp-6 fountain-rand-transv-hi x) 40960.0)
                         (set! (-> gp-6 fountain-rand-transv-hi y) 122880.0)
                         (process-spawn
                           part-tracker
                           :init part-tracker-init
                           (-> *part-group-id-table* 1027)
                           300
                           #f
                           #f
                           #f
                           (-> self node-list data 3 bone transform)
                           :to self
                           )
                         (process-spawn
                           joint-exploder
                           (art-group-get-by-name *level* "skel-farm-cabbage-explode" (the-as (pointer uint32) #f))
                           5
                           gp-6
                           *farm-cabbage-exploder-params*
                           :to self
                           )
                         )
                       (go-virtual die)
                       )
                     )
                   )
                 )
               )
             )
           )
         )
       )
      )
    )
  :exit #f
  :code sleep-code
  :post (behavior ()
    (dotimes (gp-0 2)
      (shaker-method-9 (-> self shakers gp-0))
      )
    (transform-post)
    )
  )

(defmethod farm-cabbage-method-29 ((this farm-cabbage))
  (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s5-0 reaction) cshape-reaction-default)
    (set! (-> s5-0 no-reaction)
          (the-as (function collide-shape-moving collide-query vector vector object) nothing)
          )
    (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-6 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-6 prim-core action) (collide-action solid rideable))
      (set! (-> v1-6 transform-index) 4)
      (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0)
      (set! (-> s5-0 total-prims) (the-as uint 1))
      (set! (-> s5-0 root-prim) v1-6)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-9 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod farm-cabbage-method-30 ((this farm-cabbage))
  (logior! (-> this mask) (process-mask crate))
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this farm-cabbage) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (farm-cabbage-method-29 this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-farm-cabbage" (the-as (pointer uint32) #f)))
    (the-as pair 0)
    )
  (farm-cabbage-method-30 this)
  (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
  (let ((f0-2 (rand-vu-float-range 0.9 1.1)))
    (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)
    )
  (transform-post)
  (go (method-of-object this idle))
  (none)
  )

(defskelgroup skel-farm-small-cabbage farm-small-cabbage farm-small-cabbage-lod0-jg farm-small-cabbage-idle-ja
              ((farm-small-cabbage-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 2.5)
              )

(defskelgroup skel-farm-small-cabbage-explode farm-small-cabbage farm-small-cabbage-explode-lod0-jg farm-small-cabbage-explode-idle-ja
              ((farm-small-cabbage-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 80)
              )

(define *farm-small-cabbage-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      )
    :collide-spec #x1
    )
  )

(deftype farm-small-cabbage (process-focusable)
  ((shakers             shaker  1 :inline)
   (incoming-attack-id  uint32)
   )
  (:state-methods
    idle
    die
    )
  (:methods
    (farm-small-cabbage-method-29 (_type_) none)
    (farm-small-cabbage-method-30 (_type_) none)
    )
  )


(defun farm-small-cabbage-callback ((arg0 cspace) (arg1 transformq))
  (let ((s4-0 (the-as farm-small-cabbage (-> arg0 param1)))
        (s3-0 (the-as int (-> arg0 param2)))
        )
    (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle!
                                                  (new 'stack-no-clear 'quaternion)
                                                  (the-as vector (-> s4-0 shakers s3-0))
                                                  (-> s4-0 shakers s3-0 shake)
                                                  )
                  )
    (quaternion-rotate-local-y! (-> arg1 quat) (-> arg1 quat) (-> s4-0 shakers s3-0 y-shake))
    (if (< (the int (-> s4-0 shakers s3-0 decay-time)) (- (current-time) (-> s4-0 shakers s3-0 start-time)))
        (set! (-> arg0 param0) #f)
        )
    )
  (cspace<-parented-transformq-joint! arg0 arg1)
  0
  (none)
  )

(defstate die (farm-small-cabbage)
  :virtual #t
  :enter #f
  :exit #f
  :trans #f
  :code (behavior ()
    (let ((v1-1 (-> self root root-prim)))
      (set! (-> v1-1 prim-core collide-as) (collide-spec))
      (set! (-> v1-1 prim-core collide-with) (collide-spec))
      )
    0
    (logior! (-> self draw status) (draw-control-status no-draw))
    (while (-> self child)
      (suspend)
      )
    (cleanup-for-death self)
    )
  :post #f
  )

(defstate idle (farm-small-cabbage)
  :virtual #t
  :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
    (case message
      (('attack)
       (let ((a1-1 (the-as object (-> block param 1)))
             (a0-2 proc)
             )
         (when (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id))
           (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id))
           (when a0-2
             (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1))))
               (when s5-0
                 (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)))
                   (cond
                     ((and (not (logtest? (penetrate dark-skin) a0-4)) (zero? (pu->knocked-type a0-4)))
                      (sound-play "hit-veggies")
                      (let ((gp-4 (new 'stack-no-clear 'vector)))
                        (vector-inv-orient-by-quat!
                          gp-4
                          (vector-cross!
                            (new 'stack-no-clear 'vector)
                            (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0)
                            *up-vector*
                            )
                          (-> self root quat)
                          )
                        (let ((v1-10 (-> self shakers)))
                          (set! (-> v1-10 0 axis quad) (-> gp-4 quad))
                          (set-time! (-> v1-10 0 start-time))
                          (set! (-> v1-10 0 decay-time) 300.0)
                          (set! (-> v1-10 0 freq) 150.0)
                          (set! (-> v1-10 0 amplitude) 910.2222)
                          (set! (-> v1-10 0 y-amplitude) 0.0)
                          )
                        )
                      (let ((v0-0 (the-as object (joint-node farm-small-cabbage-lod0-jg cabbage))))
                        (set! (-> (the-as cspace v0-0) param0) farm-small-cabbage-callback)
                        (set! (-> (the-as cspace v0-0) param1) self)
                        (set! (-> (the-as cspace v0-0) param2) (the-as basic 0))
                        v0-0
                        )
                      )
                     (else
                       (sound-play "veggie-burst")
                       (let ((gp-6 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
                         (set! (-> gp-6 fountain-rand-transv-lo quad) (-> s5-0 root trans quad))
                         (set! (-> gp-6 fountain-rand-transv-hi x) 4096.0)
                         (set! (-> gp-6 fountain-rand-transv-hi y) 122880.0)
                         (process-spawn
                           part-tracker
                           :init part-tracker-init
                           (-> *part-group-id-table* 1028)
                           300
                           #f
                           #f
                           #f
                           (-> self node-list data 3 bone transform)
                           :to self
                           )
                         (process-spawn
                           joint-exploder
                           (art-group-get-by-name *level* "skel-farm-small-cabbage-explode" (the-as (pointer uint32) #f))
                           5
                           gp-6
                           *farm-small-cabbage-exploder-params*
                           :to self
                           )
                         )
                       (go-virtual die)
                       )
                     )
                   )
                 )
               )
             )
           )
         )
       )
      )
    )
  :exit #f
  :code sleep-code
  :post (behavior ()
    (dotimes (gp-0 1)
      (shaker-method-9 (-> self shakers gp-0))
      )
    (transform-post)
    )
  )

(defmethod farm-small-cabbage-method-29 ((this farm-small-cabbage))
  (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s5-0 reaction) cshape-reaction-default)
    (set! (-> s5-0 no-reaction)
          (the-as (function collide-shape-moving collide-query vector vector object) nothing)
          )
    (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-6 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-6 prim-core action) (collide-action solid rideable))
      (set! (-> v1-6 transform-index) 4)
      (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 10240.0)
      (set! (-> s5-0 total-prims) (the-as uint 1))
      (set! (-> s5-0 root-prim) v1-6)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-9 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod farm-small-cabbage-method-30 ((this farm-small-cabbage))
  (logior! (-> this mask) (process-mask crate))
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this farm-small-cabbage) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (farm-small-cabbage-method-29 this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-farm-small-cabbage" (the-as (pointer uint32) #f)))
    (the-as pair 0)
    )
  (farm-small-cabbage-method-30 this)
  (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
  (let ((f0-2 (rand-vu-float-range 0.9 1.1)))
    (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)
    )
  (transform-post)
  (go (method-of-object this idle))
  (none)
  )

(defskelgroup skel-farm-chilirots farm-chilirots farm-chilirots-lod0-jg farm-chilirots-idle-ja
              ((farm-chilirots-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 2 0 4.5)
              )

(defskelgroup skel-farm-chilirots-explode farm-chilirots farm-chilirots-explode-lod0-jg farm-chilirots-explode-idle-ja
              ((farm-chilirots-explode-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 80)
              )

(define *farm-chilirots-exploder-params*
  (new 'static 'joint-exploder-static-params
    :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
      (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
      (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
      )
    :collide-spec #x1
    )
  )

(deftype farm-chilirots (process-focusable)
  ((shakers             shaker  4 :inline)
   (incoming-attack-id  uint32)
   )
  (:state-methods
    idle
    die
    )
  (:methods
    (farm-chilirots-method-29 (_type_) none)
    (farm-chilirots-method-30 (_type_) none)
    )
  )


(defun farm-chilirots-callback ((arg0 cspace) (arg1 transformq))
  (let ((s4-0 (the-as farm-chilirots (-> arg0 param1)))
        (s3-0 (the-as int (-> arg0 param2)))
        )
    (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle!
                                                  (new 'stack-no-clear 'quaternion)
                                                  (the-as vector (-> s4-0 shakers s3-0))
                                                  (-> s4-0 shakers s3-0 shake)
                                                  )
                  )
    (quaternion-rotate-local-y! (-> arg1 quat) (-> arg1 quat) (-> s4-0 shakers s3-0 y-shake))
    (if (< (the int (-> s4-0 shakers s3-0 decay-time)) (- (current-time) (-> s4-0 shakers s3-0 start-time)))
        (set! (-> arg0 param0) #f)
        )
    )
  (cspace<-parented-transformq-joint! arg0 arg1)
  0
  (none)
  )

(defstate die (farm-chilirots)
  :virtual #t
  :enter #f
  :exit #f
  :trans #f
  :code (behavior ()
    (let ((v1-1 (-> self root root-prim)))
      (set! (-> v1-1 prim-core collide-as) (collide-spec))
      (set! (-> v1-1 prim-core collide-with) (collide-spec))
      )
    0
    (logior! (-> self draw status) (draw-control-status no-draw))
    (while (-> self child)
      (suspend)
      )
    (cleanup-for-death self)
    )
  :post #f
  )

(defstate idle (farm-chilirots)
  :virtual #t
  :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
    (case message
      (('attack)
       (let ((a1-1 (the-as object (-> block param 1)))
             (a0-2 proc)
             )
         (when (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id))
           (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id))
           (when a0-2
             (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1))))
               (when s5-0
                 (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)))
                   (cond
                     ((and (not (logtest? (penetrate dark-skin) a0-4)) (zero? (pu->knocked-type a0-4)))
                      (sound-play "hit-veggies")
                      (let ((gp-4 (new 'stack-no-clear 'vector)))
                        (vector-inv-orient-by-quat!
                          gp-4
                          (vector-cross!
                            (new 'stack-no-clear 'vector)
                            (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0)
                            *up-vector*
                            )
                          (-> self root quat)
                          )
                        (let ((v1-10 (-> self shakers)))
                          (set! (-> v1-10 0 axis quad) (-> gp-4 quad))
                          (set-time! (-> v1-10 0 start-time))
                          (set! (-> v1-10 0 decay-time) 300.0)
                          (set! (-> v1-10 0 freq) 150.0)
                          (set! (-> v1-10 0 amplitude) 1820.4445)
                          (set! (-> v1-10 0 y-amplitude) 0.0)
                          )
                        (let ((a0-17 (joint-node farm-chilirots-lod0-jg chili_a)))
                          (set! (-> a0-17 param0) farm-chilirots-callback)
                          (set! (-> a0-17 param1) self)
                          (set! (-> a0-17 param2) (the-as basic 0))
                          )
                        (let ((v1-13 (-> self shakers 1)))
                          (set! (-> v1-13 axis quad) (-> gp-4 quad))
                          (set! (-> v1-13 start-time) (+ (current-time) (seconds -0.06)))
                          (set! (-> v1-13 decay-time) 450.0)
                          (set! (-> v1-13 freq) 150.0)
                          (set! (-> v1-13 amplitude) 1820.4445)
                          (set! (-> v1-13 y-decay-time) 450.0)
                          (set! (-> v1-13 y-freq) 150.0)
                          (set! (-> v1-13 y-amplitude) 1820.4445)
                          )
                        (let ((v1-15 (joint-node farm-chilirots-lod0-jg chili_b)))
                          (set! (-> v1-15 param0) farm-chilirots-callback)
                          (set! (-> v1-15 param1) self)
                          (set! (-> v1-15 param2) (the-as basic 1))
                          )
                        (let ((v1-16 (-> self shakers 2)))
                          (set! (-> v1-16 axis quad) (-> gp-4 quad))
                          (set! (-> v1-16 start-time) (+ (current-time) (seconds -0.12)))
                          (set! (-> v1-16 decay-time) 600.0)
                          (set! (-> v1-16 freq) 150.0)
                          (set! (-> v1-16 amplitude) 1820.4445)
                          (set! (-> v1-16 y-decay-time) 450.0)
                          (set! (-> v1-16 y-freq) 150.0)
                          (set! (-> v1-16 y-amplitude) 1820.4445)
                          )
                        (let ((v1-18 (joint-node farm-chilirots-lod0-jg chili_c)))
                          (set! (-> v1-18 param0) farm-chilirots-callback)
                          (set! (-> v1-18 param1) self)
                          (set! (-> v1-18 param2) (the-as basic 2))
                          )
                        (let ((v1-19 (-> self shakers 3)))
                          (set! (-> v1-19 axis quad) (-> gp-4 quad))
                          (set! (-> v1-19 start-time) (+ (current-time) (seconds -0.18)))
                          (set! (-> v1-19 decay-time) 750.0)
                          (set! (-> v1-19 freq) 150.0)
                          (set! (-> v1-19 amplitude) 1820.4445)
                          (set! (-> v1-19 y-decay-time) 450.0)
                          (set! (-> v1-19 y-freq) 150.0)
                          (set! (-> v1-19 y-amplitude) 1820.4445)
                          )
                        )
                      (let ((v0-0 (the-as object (joint-node farm-chilirots-lod0-jg chili_d))))
                        (set! (-> (the-as cspace v0-0) param0) farm-chilirots-callback)
                        (set! (-> (the-as cspace v0-0) param1) self)
                        (set! (-> (the-as cspace v0-0) param2) (the-as basic 3))
                        v0-0
                        )
                      )
                     (else
                       (sound-play "veggie-burst")
                       (let ((gp-6 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
                         (set! (-> gp-6 fountain-rand-transv-lo quad) (-> s5-0 root trans quad))
                         (set! (-> gp-6 fountain-rand-transv-hi x) 4096.0)
                         (set! (-> gp-6 fountain-rand-transv-hi y) 122880.0)
                         (process-spawn
                           part-tracker
                           :init part-tracker-init
                           (-> *part-group-id-table* 1029)
                           300
                           #f
                           #f
                           #f
                           (-> self node-list data 3 bone transform)
                           :to self
                           )
                         (process-spawn
                           joint-exploder
                           (art-group-get-by-name *level* "skel-farm-chilirots-explode" (the-as (pointer uint32) #f))
                           5
                           gp-6
                           *farm-chilirots-exploder-params*
                           :to self
                           )
                         )
                       (go-virtual die)
                       )
                     )
                   )
                 )
               )
             )
           )
         )
       )
      )
    )
  :code sleep-code
  :post (behavior ()
    (dotimes (gp-0 4)
      (shaker-method-9 (-> self shakers gp-0))
      )
    (transform-post)
    )
  )

(defmethod farm-chilirots-method-29 ((this farm-chilirots))
  (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s5-0 reaction) cshape-reaction-default)
    (set! (-> s5-0 no-reaction)
          (the-as (function collide-shape-moving collide-query vector vector object) nothing)
          )
    (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-6 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-6 prim-core action) (collide-action solid))
      (set! (-> v1-6 transform-index) 3)
      (set-vector! (-> v1-6 local-sphere) 0.0 8192.0 0.0 18432.0)
      (set! (-> s5-0 total-prims) (the-as uint 1))
      (set! (-> s5-0 root-prim) v1-6)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-9 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod farm-chilirots-method-30 ((this farm-chilirots))
  (logior! (-> this mask) (process-mask crate))
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this farm-chilirots) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (farm-chilirots-method-29 this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-farm-chilirots" (the-as (pointer uint32) #f)))
    (the-as pair 0)
    )
  (farm-chilirots-method-30 this)
  (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
  (let ((f0-2 (rand-vu-float-range 0.9 1.1)))
    (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)
    )
  (transform-post)
  (go (method-of-object this idle))
  (none)
  )

(defskelgroup skel-farm-sprinkler-barrels farm-sprinkler-barrels farm-sprinkler-barrels-lod0-jg farm-sprinkler-barrels-idle-ja
              ((farm-sprinkler-barrels-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 8 3 4)
              )

(deftype farm-sprinkler-barrels (process-focusable)
  ()
  (:state-methods
    idle
    )
  (:methods
    (farm-sprinkler-barrels-method-28 (_type_) none)
    (farm-sprinkler-barrels-method-29 (_type_) none)
    )
  )


(defstate idle (farm-sprinkler-barrels)
  :virtual #t
  :code (behavior ()
    (until #f
      (ja-no-eval :group! farm-sprinkler-barrels-idle-ja :num! (seek!) :frame-num 0.0)
      (until (ja-done? 0)
        (suspend)
        (ja :num! (seek!))
        )
      )
    #f
    )
  :post (behavior ()
    (transform-post)
    )
  )

(defmethod farm-sprinkler-barrels-method-28 ((this farm-sprinkler-barrels))
  (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
    (set! (-> s5-0 reaction) cshape-reaction-default)
    (set! (-> s5-0 no-reaction)
          (the-as (function collide-shape-moving collide-query vector vector object) nothing)
          )
    (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
      (set! (-> s5-0 total-prims) (the-as uint 3))
      (set! (-> s4-0 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> s4-0 prim-core action) (collide-action solid no-standon))
      (set-vector! (-> s4-0 local-sphere) -12288.0 32768.0 0.0 20480.0)
      (set! (-> s5-0 root-prim) s4-0)
      )
    (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-12 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-12 prim-core action) (collide-action solid no-standon))
      (set! (-> v1-12 transform-index) 5)
      (set-vector! (-> v1-12 local-sphere) 0.0 6144.0 4096.0 12288.0)
      )
    (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
      (set! (-> v1-14 prim-core collide-as) (collide-spec crate camera-blocker))
      (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list tobot))
      (set! (-> v1-14 prim-core action) (collide-action solid no-standon))
      (set! (-> v1-14 transform-index) 3)
      (set-vector! (-> v1-14 local-sphere) 0.0 6144.0 4096.0 12288.0)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-17 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod farm-sprinkler-barrels-method-29 ((this farm-sprinkler-barrels))
  (logior! (-> this mask) (process-mask crate))
  0
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this farm-sprinkler-barrels) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (farm-sprinkler-barrels-method-28 this)
  (process-drawable-from-entity! this arg0)
  (logclear! (-> this mask) (process-mask actor-pause))
  (initialize-skeleton
    this
    (the-as
      skeleton-group
      (art-group-get-by-name *level* "skel-farm-sprinkler-barrels" (the-as (pointer uint32) #f))
      )
    (the-as pair 0)
    )
  (farm-sprinkler-barrels-method-29 this)
  (transform-post)
  (go (method-of-object this idle))
  (none)
  )

(defun farm-activate ((arg0 level))
  (let* ((v1-0 (-> arg0 name))
         (s5-0 (cond
                 ((= v1-0 'ctyfarma)
                  (new 'static 'boxed-array :type int32 5 0 0 -1368390400 -1368390656 -1368390912)
                  )
                 ((= v1-0 'ctyfarmb)
                  (new 'static 'boxed-array :type int32 5 0 0 -1145043712 -1145043968 -1145044224)
                  )
                 )
               )
         (v1-1 (-> arg0 name))
         (gp-0 (cond
                 ((= v1-1 'ctyfarma)
                  (new 'static 'boxed-array :type int32 5 0 0 -1368391424 -1368391168)
                  )
                 ((= v1-1 'ctyfarmb)
                  (new 'static 'boxed-array :type int32 5 0 0 -1145044736 -1145044480)
                  )
                 )
               )
         )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4463) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float s5-0)
          )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4462) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float s5-0)
          )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4483) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float gp-0)
          )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4482) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float gp-0)
          )
    )
  (setup-user-array (-> *part-id-table* 4463) "ctyfarm-eggplant-body")
  (setup-user-array (-> *part-id-table* 4462) "ctyfarm-eggplant-body")
  (setup-user-array (-> *part-id-table* 4475) "ctyfarm-chili-stem")
  (setup-user-array (-> *part-id-table* 4474) "ctyfarm-chili-stem")
  (setup-user-array (-> *part-id-table* 4477) "ctyfarm-cab-body")
  (setup-user-array (-> *part-id-table* 4476) "ctyfarm-cab-body")
  (setup-user-array (-> *part-id-table* 4470) "ctyfarm-cab-body")
  (setup-user-array (-> *part-id-table* 4483) "ctyfarm-chili-stem")
  (setup-user-array (-> *part-id-table* 4482) "ctyfarm-chili-stem")
  0
  (none)
  )
