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

;; name: ctyinda-obs.gc
;; name in dgo: ctyinda-obs
;; dgos: CIA

;; DECOMP BEGINS

(deftype ctyinda-vingate (elec-gate)
  ()
  )


(define *vingate-elec-gate-params* (new 'static 'elec-gate-params
                                     :bolt-spec (new 'static 'lightning-spec
                                       :name #f
                                       :flags (lightning-spec-flags lsf2)
                                       :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
                                       :end-color (new 'static 'rgba :a #x80)
                                       :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5)
                                       :fade-start-factor 0.2
                                       :fade-time 120.0
                                       :texture (new 'static 'texture-id :index #x8f :page #x4)
                                       :reduction 0.42
                                       :num-points 16
                                       :box-size 8601.6
                                       :merge-factor 0.5
                                       :merge-count 2
                                       :radius 1638.4
                                       :duration -1.0
                                       :sound #f
                                       )
                                     :ring-spec #f
                                     :ring-radius-min 1638.4
                                     :ring-radius-max 2867.2
                                     :speed-mult 1.0
                                     :min-dist 163840.0
                                     :max-dist 491520.0
                                     :plane-expand-xz 8192.0
                                     :plane-expand-y 81920.0
                                     )
        )

(defmethod get-params ((this ctyinda-vingate))
  *vingate-elec-gate-params*
  )

(defmethod elec-gate-method-26 ((this ctyinda-vingate))
  (call-parent-method this)
  (set! (-> this quality-enabled?) #f)
  0
  (none)
  )

(defmethod init-from-entity! ((this ctyinda-vingate) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (when (task-node-closed? (game-task-node sewer-hum-kg-resolution))
    (process-entity-status! this (entity-perm-status dead) #t)
    (deactivate this)
    )
  (call-parent-method this arg0)
  )

(deftype industrial-board-vent (bouncer)
  ()
  )


(defmethod init-collision! ((this industrial-board-vent))
  (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
    (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8))))
      (set! (-> v1-2 prim-core collide-as) (collide-spec crate))
      (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list))
      (set! (-> v1-2 prim-core action) (collide-action))
      (set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 10240.0)
      (set! (-> s5-0 total-prims) (the-as uint 1))
      (set! (-> s5-0 root-prim) v1-2)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-5 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  0
  (none)
  )

(defmethod init-skel! ((this industrial-board-vent))
  0
  (none)
  )

(deftype ctyinda-evil-streetlamp (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defskelgroup skel-ctyinda-evil-streetlamp ctyinda-evil-streetlamp ctyinda-evil-streetlamp-lod0-jg ctyinda-evil-streetlamp-idle-ja
              ((ctyinda-evil-streetlamp-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 8 15)
              )

(defstate idle (ctyinda-evil-streetlamp)
  :virtual #t
  :code (behavior ()
    (until #f
      (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
      (until (ja-done? 0)
        (suspend)
        (ja :num! (seek!))
        )
      )
    #f
    )
  :post ja-post
  )

(defmethod init-from-entity! ((this ctyinda-evil-streetlamp) (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-ctyinda-evil-streetlamp" (the-as (pointer level) #f))
      )
    (the-as pair 0)
    )
  (set! (-> this root pause-adjust-distance) 327680.0)
  (go (method-of-object this idle))
  )
