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

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

;; DECOMP BEGINS

(defpartgroup group-farm-marrow-explode
  :id 1134
  :duration (seconds 3.335)
  :flags (sp0 sp6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4001 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4002 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4003 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4004 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4005 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4006 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    )
  )

(defpart 4004
  :init-specs ((:texture (specs level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4003
  :init-specs ((:texture (lakedrop level-default-sprite))
    (: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 set-conerot))
    (: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 4005
  :init-specs ((:texture (bigpuff level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4006
  :init-specs ((:texture (glow-soft level-default-sprite))
    (: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 4002
  :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-13))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xf100500 #xf100400 #xf100300))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4001
  :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-13))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xf100500 #xf100400 #xf100300))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4007)
    (: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 rvec y)) (>= 0.0 (-> arg1 vel-sxvel y)))
      (set! (-> arg2 rvec 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 4007
  :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 4008)
    )
  )

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

(defpartgroup group-farm-beetree-explode
  :id 1135
  :duration (seconds 3.335)
  :flags (sp0 sp6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4009 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4010 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4011 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4012 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    (sp-item 4013 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4014 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05))
    )
  )

(defpart 4014
  :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-13))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4013
  :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-13))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-cabbage-explode
  :id 1136
  :duration (seconds 3.335)
  :flags (sp0 sp6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4015 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4016 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4017 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4018 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4019 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4020 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    )
  )

(defpart 4018
  :init-specs ((:texture (specs level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4017
  :init-specs ((:texture (lakedrop level-default-sprite))
    (: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 set-conerot))
    (: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 4019
  :init-specs ((:texture (bigpuff level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4020
  :init-specs ((:texture (glow-soft level-default-sprite))
    (: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 4016
  :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-13))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4015
  :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-13))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-small-cabbage-explode
  :id 1137
  :duration (seconds 3.335)
  :flags (sp0 sp6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4009 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4010 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1))
    (sp-item 4011 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4012 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    )
  )

(defpart 4010
  :init-specs ((:texture (specs level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4011
  :init-specs ((:texture (bigpuff level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4012
  :init-specs ((:texture (glow-soft level-default-sprite))
    (: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 4009
  :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-13))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-chilirots-explode
  :id 1138
  :duration (seconds 3.335)
  :flags (sp0 sp6)
  :bounds (static-bspherem 0 0 0 4)
  :rotate ((degrees 0) (degrees 90) (degrees 0))
  :parts ((sp-item 4021 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035))
    (sp-item 4022 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05))
    (sp-item 4023 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135))
    (sp-item 4024 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017))
    (sp-item 4025 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1))
    )
  )

(defpart 4025
  :init-specs ((:texture (specs level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 0) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4023
  :init-specs ((:texture (bigpuff level-default-sprite))
    (: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-13))
    (:conerot-x (degrees 30) (degrees 50.000004))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpart 4024
  :init-specs ((:texture (glow-soft level-default-sprite))
    (: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 4022
  :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-13))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xf100100 #xf100200))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 0) (degrees 180))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4021
  :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-13))
    (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xf100100 #xf100200))
    (:func 'check-farm-piece-ground)
    (:next-time (seconds 0.4))
    (:next-launcher 4007)
    (:conerot-x (degrees 0) (degrees 110))
    (:conerot-y (degrees 15) (degrees 150))
    (:rotate-y (degrees 0))
    )
  )

(defpartgroup group-farm-sprinkler-barrels-water
  :id 1139
  :duration (seconds 0.5)
  :linger-duration (seconds 1)
  :flags (sp0 sp4)
  :bounds (static-bspherem 0 0 0 128)
  :parts ((sp-item 4026 :fade-after (meters 300) :falloff-to (meters 300) :flags (sp7) :period (seconds 2) :length (seconds 0.167) :offset 80)
    (sp-item 4027 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7) :period (seconds 2) :length (seconds 0.167) :offset 80)
    (sp-item 4028 :fade-after (meters 180) :falloff-to (meters 180) :flags (sp7) :period (seconds 2) :length (seconds 0.335) :offset 30)
    (sp-item 4028 :fade-after (meters 180) :falloff-to (meters 180) :flags (sp7) :period (seconds 2) :length (seconds 0.25) :offset 55)
    (sp-item 4028 :fade-after (meters 180) :falloff-to (meters 180) :flags (sp7) :period (seconds 2) :length (seconds 0.335) :offset 80)
    (sp-item 4029 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7) :period (seconds 2) :length (seconds 0.167) :offset 80)
    )
  )

(defpart 4027
  :init-specs ((:texture (bigpuff level-default-sprite))
    (: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-13 launch-along-z))
    (:launchrot-x (degrees -15) (degrees 30))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4026
  :init-specs ((:texture (lakedrop level-default-sprite))
    (: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-13 launch-along-z))
    (:userdata 32768.0)
    (:func 'check-drop-level-ctyfarma-drop-userdata)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4030)
    (:launchrot-x (degrees -5) (degrees 10))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4028
  :init-specs ((:texture (lakedrop level-default-sprite))
    (: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-13 launch-along-z))
    (:userdata 32768.0)
    (:func 'check-drop-level-ctyfarma-drop-userdata)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4030)
    (:launchrot-x (degrees -16) (degrees 32))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 4029
  :init-specs ((:texture (lakedrop level-default-sprite))
    (: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-13 launch-along-z))
    (:userdata 32768.0)
    (:func 'check-drop-level-ctyfarma-drop-userdata)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4030)
    (:launchrot-x (degrees -70) (degrees 140))
    (:launchrot-z (degrees 0) (degrees 3600))
    (:rotate-y (degrees 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)
              )

(deftype farm-marrow (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defstate idle (farm-marrow)
  :virtual #t
  :code (behavior ()
    (ja :group! (ja-group) :num! min)
    (ja-post)
    (sleep-code)
    )
  )

(defmethod init-from-entity! ((this farm-marrow) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (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 level) #f)))
    (the-as pair 0)
    )
  (logior! (-> this mask) (process-mask crate))
  (go (method-of-object this idle))
  )

(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)
              )

(deftype farm-beetree (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defstate idle (farm-beetree)
  :virtual #t
  :code (behavior ()
    (ja :group! (ja-group) :num! min)
    (ja-post)
    (sleep-code)
    )
  )

(defmethod init-from-entity! ((this farm-beetree) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (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 level) #f)))
    (the-as pair 0)
    )
  (logior! (-> this mask) (process-mask crate))
  (go (method-of-object this idle))
  )

(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)
              )

(deftype farm-cabbage (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defstate idle (farm-cabbage)
  :virtual #t
  :code (behavior ()
    (ja :group! (ja-group) :num! min)
    (ja-post)
    (sleep-code)
    )
  )

(defmethod init-from-entity! ((this farm-cabbage) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (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 level) #f)))
    (the-as pair 0)
    )
  (logior! (-> this mask) (process-mask crate))
  (go (method-of-object this idle))
  )

(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)
              )

(deftype farm-small-cabbage (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defstate idle (farm-small-cabbage)
  :virtual #t
  :code (behavior ()
    (ja :group! (ja-group) :num! min)
    (ja-post)
    (sleep-code)
    )
  )

(defmethod init-from-entity! ((this farm-small-cabbage) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (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 level) #f)))
    (the-as pair 0)
    )
  (logior! (-> this mask) (process-mask crate))
  (go (method-of-object this idle))
  )

(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)
              )

(deftype farm-chilirots (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defstate idle (farm-chilirots)
  :virtual #t
  :code (behavior ()
    (ja :group! (ja-group) :num! min)
    (ja-post)
    (sleep-code)
    )
  )

(defmethod init-from-entity! ((this farm-chilirots) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (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 level) #f)))
    (the-as pair 0)
    )
  (logior! (-> this mask) (process-mask crate))
  (go (method-of-object this idle))
  )

(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-drawable)
  ()
  (:state-methods
    idle
    )
  )


(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 ()
    (ja-post)
    )
  )

(defmethod init-from-entity! ((this farm-sprinkler-barrels) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (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 level) #f))
      )
    (the-as pair 0)
    )
  (logior! (-> this mask) (process-mask crate))
  (go (method-of-object this idle))
  )

(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 #xf100500 #xf100400 #xf100300)
                  )
                 ((= v1-0 'ctyfarmb)
                  (new 'static 'boxed-array :type int32 5 0 0 #xfd00500 #xfd00400 #xfd00300)
                  )
                 )
               )
         (v1-1 (-> arg0 name))
         (gp-0 (cond
                 ((= v1-1 'ctyfarma)
                  (new 'static 'boxed-array :type int32 5 0 0 #xf100100 #xf100200)
                  )
                 ((= v1-1 'ctyfarmb)
                  (new 'static 'boxed-array :type int32 5 0 0 #xfd00100 #xfd00200)
                  )
                 )
               )
         )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4002) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float s5-0)
          )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4001) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float s5-0)
          )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4022) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float gp-0)
          )
    (set! (-> (get-field-spec-by-id (-> *part-id-table* 4021) (sp-field-id spt-userdata)) initial-valuef)
          (the-as float gp-0)
          )
    )
  (setup-special-textures (-> *part-id-table* 4002) "ctyfarm-eggplant-body")
  (setup-special-textures (-> *part-id-table* 4001) "ctyfarm-eggplant-body")
  (setup-special-textures (-> *part-id-table* 4014) "ctyfarm-chili-stem")
  (setup-special-textures (-> *part-id-table* 4013) "ctyfarm-chili-stem")
  (setup-special-textures (-> *part-id-table* 4016) "ctyfarm-cab-body")
  (setup-special-textures (-> *part-id-table* 4015) "ctyfarm-cab-body")
  (setup-special-textures (-> *part-id-table* 4009) "ctyfarm-cab-body")
  (setup-special-textures (-> *part-id-table* 4022) "ctyfarm-chili-stem")
  (setup-special-textures (-> *part-id-table* 4021) "ctyfarm-chili-stem")
  0
  (none)
  )

(defpartgroup group-ctyfarma-light
  :id 1140
  :flags (sp8)
  :bounds (static-bspherem 0 0 0 8)
  :parts ((sp-item 4031 :fade-after (meters 200) :flags (sp6) :hour-mask #b111111111110000000)
    (sp-item 4032 :fade-after (meters 200) :flags (sp6) :hour-mask #b111111111110000000)
    )
  )

(defpart 4031
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 2.5) (meters 0.1))
    (:rot-x (degrees 9))
    (:rot-z (degrees -17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 20.0)
    (:omega (degrees 4515.75))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 819.2)
    )
  )

(defpart 4032
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 12) (meters 0.1))
    (:rot-x (degrees 9))
    (:rot-z (degrees -17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0 255.0)
    (:b 255.0)
    (:a 12.0)
    (:omega (degrees 4515.75))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 819.2)
    )
  )

(defpartgroup group-ctyfarma-drip-1
  :id 1141
  :flags (sp8)
  :bounds (static-bspherem 0 -4 0 16)
  :parts ((sp-item 4033 :fade-after (meters 140) :falloff-to (meters 140)))
  )

(defun birth-func-ctyfarma-drip ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (let ((s4-0 (new 'stack-no-clear 'collide-query)))
    (vector-copy! (-> s4-0 start-pos) (-> arg2 launchrot))
    (set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0)
    (let ((v1-2 s4-0))
      (set! (-> v1-2 radius) 40.96)
      (set! (-> v1-2 collide-with) (collide-spec backgnd))
      (set! (-> v1-2 ignore-process0) #f)
      (set! (-> v1-2 ignore-process1) #f)
      (set! (-> v1-2 ignore-pat)
            (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
            )
      (set! (-> v1-2 action-mask) (collide-action solid))
      )
    (fill-using-line-sphere *collide-cache* s4-0)
    (cond
      ((>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
       (set! (-> arg1 user-float) (-> s4-0 best-other-tri intersect y))
       (set! (-> arg1 datab 0) (the int (* 127.0 (-> s4-0 best-other-tri normal x))))
       (set! (-> arg1 datab 1) (the int (* 127.0 (-> s4-0 best-other-tri normal y))))
       (set! (-> arg1 datab 2) (the int (* 127.0 (-> s4-0 best-other-tri normal z))))
       (set! (-> arg1 datab 3) (the-as int (-> s4-0 best-other-tri pat event)))
       )
      (else
        (set! (-> arg1 omega) 65280.0)
        (set! (-> arg1 user-float) (+ -204800.0 (-> arg2 launchrot y)))
        )
      )
    )
  (let ((f0-19 (get-height *ocean* (-> arg2 launchrot) #f)))
    (when (!= f0-19 4095996000.0)
      (when (< (-> arg1 user-float) f0-19)
        (set! (-> arg1 user-float) f0-19)
        (set! (-> arg1 datab 0) 0)
        (set! (-> arg1 datab 1) 127)
        (set! (-> arg1 datab 2) 0)
        (set! (-> arg1 datab 3) 0)
        0
        )
      )
    )
  0
  (none)
  )

(defun check-drop-level-ctyfarma-drop-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
  (when (< (-> arg2 rvec y) (-> arg1 user-float))
    (let ((s3-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s3-0 (-> arg2 rvec x) (-> arg1 user-float) (-> arg2 rvec z) 1.0)
      (if (< (vector-vector-distance (camera-pos) s3-0) 204800.0)
          (sound-play "dirt-drips" :position s3-0)
          )
      (launch-particles (-> *part-id-table* 4034) s3-0)
      (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4035) s3-0)
      )
    )
  (sparticle-motion-blur arg0 arg1 (-> arg2 rvec))
  (none)
  )

(defpart 4034
  :init-specs ((:texture (lakedrop level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 0.1) (meters 0.05))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 32.0 32.0)
    (:omega (degrees 0.045))
    (:vel-y (meters 0.016666668) (meters 0.03))
    (:fade-a -0.16)
    (:accel-y (meters -0.001) (meters -0.00016666666))
    (:friction 0.97)
    (:timer (seconds 0.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4030)
    (:conerot-x (degrees 0) (degrees 60))
    (:conerot-y (degrees 0) (degrees 360))
    (:rotate-y (degrees 180))
    )
  )

(defpart 4030
  :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 4036))
  )

(defpart 4036
  :init-specs ((:r 32.0 32.0) (:g 32.0 32.0) (:b 64.0 32.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 4030))
  )

(defpart 4035
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 1.0)
    (:y (meters 0.2))
    (:scale-x (meters 0.5) (meters 0.25))
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 32.0 32.0)
    (:omega (degrees 0))
    (:scalevel-x (meters 0.006666667) (meters 0.006666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.8)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:userdata :data (new 'static 'boxed-array :type int32 10 0 0 #x401800 #x403d00 #x400700 #x408200))
    (:func 'sparticle-texture-animate)
    )
  )

(defpart 4033
  :init-specs ((:texture (lakedrop level-default-sprite))
    (:birth-func 'birth-func-ctyfarma-drip)
    (:num 0.05)
    (:scale-x (meters 0))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 0.0)
    (:vel-z (meters 0))
    (:scalevel-x (meters 0.00044444445))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.28444445)
    (:friction 0.93 0.02)
    (:timer (seconds 3))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 launch-along-z))
    (:userdata 0.0)
    (:func 'check-drop-level-rain2)
    (:next-time (seconds 0.75) (seconds 0.747))
    (:next-launcher 4037)
    )
  )

(defpart 4037
  :init-specs ((:a 128.0)
    (:fade-a 0.0)
    (:accel-y (meters -0.006666667) (meters 0.00066666666))
    (:friction 0.93 0.02)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4030)
    )
  )

(defpartgroup group-ctyfarma-wall-bubbles
  :id 1142
  :flags (sp4)
  :bounds (static-bspherem 0 0 0 32)
  :parts ((sp-item 4038 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp7)))
  )

(defpart 4038
  :init-specs ((:texture (lakedrop level-default-sprite))
    (:num 0.5)
    (:x (meters -0.75) (meters 1.5))
    (:z (meters -4))
    (:scale-x (meters 0.1) (meters 0.2))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 16.0 16.0)
    (:g 64.0 16.0)
    (:b 32.0 32.0)
    (:a 32.0 64.0)
    (:vel-z (meters 0.013333334) (meters 0.0033333334))
    (:rotvel-z (degrees -1.2) (degrees 2.4))
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:rotate-y (degrees 0))
    (:rotate-z (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-ctyfarmb-light
  :id 1143
  :flags (sp8)
  :bounds (static-bspherem 0 0 0 8)
  :parts ((sp-item 4039 :fade-after (meters 200) :flags (sp6) :hour-mask #b111111111110000000)
    (sp-item 4040 :fade-after (meters 200) :flags (sp6) :hour-mask #b111111111110000000)
    )
  )

(defpart 4039
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 2.5) (meters 0.1))
    (:rot-x (degrees 9))
    (:rot-z (degrees -17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 20.0)
    (:omega (degrees 4515.75))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 819.2)
    )
  )

(defpart 4040
  :init-specs ((:texture (glow level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 12) (meters 0.1))
    (:rot-x (degrees 9))
    (:rot-z (degrees -17))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0 255.0)
    (:b 255.0)
    (:a 12.0)
    (:omega (degrees 4515.75))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 819.2)
    )
  )

(defpartgroup group-ctyfarmb-drip-1
  :id 1144
  :flags (sp8)
  :bounds (static-bspherem 0 -4 0 16)
  :parts ((sp-item 4041 :fade-after (meters 140) :falloff-to (meters 140)))
  )

(defun birth-func-ctyfarmb-drip ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
  (let ((s4-0 (new 'stack-no-clear 'collide-query)))
    (vector-copy! (-> s4-0 start-pos) (-> arg2 launchrot))
    (set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0)
    (let ((v1-2 s4-0))
      (set! (-> v1-2 radius) 40.96)
      (set! (-> v1-2 collide-with) (collide-spec backgnd))
      (set! (-> v1-2 ignore-process0) #f)
      (set! (-> v1-2 ignore-process1) #f)
      (set! (-> v1-2 ignore-pat)
            (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
            )
      (set! (-> v1-2 action-mask) (collide-action solid))
      )
    (fill-using-line-sphere *collide-cache* s4-0)
    (cond
      ((>= (probe-using-line-sphere *collide-cache* s4-0) 0.0)
       (set! (-> arg1 user-float) (-> s4-0 best-other-tri intersect y))
       (set! (-> arg1 datab 0) (the int (* 127.0 (-> s4-0 best-other-tri normal x))))
       (set! (-> arg1 datab 1) (the int (* 127.0 (-> s4-0 best-other-tri normal y))))
       (set! (-> arg1 datab 2) (the int (* 127.0 (-> s4-0 best-other-tri normal z))))
       (set! (-> arg1 datab 3) (the-as int (-> s4-0 best-other-tri pat event)))
       )
      (else
        (set! (-> arg1 omega) 65280.0)
        (set! (-> arg1 user-float) (+ -204800.0 (-> arg2 launchrot y)))
        )
      )
    )
  (let ((f0-19 (get-height *ocean* (-> arg2 launchrot) #f)))
    (when (!= f0-19 4095996000.0)
      (when (< (-> arg1 user-float) f0-19)
        (set! (-> arg1 user-float) f0-19)
        (set! (-> arg1 datab 0) 0)
        (set! (-> arg1 datab 1) 127)
        (set! (-> arg1 datab 2) 0)
        (set! (-> arg1 datab 3) 0)
        0
        )
      )
    )
  0
  (none)
  )

(defun check-drop-level-ctyfarmb-drop-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
  (when (< (-> arg2 rvec y) (-> arg1 user-float))
    (let ((s3-0 (new 'stack-no-clear 'vector)))
      (sp-kill-particle arg0 arg1)
      (set-vector! s3-0 (-> arg2 rvec x) (-> arg1 user-float) (-> arg2 rvec z) 1.0)
      (if (< (vector-vector-distance (camera-pos) s3-0) 204800.0)
          (sound-play "dirt-drips" :position s3-0)
          )
      (launch-particles (-> *part-id-table* 4042) s3-0)
      (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4043) s3-0)
      )
    )
  (sparticle-motion-blur arg0 arg1 (-> arg2 rvec))
  (none)
  )

(defpart 4042
  :init-specs ((:texture (lakedrop level-default-sprite))
    (:num 1.0)
    (:scale-x (meters 0.1) (meters 0.05))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 32.0 32.0)
    (:omega (degrees 0.045))
    (:vel-y (meters 0.016666668) (meters 0.03))
    (:fade-a -0.16)
    (:accel-y (meters -0.001) (meters -0.00016666666))
    (:friction 0.97)
    (:timer (seconds 0.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4044)
    (:conerot-x (degrees 0) (degrees 60))
    (:conerot-y (degrees 0) (degrees 360))
    (:rotate-y (degrees 180))
    )
  )

(defpart 4044
  :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 4045))
  )

(defpart 4045
  :init-specs ((:r 32.0 32.0) (:g 32.0 32.0) (:b 64.0 32.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 4044))
  )

(defpart 4043
  :init-specs ((:texture (hotdot level-default-sprite))
    (:num 1.0)
    (:y (meters 0.2))
    (:scale-x (meters 0.5) (meters 0.25))
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 32.0 32.0)
    (:omega (degrees 0))
    (:scalevel-x (meters 0.006666667) (meters 0.006666667))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.8)
    (:timer (seconds 1))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14))
    (:userdata :data (new 'static 'boxed-array :type int32 10 0 0 #x401800 #x403d00 #x400700 #x408200))
    (:func 'sparticle-texture-animate)
    )
  )

(defpart 4041
  :init-specs ((:texture (lakedrop level-default-sprite))
    (:birth-func 'birth-func-ctyfarmb-drip)
    (:num 0.05)
    (:scale-x (meters 0))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 32.0 32.0)
    (:g 32.0 32.0)
    (:b 64.0 32.0)
    (:a 0.0)
    (:vel-z (meters 0))
    (:scalevel-x (meters 0.00044444445))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.28444445)
    (:friction 0.93 0.02)
    (:timer (seconds 3))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 launch-along-z))
    (:userdata 0.0)
    (:func 'check-drop-level-rain2)
    (:next-time (seconds 0.75) (seconds 0.747))
    (:next-launcher 4046)
    )
  )

(defpart 4046
  :init-specs ((:a 128.0)
    (:fade-a 0.0)
    (:accel-y (meters -0.006666667) (meters 0.00066666666))
    (:friction 0.93 0.02)
    (:next-time (seconds 0) (seconds 0.747))
    (:next-launcher 4044)
    )
  )

(defpartgroup group-ctyfarmb-wall-bubbles
  :id 1145
  :flags (sp4)
  :bounds (static-bspherem 0 0 0 32)
  :parts ((sp-item 4047 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp7)))
  )

(defpart 4047
  :init-specs ((:texture (lakedrop level-default-sprite))
    (:num 0.5)
    (:x (meters -0.75) (meters 1.5))
    (:z (meters -4))
    (:scale-x (meters 0.1) (meters 0.2))
    (:rot-x 4)
    (:scale-y :copy scale-x)
    (:r 16.0 16.0)
    (:g 64.0 16.0)
    (:b 32.0 32.0)
    (:a 32.0 64.0)
    (:vel-z (meters 0.013333334) (meters 0.0033333334))
    (:rotvel-z (degrees -1.2) (degrees 2.4))
    (:timer (seconds 2))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:rotate-y (degrees 0))
    (:rotate-z (degrees 0) (degrees 3600))
    )
  )
