From ef3d48e8c12727f3eab5d1ce4440800952b95e6b Mon Sep 17 00:00:00 2001 From: Nick0778 <149975116+Nick0778@users.noreply.github.com> Date: Thu, 29 Jan 2026 03:22:13 -0300 Subject: [PATCH 1/2] added customizable airlock data logic --- goal_src/jak2/dgos/game.gd | 63 +- .../airlock-customizable-h.gc | 119 ++ .../airlock-customizable.gc | 1394 +++++++++++++++++ .../airlock-data/atoll/atoll-airlock-data.gc | 16 + .../atollext/atollext-airlock-data.gc | 26 + .../caspad/caspad-airlock-data.gc | 16 + .../castle/casboss-airlock-data.gc | 16 + .../castle/castle-airlock-data.gc | 26 + .../city/consite/consite-airlock-data.gc | 16 + .../city/consite/consiteb-airlock-data.gc | 26 + .../city/farm/ctyfarma-airlock-data.gc | 36 + .../city/generic/ctygenb-airlock-data.gc | 16 + .../city/gungame/gungame-airlock-data.gc | 16 + .../city/hideout/hideout-airlock-data.gc | 16 + .../city/hiphog/hiphog-airlock-data.gc | 26 + .../city/industrial/ctyinda-airlock-data.gc | 26 + .../city/industrial/ctyindb-airlock-data.gc | 16 + .../city/oracle/oracle-airlock-data.gc | 16 + .../city/palace/ctypal-airlock-data.gc | 46 + .../city/port/ctyport-airlock-data.gc | 46 + .../city/slums/ctysluma-airlock-data.gc | 36 + .../city/slums/ctyslumb-airlock-data.gc | 46 + .../city/slums/ctyslumc-airlock-data.gc | 26 + .../city/stadium/stadium-airlock-data.gc | 26 + .../city/vinroom/vinroom-airlock-data.gc | 16 + .../drill/drillmtn-airlock-data.gc | 46 + .../fortress/fordumpa-airlock-data.gc | 16 + .../fortress/fordumpc-airlock-data.gc | 26 + .../fortress/forexitb-airlock-data.gc | 16 + .../fortress/forresca-airlock-data.gc | 16 + .../fortress/forrescb-airlock-data.gc | 36 + .../fortress/prison-airlock-data.gc | 16 + .../mountain/mountain-airlock-data.gc | 16 + .../palace/palcab-airlock-data.gc | 16 + .../palace/palent-airlock-data.gc | 56 + .../palace/palroof-airlock-data.gc | 16 + .../palace/palshaft-airlock-data.gc | 76 + .../palace/throne-airlock-data.gc | 16 + .../airlock-data/ruins/ruins-airlock-data.gc | 16 + .../airlock-data/sewer/sewerb-airlock-data.gc | 36 + .../sewer/sewescb-airlock-data.gc | 36 + .../airlock-data/tomb/tomba-airlock-data.gc | 66 + .../tomb/tombboss-airlock-data.gc | 16 + .../airlock-data/tomb/tombc-airlock-data.gc | 16 + .../airlock-data/tomb/tombd-airlock-data.gc | 26 + .../airlock-data/under/under-airlock-data.gc | 26 + .../airlock-data/under/underb-airlock-data.gc | 46 + 47 files changed, 2779 insertions(+), 1 deletion(-) create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable-h.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atoll/atoll-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atollext/atollext-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/caspad/caspad-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/casboss-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/castle-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consite-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consiteb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/farm/ctyfarma-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/generic/ctygenb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/gungame/gungame-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hideout/hideout-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hiphog/hiphog-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyinda-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyindb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/oracle/oracle-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/palace/ctypal-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/port/ctyport-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctysluma-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumc-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/stadium/stadium-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/vinroom/vinroom-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/drill/drillmtn-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpa-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpc-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forexitb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forresca-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forrescb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/prison-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/mountain/mountain-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palcab-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palent-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palroof-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palshaft-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/throne-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/ruins/ruins-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewerb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewescb-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tomba-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombboss-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombc-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombd-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/under-airlock-data.gc create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/underb-airlock-data.gc diff --git a/goal_src/jak2/dgos/game.gd b/goal_src/jak2/dgos/game.gd index 950ea18b63..e0a99590bd 100644 --- a/goal_src/jak2/dgos/game.gd +++ b/goal_src/jak2/dgos/game.gd @@ -429,7 +429,68 @@ "jak-swim+0-ag.go" "blocking-plane-ag.go" "los-control-h.o" - "airlock.o" + "airlock.o" ;; original airlock logic - be sure to comment this out if using the customizable airlock logic below + ;"airlock-customizable-h.o" ;; added - airlock customizable data definitions file (commented out by default) + #| + ;; atoll + "atoll-airlock-data.o" + ;; atollext + "atollext-airlock-data.o" + ;; city + "consite-airlock-data.o" + "consiteb-airlock-data.o" + "ctyfarma-airlock-data.o" + "ctygenb-airlock-data.o" + "ctyinda-airlock-data.o" + "ctyindb-airlock-data.o" + "ctypal-airlock-data.o" + "ctyport-airlock-data.o" + "ctysluma-airlock-data.o" + "ctyslumb-airlock-data.o" + "ctyslumc-airlock-data.o" + "gungame-airlock-data.o" + "hideout-airlock-data.o" + "hiphog-airlock-data.o" + "oracle-airlock-data.o" + "stadium-airlock-data.o" + "vinroom-airlock-data.o" + ;; fortress + "fordumpa-airlock-data.o" + "fordumpc-airlock-data.o" + "forexitb-airlock-data.o" + "forresca-airlock-data.o" + "forrescb-airlock-data.o" + "prison-airlock-data.o" + ;; ruins + "ruins-airlock-data.o" + ;; sewer + "sewerb-airlock-data.o" + "sewescb-airlock-data.o" + ;; palace + "palcab-airlock-data.o" + "palent-airlock-data.o" + "palroof-airlock-data.o" + "palshaft-airlock-data.o" + "throne-airlock-data.o" + ;; under + "under-airlock-data.o" + "underb-airlock-data.o" + ;; caspad + "caspad-airlock-data.o" + ;; castle + "castle-airlock-data.o" + "casboss-airlock-data.o" + ;; drill + "drillmtn-airlock-data.o" + ;; tomb + "tomba-airlock-data.o" + "tombboss-airlock-data.o" + "tombc-airlock-data.o" + "tombd-airlock-data.o" + ;; mountain + "mountain-airlock-data.o" + |# + ;"airlock-customizable.o" ;; added - airlock customizable data logic file (commented out by default) "water-anim.o" "blocking-plane.o" "idle-control.o" diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable-h.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable-h.gc new file mode 100644 index 0000000000..fcc5f617d7 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable-h.gc @@ -0,0 +1,119 @@ +;;-*-Lisp-*- +(in-package goal) + +#| This file defines an `airlock-data` structure for easily creating + static entries to allow using airlocks in custom levels, as well as + editing and customizing the behavior of existing (vanilla) airlocks. + |# + +(deftype airlock-data (structure) + ((airlock-name string) ;; airlock entity name (should match the entity name placed in the level) + (on-notice pair) ;; evaluated on initialization to determine which levels must be loaded to open the airlock (can include task conditions) + (on-activate pair) ;; actions executed when activating the airlock (e.g. load levels with 'want-load', load sound banks with 'want-sound') + (on-enter pair) ;; actions executed once the airlock finishes opening (e.g. display levels using 'want-display', load sound banks with `want-sound`) + (on-exit pair) ;; actions executed when exiting the airlock (e.g. hide levels, unload sound banks with 'want-sound') + (on-cross pair) ;; actions executed at the exact moment of crossing the airlock (e.g. close task nodes) + (on-inside pair) ;; actions executed while inside the airlock zone (e.g. load levels or sound banks) + (on-deactivate pair) ;; actions executed after the crossing ends and the airlock closes (e.g. hide levels or unload sound banks) + ) + ) + +(defmacro static-airlock-data (&key (airlock-name #f) + &key (on-notice #f) + &key (on-activate #f) + &key (on-enter #f) + &key (on-exit #f) + &key (on-cross #f) + &key (on-inside #f) + &key (on-deactivate #f)) + `(new 'static 'airlock-data + :airlock-name ,airlock-name + :on-notice ,on-notice + :on-activate ,on-activate + :on-enter ,on-enter + :on-exit ,on-exit + :on-cross ,on-cross + :on-inside ,on-inside + :on-deactivate ,on-deactivate + ) + ) + +(deftype com-airlock (process-drawable) + ((root collide-shape :override) + (level-name pair) + (open-test pair) + (were-behind? symbol) + (inner? symbol) + (sound-behind? symbol) + (visible-move? symbol) + (saw-pilot? handle) + (last-distance meters) + (y-height vector) + (pre-open-speed float) + (latch-closed-time time-frame) + (latch-open-time time-frame) + (gear joint-mod) + (gear-rot degrees) + (gear-rotv degrees) + (open-frame float) + (pre-open-frame float) + (lock-frame float) + (open-distance meters) + (active-distance meters) + (sound-id sound-id) + (gear-sound-id sound-id) + (sound-gear sound-spec) + (sound-pre-open sound-spec) + (sound-pre-open-stop sound-spec) + (sound-lock-loop sound-spec) + (sound-lock-stop sound-spec) + (sound-open sound-spec) + (sound-open-loop sound-spec) + (sound-open-stop sound-spec) + (sound-close sound-spec) + (sound-close-loop sound-spec) + (sound-close-stop sound-spec) + (sound-post-close sound-spec) + (sound-post-close-stop sound-spec) + (spool-sound-time time-frame) + (door-radius meters) + (on-notice pair) ;; added + (on-activate pair) ;; added + (on-enter pair) ;; added + (on-exit pair) ;; added + (on-cross pair) ;; added + (on-inside pair) ;; added + (on-deactivate pair) ;; added + (data (array airlock-data)) ;; added + ) + (:state-methods + (open symbol) + (close symbol) + ) + (:methods + (init-airlock! (_type_) _type_) + (want-cross-airlock? (_type_) symbol :behavior com-airlock) + (destination-loaded? (_type_ symbol) symbol) + (check-crossing-distance (_type_ vector symbol) float :behavior com-airlock) + (rotate-gear! (_type_ float) degrees :behavior com-airlock) + (play-city-voice-sound (_type_ symbol) none :behavior com-airlock) + (init-airlock-data-array! (_type_) none) ;; sets the current com-airlock data array + (init-airlock-pair-data! (_type_) none) ;; init each `com-airlock` pair field from shared `airlock-data` + ) + ) + +;; just an empty array. leave it at is. +;; used as a fallback when an entity doesn't have a defined data. +(define *empty-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name #f + :on-notice #f + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable.gc new file mode 100644 index 0000000000..fd024bb096 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-customizable.gc @@ -0,0 +1,1394 @@ +;;-*-Lisp-*- +(in-package goal) + +;; added - sets the current com-airlock data array. Add more cases as needed. +(defmethod init-airlock-data-array! ((this com-airlock)) + (set! (-> this data) + (case-str (-> this name) + ;; city + (("com-airlock-outer-34") *consite-airlock-data*) ;; consite + (("vin-door-ctyinda-5" "com-airlock-inner-40") *consiteb-airlock-data*) ;; consiteb + (("com-airlock-inner-20" "com-airlock-outer-32" "com-airlock-inner-38") *ctyfarma-airlock-data*) ;; ctyfarma + (("com-airlock-outer-15") *ctygenb-airlock-data*) ;; ctygenb + (("vin-door-ctyinda-1" "vin-door-ctyinda-2") *ctyinda-airlock-data*) ;; ctyinda + (("com-airlock-outer-13") *ctyindb-airlock-data*) ;; ctyindb + (("palace-door-1" "com-airlock-inner-27" "com-airlock-inner-28" "com-airlock-outer-22") *ctypal-airlock-data*) ;; ctypal + (("hip-door-a-10" "hip-door-a-20" "hip-door-a-21" "hip-door-a-6") *ctyport-airlock-data*) ;; ctyport + (("hide-door-a-3" "fort-entry-gate-17" "fort-entry-gate-18") *ctysluma-airlock-data*) ;; ctysluma + (("fort-entry-gate-19" "com-airlock-inner-11" "com-airlock-outer-9" "com-airlock-inner-12") *ctyslumb-airlock-data*) ;; ctyslumb + (("com-airlock-outer-12" "oracle-door-3") *ctyslumc-airlock-data*) ;; ctyslumc + (("hip-door-a-9") *gungame-airlock-data*) ;; gungame + (("hide-door-b-2") *hideout-airlock-data*) ;; hideout + (("hip-door-b-1" "hip-door-a-7") *hiphog-airlock-data*) ;; hiphog + (("oracle-door-1") *oracle-airlock-data*) ;; oracle + (("gar-door-3" "gar-door-4") *stadium-airlock-data*) ;; stadium + (("vin-door-5") *vinroom-airlock-data*) ;; vinroom + ;; fortress + (("fort-entry-gate-20") *prison-airlock-data*) + (("fort-entry-gate-5") *forexitb-airlock-data*) + (("fort-entry-gate-4") *fordumpa-airlock-data*) + (("fort-entry-gate-14" "fort-entry-gate-16") *fordumpc-airlock-data*) + (("fort-entry-gate-7") *forresca-airlock-data*) + (("fort-entry-gate-8" "fort-entry-gate-9" "fort-entry-gate-11") *forrescb-airlock-data*) + ;; ruins + (("com-airlock-outer-2") *ruins-airlock-data*) + ;; atoll + (("com-airlock-outer-1") *atoll-airlock-data*) + ;; atollext + (("com-airlock-inner-17" "com-airlock-inner-18") *atollext-airlock-data*) + ;; sewer + (("com-airlock-inner-1" "com-airlock-outer-3" "com-airlock-inner-2") *sewerb-airlock-data*) + (("com-airlock-inner-15" "com-airlock-outer-11" "com-airlock-inner-16") *sewescb-airlock-data*) + ;; palace + (("com-airlock-outer-17") *palcab-airlock-data*) + (("com-airlock-outer-25" "com-airlock-outer-30" "pal-throne-door-2" "pal-ent-door-1" "pal-ent-door-2") *palent-airlock-data*) + (("com-airlock-outer-18") *palroof-airlock-data*) + (("com-airlock-inner-26" "com-airlock-inner-25" "com-airlock-inner-23" "com-airlock-inner-36" "com-airlock-inner-37" "com-airlock-inner-22") *palshaft-airlock-data*) + (("pal-throne-door-3") *throne-airlock-data*) + ;; under + (("com-airlock-inner-43" "com-airlock-inner-44") *under-airlock-data*) + (("com-airlock-inner-41" "com-airlock-inner-42" "under-door-2" "under-door-4") *underb-airlock-data*) + ;; caspad + (("cas-front-door-1") *caspad-airlock-data*) + ;; castle + (("cas-front-door-2" "cas-front-door-4") *castle-airlock-data*) + (("cas-front-door-3") *casboss-airlock-data*) + ;; drill + (("drill-elevator-doors-3" "drill-elevator-doors-4" "drill-elevator-doors-1" "drill-elevator-doors-2") *drillmtn-airlock-data*) + ;; tomb + (("tomb-boss-door-1" "tomb-wing-door-3" "tomb-wing-door-4" "tomb-wing-door-1" "tomb-wing-door-2" "tomb-mar-door-2") *tomba-airlock-data*) + (("tomb-wing-door-6") *tombboss-airlock-data*) + (("tomb-wing-door-5") *tombc-airlock-data*) + (("com-airlock-outer-21" "tomb-mar-door-1") *tombd-airlock-data*) + ;; mountain + (("com-airlock-outer-4") *mountain-airlock-data*) + (else + *empty-airlock-data* ;; Just an empty array. Leave it at is. Used as a fallback when an entity doesn't have a defined data. + ) + ) + ) + (none) + ) + +;; added - init each `com-airlock` pair field from shared `airlock-data` +(defmethod init-airlock-pair-data! ((this com-airlock)) + (let* ((data (-> this data)) + (list-length (-> data length)) + ) + (dotimes (i list-length) + (when (string= (-> this name) (-> data i airlock-name)) + (set! (-> this on-notice) (-> data i on-notice)) + (set! (-> this on-activate) (-> data i on-activate)) + (set! (-> this on-enter) (-> data i on-enter)) + (set! (-> this on-exit) (-> data i on-exit)) + (set! (-> this on-cross) (-> data i on-cross)) + (set! (-> this on-inside) (-> data i on-inside)) + (set! (-> this on-deactivate) (-> data i on-deactivate)) + ) + ) + ) + (none) + ) + +(defmethod deactivate ((this com-airlock)) + (process-entity-status! this (entity-perm-status subtask-complete) #f) + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + (if (nonzero? (-> this gear-sound-id)) + (sound-stop (-> this gear-sound-id)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs com-airlock. +(defmethod relocate ((this com-airlock) (arg0 int)) + (if (nonzero? (-> this gear)) + (&+! (-> this gear) arg0) + ) + (the-as com-airlock ((method-of-type process-drawable relocate) this arg0)) + ) + +(defmethod init-airlock! ((this com-airlock)) + (process-entity-status! this (entity-perm-status subtask-complete) #f) + (process-drawable-from-entity! this (-> this entity)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this were-behind?) #f) + (set! (-> this inner?) + (logtest? (the-as int (res-lump-value (-> this entity) 'options uint128 :time -1000000000.0)) 1) + ) + (set! (-> this sound-behind?) #f) + (set! (-> this saw-pilot?) (the-as handle #f)) + (set! (-> this open-frame) 0.0) + (set! (-> this pre-open-frame) 0.0) + (set! (-> this lock-frame) 0.0) + (set! (-> this pre-open-speed) 2.0) + (set! (-> this open-distance) (res-lump-float (-> this entity) 'distance :default 143360.0)) + (set! (-> this active-distance) + (res-lump-float (-> this entity) 'idle-distance :default (+ 143360.0 (-> this open-distance))) + ) + (set! (-> this y-height) (res-lump-data (-> this entity) 'height vector)) + (set! (-> this level-name) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this open-test) + (the-as pair ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this sound-gear) #f) + (set! (-> this sound-pre-open) #f) + (set! (-> this sound-pre-open-stop) #f) + (set! (-> this sound-lock-loop) #f) + (set! (-> this sound-lock-stop) #f) + (set! (-> this sound-post-close) #f) + (set! (-> this sound-post-close-stop) #f) + (set! (-> this sound-open) #f) + (set! (-> this sound-close) #f) + (set! (-> this sound-open-loop) #f) + (set! (-> this sound-close-loop) #f) + (set! (-> this sound-open-stop) #f) + (set! (-> this sound-close-stop) #f) + (set! (-> this door-radius) 20480.0) + (init-airlock-data-array! this) ;; added + (init-airlock-pair-data! this) ;; added + this + ) + +(defmethod check-crossing-distance ((this com-airlock) (arg0 vector) (arg1 symbol)) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + ) + (set! (-> s4-1 y) 0.0) + (let ((f30-0 (vector-dot s4-1 s5-0))) + (cond + ((not arg1) + ) + ((or (< (vector-vector-xz-distance (-> this root trans) arg0) 40960.0) + (< 0.7 (fabs (vector-dot s5-0 (vector-normalize! s4-1 1.0)))) + ) + (when (and (< f30-0 0.0) (< 0.0 (-> this last-distance))) + (when (-> this on-cross) + (script-eval (-> this on-cross)) + ) + ) + (set! (-> this last-distance) f30-0) + ) + ((< 0.0 (-> this last-distance)) + (set! f30-0 (fmax 4096.0 f30-0)) + ) + ((< (-> this last-distance) 0.0) + (set! f30-0 (fmin -4096.0 f30-0)) + ) + ) + f30-0 + ) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod want-cross-airlock? ((this com-airlock)) + (local-vars (a0-12 entity-actor)) + (let* ((tgt (target-pos 0)) + (f30-0 (check-crossing-distance this tgt #t)) + (s5-0 (>= (-> this latch-open-time) (current-time))) + ) + (the-as + symbol + (and (or s5-0 (< (vector-vector-xz-distance (-> this root trans) tgt) (-> this active-distance))) + (or s5-0 (not (-> this y-height)) (and (>= (-> tgt y) (- (-> this root trans y) (-> this y-height y))) + (< (-> tgt y) (+ (-> this root trans y) (-> this y-height x))) + ) + ) + (begin + (if (and (not (-> this were-behind?)) (and (< f30-0 0.0) (-> this inner?))) + (set! (-> this were-behind?) #t) + ) + (and (< (-> this latch-closed-time) (current-time)) + (or (not (and *target* (focus-test? *target* pilot teleporting))) (< f30-0 -409.6)) + (or (and (< f30-0 (-> this open-distance)) + (or (not (-> this were-behind?)) (< f30-0 20480.0)) + (and (or (< 409.6 f30-0) + (begin + (let ((a0-11 (-> this entity))) + (set! a0-12 (entity-actor-lookup a0-11 'next-actor 0)) + ) + (not a0-12) + ) + (logtest? (-> a0-12 extra perm status) (entity-perm-status subtask-complete)) + ) + (and (script-eval (-> this open-test)) (-> *setting-control* user-current airlock)) + ) + ) + s5-0 + (let ((f0-8 (check-crossing-distance this (camera-pos) #f))) + (and (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status in-head)))) + (or (< (* f30-0 f0-8) 0.0) + (and (< (fabs f0-8) 4096.0) + (< (vector-vector-xz-distance (camera-pos) (-> this root trans)) (-> this door-radius)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod destination-loaded? ((this com-airlock) (display? symbol)) + (let ((on-notice-data (-> this on-notice))) + (when (not on-notice-data) + (return (if display? 'unknown #f)) + ) + (let ((level-list (script-eval on-notice-data)) + (borrow-lev-name #f) + ) + (when (or (not level-list) (not (pair? level-list))) + (return (if display? 'unknown #f)) + ) + (cond + ((not (the-as object level-list)) + (if display? + 'unknown + #f + ) + ) + (display? + (let* ((level-list-iter level-list) + (lev-name (car (the-as object level-list-iter))) + ) + (while (not (null? (the-as object level-list-iter))) + (let ((v1-4 (level-status *level* (the-as symbol lev-name)))) + (if (not (or (= v1-4 'loaded) (= v1-4 'active))) + (return #f) + ) + ) + (if (= lev-name 'ctywide) + (set! borrow-lev-name (-> ctywide borrow-level 1)) + ) + (set! level-list-iter (cdr (the-as object level-list-iter))) + (set! lev-name (car level-list-iter)) + ) + ) + (when borrow-lev-name + (let ((v1-17 (level-status *level* borrow-lev-name))) + (if (not (or (= v1-17 'loaded) (= v1-17 'active))) + (return #f) + ) + ) + ) + (if (!= display? 'display) + (return #t) + ) + (let ((a1-7 (car (the-as object level-list)))) + (while (not (null? (the-as object level-list))) + (let ((v1-26 (level-get *level* (the-as symbol a1-7)))) + (if (not (and v1-26 (= (-> v1-26 status) 'active) (-> v1-26 display?))) + (return #f) + ) + ) + (set! level-list (cdr (the-as object level-list))) + (set! a1-7 (car level-list)) + ) + ) + #t + ) + (else + (when (-> this on-notice) + (let* ((v1-33 (the-as object level-list)) + (a0-11 (car v1-33)) + ) + (while (not (null? v1-33)) + (dotimes (a1-10 6) + (if (= a0-11 (-> *load-state* want a1-10 name)) + (goto cfg-50) + ) + ) + #t + (return #f) + (label cfg-50) + (set! v1-33 (cdr v1-33)) + (set! a0-11 (car (the-as pair v1-33))) + ) + ) + ) + #t + ) + ) + ) + ) + ) + +(defmethod rotate-gear! ((this com-airlock) (arg0 float)) + (when (nonzero? (-> this gear)) + (if (and (zero? (-> this gear-sound-id)) + (-> this sound-gear) + (and (-> this next-state) (= (-> this next-state name) 'open)) + (>= (check-crossing-distance this (target-pos 0) #f) 0.0) + ) + (set! (-> this gear-sound-id) (sound-play-by-spec (-> this sound-gear) (new-sound-id) (the-as vector #t))) + ) + (seek! (-> this gear-rotv) arg0 (* 131072.0 (seconds-per-frame))) + (+! (-> this gear-rot) (* (-> this gear-rotv) (seconds-per-frame))) + (twist-set! (-> this gear) (the-as float #f) (the-as float #f) (-> this gear-rot)) + ) + (-> this gear-rotv) + ) + +(defmethod play-city-voice-sound ((this com-airlock) (arg0 symbol)) + (let ((gp-0 (the-as (array string) #f))) + (case arg0 + (('enter) + (set! gp-0 (new 'static 'boxed-array :type string "cityv005" "cityv006" "cityv007" "cityv008" "cityv009")) + ) + (('exit) + (set! gp-0 (new 'static 'boxed-array :type string "cityv001" "cityv002" "cityv003" "cityv004")) + ) + ) + (cond + ((and gp-0 (time-elapsed? (-> this spool-sound-time) (seconds 2))) + (set-time! (-> this spool-sound-time)) + (add-process + *gui-control* + this + (gui-channel alert) + (gui-action play) + (-> (the-as (array string) (+ (* (rand-vu-int-range 0 (+ (-> gp-0 length) -1)) 4) (the-as int gp-0))) 0) + -99.0 + 0 + ) + ) + (else + 0 + ) + ) + ) + (none) + ) + +(defskelgroup skel-com-airlock-outer com-airlock-outer com-airlock-outer-lod0-jg com-airlock-outer-idle-ja + ((com-airlock-outer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +(defskelgroup skel-com-airlock-inner com-airlock-inner com-airlock-inner-lod0-jg com-airlock-inner-idle-ja + ((com-airlock-inner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +(defstate close (com-airlock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('close) + (set! (-> self latch-closed-time) (+ (current-time) (if (>= argc 1) + (the-as int (-> block param 0)) + 3000 + ) + ) + ) + (if (and (>= argc 2) (and (= (-> block param 1) #t) (not (want-cross-airlock? self)))) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + ) + (and (-> self next-state) (= (-> self next-state name) 'open)) + ) + (('open) + (set! (-> self latch-open-time) (+ (current-time) (if (>= argc 1) + (the-as int (-> block param 0)) + 3000 + ) + ) + ) + (if (and (>= argc 2) (and (= (-> block param 1) #t) (want-cross-airlock? self) (destination-loaded? self #f))) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! max) + ) + (and (-> self next-state) (= (-> self next-state name) 'close)) + ) + (('front) + (let ((f30-0 (check-crossing-distance self (target-pos 0) #f)) + (f0-3 (check-crossing-distance self (camera-pos) #f)) + ) + (and (< 2048.0 f30-0) (>= (* f30-0 f0-3) 0.0)) + ) + ) + (('back) + (let ((f30-1 (check-crossing-distance self (target-pos 0) #f)) + (f0-5 (check-crossing-distance self (camera-pos) #f)) + ) + (and (< f30-1 -2048.0) (>= (* f30-1 f0-5) 0.0)) + ) + ) + (('sound) + (if (>= (check-crossing-distance self (target-pos 0) #f) 0.0) + (play-city-voice-sound self (the-as symbol (-> block param 0))) + ) + ) + (('distance) + (* (the int (check-crossing-distance self (target-pos 0) #f)) 8) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set! (-> self visible-move?) #f) + ) + :exit (behavior () + (when (nonzero? (-> self sound-id)) + (let ((v1-2 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-2 command) (sound-command set-param)) + (set! (-> v1-2 id) (-> self sound-id)) + (set! (-> v1-2 params volume) -4) + (set! (-> v1-2 auto-time) 24) + (set! (-> v1-2 auto-from) 2) + (set! (-> v1-2 params mask) (the-as uint 17)) + (-> v1-2 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-6 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-6 command) (sound-command set-param)) + (set! (-> v1-6 id) (-> self gear-sound-id)) + (set! (-> v1-6 params volume) -4) + (set! (-> v1-6 auto-time) 24) + (set! (-> v1-6 auto-from) 2) + (set! (-> v1-6 params mask) (the-as uint 17)) + (-> v1-6 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + :trans (behavior () + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self visible-move?) #t) + ) + (when (and (want-cross-airlock? self) (begin + (when (-> self on-activate) + (script-eval (-> self on-activate)) + ) + (destination-loaded? self #f) + ) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-17 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-17 command) (sound-command set-param)) + (set! (-> v1-17 id) (-> self sound-id)) + (set! (-> v1-17 params volume) -4) + (set! (-> v1-17 auto-time) 24) + (set! (-> v1-17 auto-from) 2) + (set! (-> v1-17 params mask) (the-as uint 17)) + (-> v1-17 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (go-virtual open #f) + ) + ) + :code (behavior ((arg0 symbol)) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (when (not arg0) + (if (and (-> self sound-close) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (sound-play-by-spec (-> self sound-close) (new-sound-id) (the-as vector #t)) + ) + (if (and (-> self sound-close-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-close-loop) (new-sound-id) (the-as vector #t))) + ) + (while (< (-> self open-frame) (ja-aframe-num 0)) + (rotate-gear! self 65536.0) + (when (and (-> self were-behind?) + (< 0.4 (vector-dot + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (-> (math-camera-matrix) vector 2) + ) + ) + (< 0.0 (check-crossing-distance self (target-pos 0) #f)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + (goto cfg-42) + ) + (suspend) + (ja :num! (seek! 0.0 2.0)) + (transform-post) + ) + (label cfg-42) + (if (< 0.0 (check-crossing-distance self (target-pos 0) #f)) + ((lambda :behavior com-airlock + () + (when (and (-> self on-exit) (not *scene-player*)) + (script-eval (-> self on-exit)) + ) + (the-as pair (when (-> self were-behind?) + (set! (-> self were-behind?) #f) + (when (and (-> self on-inside) (not *scene-player*)) + (script-eval (-> self on-inside)) + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-46 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-46 command) (sound-command set-param)) + (set! (-> v1-46 id) (-> self sound-id)) + (set! (-> v1-46 params volume) -4) + (set! (-> v1-46 auto-time) 24) + (set! (-> v1-46 auto-from) 2) + (set! (-> v1-46 params mask) (the-as uint 17)) + (-> v1-46 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (if (and (-> self sound-close-stop) (not arg0) (-> self visible-move?)) + (sound-play-by-spec (-> self sound-close-stop) (new-sound-id) (the-as vector #t)) + ) + (while (not (ja-min? 0)) + (if (and (zero? (-> self sound-id)) + (-> self sound-post-close) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-post-close) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + ;; og:preserve-this added speed modifier + (ja :num! (seek! 0.0 (get-airlock-close-speed *pc-settings*))) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-71 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-71 command) (sound-command set-param)) + (set! (-> v1-71 id) (-> self sound-id)) + (set! (-> v1-71 params volume) -4) + (set! (-> v1-71 auto-time) 24) + (set! (-> v1-71 auto-from) 2) + (set! (-> v1-71 params mask) (the-as uint 17)) + (-> v1-71 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-post-close-stop) + (sound-play-by-spec (-> self sound-post-close-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (when (< 0.0 (check-crossing-distance self (target-pos 0) #f)) + (when (and (-> self on-deactivate) (not *scene-player*)) + (script-eval (-> self on-deactivate)) + ) + ) + (while (!= (-> self gear-rotv) 0.0) + (rotate-gear! self 0.0) + (suspend) + (transform-post) + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-91 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-91 command) (sound-command set-param)) + (set! (-> v1-91 id) (-> self gear-sound-id)) + (set! (-> v1-91 params volume) -4) + (set! (-> v1-91 auto-time) 24) + (set! (-> v1-91 auto-from) 2) + (set! (-> v1-91 params mask) (the-as uint 17)) + (-> v1-91 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +(defstate open (com-airlock) + :virtual #t + :event (-> (method-of-type com-airlock close) event) + :enter (behavior ((arg0 symbol)) + (set! (-> self visible-move?) #f) + ) + :exit (-> (method-of-type com-airlock close) exit) + :trans (behavior () + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self visible-move?) #t) + ) + (if (not (want-cross-airlock? self)) + (go-virtual close #f) + ) + (when (logtest? (-> self mask) (process-mask sleep-code)) + (let ((v1-14 (destination-loaded? self 'display))) + (when (or (not v1-14) (= v1-14 'unknown)) + (if (and (not v1-14) (< (-> self open-frame) (ja-aframe-num 0))) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + (go-virtual close #f) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (when (not arg0) + (when (< (check-crossing-distance self (target-pos 0) #f) 0.0) + (if (< (ja-aframe-num 0) (-> self pre-open-frame)) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self pre-open-frame) 0)) + ) + ) + (while (< (ja-aframe-num 0) (-> self lock-frame)) + (if (and (zero? (-> self sound-id)) + (-> self sound-pre-open) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-pre-open) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + ;; og:preserve-this added speed modifier + (ja :num! (seek! (ja-aframe (-> self lock-frame) 0) (* (get-airlock-speed *pc-settings*) (-> self pre-open-speed)))) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-26 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-26 command) (sound-command set-param)) + (set! (-> v1-26 id) (-> self sound-id)) + (set! (-> v1-26 params volume) -4) + (set! (-> v1-26 auto-time) 24) + (set! (-> v1-26 auto-from) 2) + (set! (-> v1-26 params mask) (the-as uint 17)) + (-> v1-26 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-pre-open-stop) + (sound-play-by-spec (-> self sound-pre-open-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (while (< (ja-aframe-num 0) (-> self open-frame)) + (if (and (zero? (-> self sound-id)) + (-> self sound-lock-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-lock-loop) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + ;; og:preserve-this added speed modifier + (ja :num! (seek! (ja-aframe (-> self open-frame) 0) (* (get-airlock-speed *pc-settings*) 2.0))) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-49 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-49 command) (sound-command set-param)) + (set! (-> v1-49 id) (-> self sound-id)) + (set! (-> v1-49 params volume) -4) + (set! (-> v1-49 auto-time) 24) + (set! (-> v1-49 auto-from) 2) + (set! (-> v1-49 params mask) (the-as uint 17)) + (-> v1-49 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-lock-stop) + (sound-play-by-spec (-> self sound-lock-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (while (not (destination-loaded? self #t)) + (rotate-gear! self 65536.0) + (suspend) + (transform-post) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (when (-> self on-enter) + (script-eval (-> self on-enter)) + ) + (if (and (-> self sound-open) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (sound-play-by-spec (-> self sound-open) (new-sound-id) (the-as vector #t)) + ) + (if (and (-> self sound-open-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-open-loop) (new-sound-id) (the-as vector #t))) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (while (not (ja-max? 0)) + (rotate-gear! self 65536.0) + (suspend) + ;; og:preserve-this added speed modifier + (ja :num! (seek! max (get-airlock-speed *pc-settings*))) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-94 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-94 command) (sound-command set-param)) + (set! (-> v1-94 id) (-> self sound-id)) + (set! (-> v1-94 params volume) -4) + (set! (-> v1-94 auto-time) 24) + (set! (-> v1-94 auto-from) 2) + (set! (-> v1-94 params mask) (the-as uint 17)) + (-> v1-94 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-99 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-99 command) (sound-command set-param)) + (set! (-> v1-99 id) (-> self gear-sound-id)) + (set! (-> v1-99 params volume) -4) + (set! (-> v1-99 auto-time) 24) + (set! (-> v1-99 auto-from) 2) + (set! (-> v1-99 params mask) (the-as uint 17)) + (-> v1-99 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (if (and (-> self sound-open-stop) (not arg0) (-> self visible-move?)) + (sound-play-by-spec (-> self sound-open-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! max) + (transform-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +(deftype com-airlock-outer (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this com-airlock-outer) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 57344.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 7) + (set-vector! (-> v1-10 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (init-airlock! this) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-com-airlock-outer" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (set! (-> this pre-open-frame) 35.0) + (set! (-> this lock-frame) 45.0) + (set! (-> this open-frame) 45.0) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider")) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e")) + (set! (-> this sound-open) (static-sound-spec "airlock-seal")) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open")) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open")) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit")) + (set! (-> this sound-post-close) (static-sound-spec "airlock-slider")) + (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e")) + (go (method-of-object this close) #t) + (none) + ) + +(deftype com-airlock-inner (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this com-airlock-inner) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 57344.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 8) + (set-vector! (-> v1-10 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-com-airlock-inner" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 37.0) + (set! (-> this pre-open-frame) 65.0) + (set! (-> this open-frame) 75.0) + (set! (-> this gear) (new 'process 'joint-mod (joint-mod-mode rotate) this 12)) + (set! (-> this inner?) + (logtest? (the-as + int + (res-lump-value (-> this entity) 'options uint128 :default (the-as uint128 1) :time -1000000000.0) + ) + 1 + ) + ) + (set! (-> this pre-open-speed) 0.9) + (set! (-> this sound-gear) (static-sound-spec "airlock-gear")) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider")) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e")) + (set! (-> this sound-lock-loop) (static-sound-spec "airlock-turn")) + (set! (-> this sound-lock-stop) (static-sound-spec "airlock-unlock")) + (set! (-> this sound-open) (static-sound-spec "airlock-seal")) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open")) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open")) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit")) + (go (method-of-object this close) #t) + (none) + ) + +(defskelgroup skel-fort-entry-gate fort-entry-gate fort-entry-gate-lod0-jg fort-entry-gate-idle-ja + ((fort-entry-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 10) + ) + +(deftype fort-entry-gate (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this fort-entry-gate) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 8192.0 16384.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -8192.0 16384.0 0.0 20480.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fort-entry-gate" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "door-open")) + (set! (-> this sound-open-stop) (static-sound-spec "door-stop-open")) + (set! (-> this sound-close-loop) (static-sound-spec "door-close")) + (set! (-> this sound-close-stop) (static-sound-spec "door-stop-close")) + (go (method-of-object this close) #t) + (none) + ) + +(defskelgroup skel-hip-door-a hip-door-a hip-door-a-lod0-jg hip-door-a-idle-ja + ((hip-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 5) + ) + +(deftype hip-door-a (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this hip-door-a) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-hip-door-a" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open")) + (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close")) + (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit")) + (set! (-> this door-radius) 8192.0) + (go (method-of-object this close) #t) + (none) + ) + +(defskelgroup skel-tomb-mar-door tomb-mar-door tomb-mar-door-lod0-jg tomb-mar-door-idle-ja + ((tomb-mar-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 18) + :origin-joint-index 3 + ) + +(deftype tomb-mar-door (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this tomb-mar-door) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 24576.0 0.0 73728.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) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tomb-mar-door" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "wing-door-open")) + (set! (-> this sound-open-stop) (static-sound-spec "wing-open-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "wing-door-close")) + (set! (-> this sound-close-stop) (static-sound-spec "wing-close-hit")) + (go (method-of-object this close) #t) + (none) + ) + +(deftype cas-front-door (com-airlock-outer) + () + ) + + +(defskelgroup skel-pal-throne-door pal-throne-door pal-throne-door-lod0-jg pal-throne-door-idle-ja + ((pal-throne-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 24) + :origin-joint-index 3 + ) + +(deftype pal-throne-door (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this pal-throne-door) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 73728.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 5) + (set-vector! (-> v1-8 local-sphere) 0.0 -24576.0 0.0 65536.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 -24576.0 0.0 65536.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-pal-throne-door" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-slide")) + (set! (-> this sound-open-stop) (static-sound-spec "wood-door-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-slide")) + (set! (-> this sound-close-stop) (static-sound-spec "wood-door-hit")) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + (none) + ) + +(defskelgroup skel-vin-door-ctyinda vin-door-ctyinda vin-door-ctyinda-lod0-jg vin-door-ctyinda-idle-ja + ((vin-door-ctyinda-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 6) + ) + +(deftype vin-door-ctyinda (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this vin-door-ctyinda) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 24576.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 8192.0 16384.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -8192.0 16384.0 0.0 20480.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vin-door-ctyinda" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open")) + (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close")) + (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit")) + (set! (-> this door-radius) 8192.0) + (go (method-of-object this close) #t) + (none) + ) + +(defskelgroup skel-under-door hip-door-a hip-door-a-lod0-jg hip-door-a-idle-ja + ((hip-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 5) + ) + +(deftype under-door (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this under-door) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-under-door" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open")) + (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close")) + (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit")) + (set! (-> this door-radius) 8192.0) + (go (method-of-object this close) #t) + (none) + ) + +(defskelgroup skel-oracle-door oracle-door oracle-door-lod0-jg oracle-door-idle-ja + ((oracle-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 10) + ) + +(deftype oracle-door (com-airlock) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod init-from-entity! ((this oracle-door) (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" + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-13 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-oracle-door" (the-as (pointer uint32) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open")) + (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit")) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close")) + (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit")) + (go (method-of-object this close) #t) + (none) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atoll/atoll-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atoll/atoll-airlock-data.gc new file mode 100644 index 0000000000..b15549d929 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atoll/atoll-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *atoll-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-1" + :on-notice '(unless (and (send-event self 'front) (demo?)) '(atollext)) + :on-activate '(want-load 'atoll 'atollext #f) + :on-enter '(want-display 'atollext 'display) + :on-exit #f + :on-cross '(when (task-closed? "atoll-water-resolution") (task-close! "atoll-water-exit")) + :on-inside #f + :on-deactivate '(want-display 'atollext 'display) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atollext/atollext-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atollext/atollext-airlock-data.gc new file mode 100644 index 0000000000..b1288d9052 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/atollext/atollext-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *atollext-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-17" + :on-notice '(when #t '(ctyslumc ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-display 'ctyslumc 'display) (want-vis 'ctyslumc) (send-event self 'sound 'enter)) + :on-exit '(begin (want-display 'ctywide #f) (want-display 'ctyslumc #f)) + :on-cross #f + :on-inside '(begin (want-load 'atollext 'atoll #f) (want-sound 'atoll1 'atoll2 'ctywide1) (setting-pers minimap mode 'clear mask MINIMAP_FLAG_MINIMAP time (seconds 80))) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-18" + :on-notice '(when #t '(atoll)) + :on-activate #f + :on-enter '(begin (want-display 'atoll 'display) (send-event self 'sound 'exit) (want-vis 'atoll)) + :on-exit '(want-display 'atoll #f) + :on-cross #f + :on-inside '(begin (want-load 'ctyslumc 'ctywide 'atollext) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/caspad/caspad-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/caspad/caspad-airlock-data.gc new file mode 100644 index 0000000000..dea92cffba --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/caspad/caspad-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *caspad-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "cas-front-door-1" + :on-notice '(when (task-closed? "castle-break-in-introduction") '(castle)) + :on-activate '(want-load 'caspad 'castle #f) + :on-enter '(begin (want-display 'castle 'display) (talker-spawn "cityv021")) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'castle #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/casboss-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/casboss-airlock-data.gc new file mode 100644 index 0000000000..a181dfe8f6 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/casboss-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *casboss-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "cas-front-door-3" + :on-notice '(when #t '(casboss)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/castle-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/castle-airlock-data.gc new file mode 100644 index 0000000000..eafdf3b614 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/castle/castle-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *castle-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "cas-front-door-2" + :on-notice '(when #t '(caspad)) + :on-activate '(want-load 'caspad 'castle #f) + :on-enter '(want-display 'caspad 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'caspad #f) + ) + (static-airlock-data + :airlock-name "cas-front-door-4" + :on-notice '(when (and (task-closed? "castle-break-in-resolution") (not (task-closed? "castle-boss-resolution"))) '(casboss)) + :on-activate '(want-load 'castle 'casboss #f) + :on-enter '(want-display 'casboss 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'casboss #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consite-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consite-airlock-data.gc new file mode 100644 index 0000000000..8474315dc5 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consite-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *consite-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-34" + :on-notice '(when #t '(consiteb)) + :on-activate '(want-load 'consite 'consiteb #f) + :on-enter '(want-display 'consiteb 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'consiteb 'display) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consiteb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consiteb-airlock-data.gc new file mode 100644 index 0000000000..0a0570e1f5 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/consite/consiteb-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *consiteb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "vin-door-ctyinda-5" + :on-notice '(when #t '(ctyinda ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctyinda 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(begin (want-vis 'ctyinda) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-inside '(begin (want-load 'consiteb 'consite) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-deactivate '(begin (want-display 'ctyinda #f) (want-display 'ctywide #f)) + ) + (static-airlock-data + :airlock-name "com-airlock-inner-40" + :on-notice '(when #t '(consite)) + :on-activate #f + :on-enter '(begin (want-display 'consite 'display) (want-vis 'consite) (send-event self 'sound 'exit)) + :on-exit '(want-display 'consite #f) + :on-cross '(want-sound 'ctywide1 'consite1 'consite2) + :on-inside '(begin (want-load 'ctyinda 'ctywide 'consiteb) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/farm/ctyfarma-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/farm/ctyfarma-airlock-data.gc new file mode 100644 index 0000000000..13c01758db --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/farm/ctyfarma-airlock-data.gc @@ -0,0 +1,36 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctyfarma-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-20" + :on-notice '(when #t '(ctyfarma ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-vis 'ctyfarma) (send-event self 'sound 'enter)) + :on-exit '(begin (want-display 'ctywide #f)) + :on-cross #f + :on-inside '(cond ((task-open? "forest-scouts-get-board")) (else (want-load 'ctyfarma 'mountain #f) (want-sound 'mount1 'mount2 'ctywide1))) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-outer-32" + :on-notice '(cond ((task-closed? "mountain-lens-introduction") '(ctyfarma))) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross '(cond ((or (task-open? "forest-scouts-voicebox") (task-open? "forest-scouts-get-board")) (scene-play "city-get-hoverboard"))) + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-38" + :on-notice '(when #t '(mountain)) + :on-activate #f + :on-enter '(begin (want-display 'mountain 'display) (want-vis 'mountain) (send-event self 'sound 'exit)) + :on-exit '(want-display 'mountain #f) + :on-cross #f + :on-inside '(begin (want-load 'ctyfarma 'ctywide #f) (want-sound 'ctywide1 'ctywide2 'ctyfarm1)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/generic/ctygenb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/generic/ctygenb-airlock-data.gc new file mode 100644 index 0000000000..6aec23a940 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/generic/ctygenb-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctygenb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-15" + :on-notice '(cond ((focus-test? *target* pilot) #f) ((task-closed? "nest-boss-resolution") '(palshaft)) ((task-closed? "palace-boss-resolution") #f) ((task-closed? "palace-cable-introduction") '(palshaft))) + :on-activate '(cond ((focus-test? *target* pilot) #f) ((task-closed? "nest-boss-resolution") (want-load 'ctygenb 'ctywide 'palshaft)) ((task-closed? "palace-boss-resolution") #f) ((task-closed? "palace-cable-introduction") (want-load 'ctygenb 'ctywide 'palshaft))) + :on-enter '(begin (want-display 'palshaft 'display) (want-sound 'ctywide1 'ctywide2 'palcab1)) + :on-exit #f + :on-cross '(want-vis 'palshaft) + :on-inside #f + :on-deactivate '(begin (want-display 'palshaft #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/gungame/gungame-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/gungame/gungame-airlock-data.gc new file mode 100644 index 0000000000..cc471f68c3 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/gungame/gungame-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *gungame-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "hip-door-a-9" + :on-notice '(when (or (not (send-event self 'front)) (and (task-closed? "city-red-gun-training-try-once") (not (task-open? "city-yellow-gun-training-introduction")))) '(ctyport ctywide)) + :on-activate '(want-load 'ctyport 'ctywide 'gungame) + :on-enter '(begin (want-display 'ctyport 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(begin (want-vis 'ctyport) (want-continue "ctyport-gungame")) + :on-inside #f + :on-deactivate '(begin (want-display 'ctyport #f) (want-display 'ctywide #f)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hideout/hideout-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hideout/hideout-airlock-data.gc new file mode 100644 index 0000000000..2c8498de15 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hideout/hideout-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *hideout-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "hide-door-b-2" + :on-notice '(when #t '(hideout)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hiphog/hiphog-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hiphog/hiphog-airlock-data.gc new file mode 100644 index 0000000000..44fb7091cc --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/hiphog/hiphog-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *hiphog-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "hip-door-b-1" + :on-notice '(when #t '(ctyport ctywide)) + :on-activate '(want-load 'ctyport 'ctywide 'hiphog) + :on-enter '(begin (want-display 'ctyport 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(want-vis 'ctyport) + :on-inside #f + :on-deactivate '(begin (want-display 'ctyport #f) (want-display 'ctywide #f)) + ) + (static-airlock-data + :airlock-name "hip-door-a-7" ;; UNUSED + :on-notice #f + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyinda-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyinda-airlock-data.gc new file mode 100644 index 0000000000..dc876d499d --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyinda-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctyinda-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "vin-door-ctyinda-1" + :on-notice '(when (task-closed? "strip-rescue-introduction") '(vinroom)) + :on-activate '(want-load 'vinroom 'ctywide 'ctyinda) + :on-enter '(begin (want-display 'vinroom 'display) (want-sound 'ctywide1 'ctywide2 'vinroom1)) + :on-exit #f + :on-cross '(want-vis 'vinroom) + :on-inside #f + :on-deactivate '(begin (want-display 'vinroom #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + ) + (static-airlock-data + :airlock-name "vin-door-ctyinda-2" + :on-notice '(when (task-closed? "consite-find-baron-introduction") '(consiteb)) + :on-activate '(want-load 'ctyinda 'ctywide 'consiteb) + :on-enter '(begin (want-display 'consiteb 'display) (want-sound 'ctywide1 'ctywide2 #f)) + :on-exit #f + :on-cross '(want-vis 'consiteb) + :on-inside #f + :on-deactivate '(begin (want-display 'consiteb #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyindb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyindb-airlock-data.gc new file mode 100644 index 0000000000..9fcbe58aaa --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/industrial/ctyindb-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctyindb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-13" + :on-notice '(cond ((task-closed? "sewer-escort-introduction") '(sewescb)) ((task-closed? "sewer-enemy-introduction") '(sewerb))) + :on-activate '(cond ((task-closed? "sewer-escort-introduction") (want-load 'sewescb 'ctyindb 'ctywide)) ((task-closed? "sewer-enemy-introduction") (want-load 'sewerb 'ctyindb 'ctywide))) + :on-enter '(cond ((task-closed? "sewer-escort-introduction") (want-display 'sewescb 'display) (want-sound 'ctywide1 'ctywide2 'sewer4)) ((task-closed? "sewer-enemy-introduction") (want-display 'sewerb 'display) (want-sound 'ctywide1 'ctywide2 'sewer1))) + :on-exit #f + :on-cross '(cond ((task-closed? "sewer-escort-introduction") (want-sound 'ctywide1 'ctywide2 'sewer4) '(want-vis 'sewesc)) ((task-closed? "sewer-enemy-introduction") (want-sound 'ctywide1 'ctywide2 'sewer1) '(want-vis 'sewer))) + :on-inside #f + :on-deactivate '(cond ((task-closed? "sewer-escort-introduction") (want-display 'sewescb #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) ((task-closed? "sewer-enemy-introduction") (want-display 'sewerb #f) (want-sound 'ctywide1 'ctywide2 'ctywide3))) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/oracle/oracle-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/oracle/oracle-airlock-data.gc new file mode 100644 index 0000000000..0a0e77da77 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/oracle/oracle-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *oracle-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "oracle-door-1" + :on-notice '(when (or (not (send-event self 'front)) (and (not (task-open? "city-oracle-level0-training")) (not (task-open? "city-oracle-level1-training")))) '(ctyslumc ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctyslumc 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(want-vis 'ctyslumc) + :on-inside #f + :on-deactivate '(begin (want-display 'ctyslumc #f) (want-display 'ctywide #f)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/palace/ctypal-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/palace/ctypal-airlock-data.gc new file mode 100644 index 0000000000..8d56cdf0f7 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/palace/ctypal-airlock-data.gc @@ -0,0 +1,46 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctypal-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "palace-door-1" + :on-notice '(when (or (task-closed? "palace-sneak-in-introduction") (and (not (send-event self 'front)) (< (send-event self 'distance) 400))) '(palshaft)) + :on-activate '(want-load 'ctypal 'ctywide 'palshaft) + :on-enter '(begin (want-display 'palshaft 'display) (want-sound 'ctywide1 'ctywide2 'palcab1) (talker-spawn "cityv021") (unless (send-event com-elevator-3 'query 'player-standing-on?) (send-event com-elevator-3 'jump-to 'bottom))) + :on-exit '(want-display 'palshaft #f) + :on-cross '(want-vis 'palshaft) + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-outer-22" + :on-notice '(when (task-closed? "canyon-insert-items-resolution") '(ctypal)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-27" + :on-notice '(when #t '(ctypal tombd)) + :on-activate #f + :on-enter '(begin (want-display 'tombd 'display) (send-event self 'sound 'exit)) + :on-exit '(want-display 'tombd #f) + :on-cross '(want-vis 'tombd) + :on-inside '(begin (want-load 'ctypal 'ctywide 'ctyport) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-28" + :on-notice '(when #t '(ctypal ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (send-event self 'sound 'enter)) + :on-exit '(want-display 'ctywide #f) + :on-cross '(want-vis 'ctypal) + :on-inside '(begin (want-load 'ctypal 'tombd 'tomba) (want-sound 'ctywide1 'tomb1 'tomb2)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/port/ctyport-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/port/ctyport-airlock-data.gc new file mode 100644 index 0000000000..83808cb772 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/port/ctyport-airlock-data.gc @@ -0,0 +1,46 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctyport-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "hip-door-a-10" + :on-notice '(cond ((task-open? "city-port-run-resolution") #f) ((task-closed? "city-krew-delivery-resolution") '(gungame))) + :on-activate '(want-load 'ctyport 'ctywide 'gungame) + :on-enter '(begin (want-display 'gungame 'display) (want-sound 'ctywide1 'ctywide2 'gungame1)) + :on-exit #f + :on-cross '(begin (want-vis 'gungame) (want-continue "gungame-start")) + :on-inside #f + :on-deactivate '(begin (want-display 'gungame #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + ) + (static-airlock-data + :airlock-name "hip-door-a-20" + :on-notice '(when (task-closed? "under-mech-introduction") '(underb)) + :on-activate '(want-load 'ctyport 'ctywide 'underb) + :on-enter '(want-display 'underb 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'underb #f) + ) + (static-airlock-data + :airlock-name "hip-door-a-21" + :on-notice '(when (and (task-closed? "under-sig-resolution") (not (send-event self 'front))) '(underb)) + :on-activate '(want-load 'ctyport 'ctywide 'underb) + :on-enter '(want-display 'underb 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'underb #f) + ) + (static-airlock-data + :airlock-name "hip-door-a-6" + :on-notice '(cond ((or (task-open? "city-port-run-resolution") (not (task-closed? "city-krew-delivery-delivery"))) #f) (else '(hiphog))) + :on-activate '(want-load 'ctyport 'ctywide 'hiphog) + :on-enter '(begin (want-display 'hiphog 'display) (want-sound 'ctywide1 'ctywide2 'hiphog1)) + :on-exit #f + :on-cross '(want-vis 'hiphog) + :on-inside #f + :on-deactivate '(unless (movie?) (want-display 'hiphog #f) (want-sound 'ctywide1 'ctywide2 'ctywide3) (want-vis 'ctyport)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctysluma-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctysluma-airlock-data.gc new file mode 100644 index 0000000000..5267ef7b7b --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctysluma-airlock-data.gc @@ -0,0 +1,36 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctysluma-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "hide-door-a-3" + :on-notice '(when (and (task-closed? "ruins-tower-resolution") (not (task-open? "city-escort-kid-introduction")) (not (task-open? "city-escort-kid-resolution"))) '(hideout)) + :on-activate #f + :on-enter '(want-display 'hideout 'display) + :on-exit #f + :on-cross '(want-vis 'hideout) + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "fort-entry-gate-17" + :on-notice '(cond ((task-closed? "nest-boss-resolution") '(forresca)) ((task-closed? "fortress-save-friends-resolution") #f) ((task-closed? "fortress-save-friends-introduction") '(forresca)) ((task-closed? "fortress-dump-resolution") #f) ((task-closed? "fortress-dump-introduction") '(fordumpa))) + :on-activate '(cond ((task-closed? "fortress-save-friends-introduction") (want-load 'ctysluma 'ctywide 'forresca)) ((task-closed? "fortress-dump-introduction") (want-load 'ctysluma 'ctywide 'fordumpa))) + :on-enter '(cond ((task-closed? "fortress-save-friends-introduction") (want-display 'forresca 'display) (want-sound 'ctywide1 'ctywide2 'forresc1)) ((task-closed? "fortress-dump-introduction") (want-display 'fordumpa 'display) (want-sound 'ctywide1 'ctywide2 'fordump1))) + :on-exit #f + :on-cross '(cond ((task-closed? "fortress-save-friends-introduction") (want-vis 'forresca)) ((task-closed? "fortress-dump-resolution") #f) ((task-closed? "fortress-dump-introduction") (want-vis 'fordumpa))) + :on-inside #f + :on-deactivate '(begin (want-display 'fordumpa #f) (want-display 'forresca #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + ) + (static-airlock-data + :airlock-name "fort-entry-gate-18" + :on-notice '(when #t '(fordumpc)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(begin (want-display 'fordumpb #f) (want-load 'ctysluma 'ctywide #f)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumb-airlock-data.gc new file mode 100644 index 0000000000..6026b710b4 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumb-airlock-data.gc @@ -0,0 +1,46 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctyslumb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-19" + :on-notice '(when #t '(forexitb)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(begin (cond ((task-closed? "city-help-kid-resolution") (want-load 'ctyslumb 'ctywide)) (else (want-load 'ctyslumb 'ctywide 'ctykora) (want-display 'ctykora 'display) (task-close! "fortress-escape-resolution"))) (want-vis 'ctyslumb) (want-continue "ctyslumb-fort") (want-sound 'ctywide1 'ctywide2 'ctywide3)) + ) + (static-airlock-data + :airlock-name "com-airlock-outer-9" + :on-notice '(when (task-closed? "ruins-tower-introduction") '(ctyslumb ctywide)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-11" + :on-notice '(when #t '(ctyslumb ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-vis 'ctyslumb) (send-event self 'sound 'enter)) + :on-exit '(want-display 'ctywide #f) + :on-cross #f + :on-inside '(begin (want-load 'ctyslumb 'ruins #f) (want-sound 'ruins1 'ruins2 'ctywide1)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-12" + :on-notice '(when #t '(ruins)) + :on-activate #f + :on-enter '(begin (want-display 'ruins 'display) (send-event self 'sound 'exit) (want-vis 'ruins)) + :on-exit '(want-display 'ruins #f) + :on-cross '(want-vis 'ruins) + :on-inside '(begin (want-load 'ctyslumb 'ctywide #f) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumc-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumc-airlock-data.gc new file mode 100644 index 0000000000..8b7817df3a --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/slums/ctyslumc-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ctyslumc-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "oracle-door-3" + :on-notice '(when (task-closed? "atoll-water-resolution") '(oracle)) + :on-activate '(want-load 'ctyslumc 'ctywide 'oracle) + :on-enter '(begin (want-display 'oracle 'display) (want-sound 'ctywide1 'ctywide2 'oracle1)) + :on-exit #f + :on-cross '(want-vis 'oracle) + :on-inside #f + :on-deactivate '(begin (want-display 'oracle #f) (want-sound 'ctywide1 'ctywide2 'ctywide3) (want-vis 'ctyslumc)) + ) + (static-airlock-data + :airlock-name "com-airlock-outer-12" + :on-notice '(when (task-closed? "atoll-water-introduction") '(atollext)) + :on-activate '(want-load 'atollext 'ctyslumc 'ctywide) + :on-enter '(want-display 'atollext 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'atollext #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/stadium/stadium-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/stadium/stadium-airlock-data.gc new file mode 100644 index 0000000000..a621b6fd5b --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/stadium/stadium-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *stadium-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "gar-door-3" + :on-notice '(when #t '(garage)) + :on-activate #f + :on-enter '(begin (want-display 'garage 'display)) + :on-exit #f + :on-cross '(want-vis 'garage) + :on-inside #f + :on-deactivate '(begin (want-display 'garage #f)) + ) + (static-airlock-data + :airlock-name "gar-door-4" + :on-notice '(when #t '(garage)) + :on-activate #f + :on-enter '(begin (want-display 'garage 'display)) + :on-exit #f + :on-cross '(want-vis 'garage) + :on-inside #f + :on-deactivate '(begin (want-display 'garage #f)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/vinroom/vinroom-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/vinroom/vinroom-airlock-data.gc new file mode 100644 index 0000000000..62b3eaefb8 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/city/vinroom/vinroom-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *vinroom-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "vin-door-5" + :on-notice '(when #t '(ctyinda ctywide)) + :on-activate '(want-load 'vinroom 'ctyinda 'ctywide) + :on-enter '(begin (want-display 'ctyinda 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(want-vis 'ctyinda) + :on-inside #f + :on-deactivate '(begin (want-display 'ctyinda #f) (want-display 'ctywide #f)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/drill/drillmtn-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/drill/drillmtn-airlock-data.gc new file mode 100644 index 0000000000..3d97ab3000 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/drill/drillmtn-airlock-data.gc @@ -0,0 +1,46 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *drillmtn-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "drill-elevator-doors-3" + :on-notice '(when #t '(drillb drillmid drillmtn)) + :on-activate #f + :on-enter '(begin (want-display 'drillb 'display)) + :on-exit '(begin (want-display 'drillb #f)) + :on-cross #f + :on-inside '(begin (want-load 'drillmid 'drill 'drillmtn)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "drill-elevator-doors-4" + :on-notice '(unless (task-closed? "drill-mech-resolution") '(drill drillmid drillmtn)) + :on-activate #f + :on-enter '(begin (want-display 'drill 'display)) + :on-exit '(begin (want-display 'drill #f)) + :on-cross #f + :on-inside '(begin (want-load 'drillmid 'drillb 'drillmtn)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "drill-elevator-doors-1" + :on-notice '(when #t '(drillb drillmid drillmtn)) + :on-activate #f + :on-enter '(begin (want-display 'drillb 'display)) + :on-exit '(begin (want-display 'drillb #f)) + :on-cross #f + :on-inside '(begin (want-load 'drillmid 'drill 'drillmtn)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "drill-elevator-doors-2" + :on-notice '(unless (and (task-closed? "drill-mech-started-smashing") (not (task-closed? "drill-mech-smash-consoles"))) '(drill drillmid drillmtn)) + :on-activate #f + :on-enter '(begin (want-display 'drill 'display)) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpa-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpa-airlock-data.gc new file mode 100644 index 0000000000..def1a54d33 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpa-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *fordumpa-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-4" + :on-notice '(when #t '(ctysluma ctywide)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross '(want-vis 'ctysluma) + :on-inside #f + :on-deactivate '(begin (want-display 'ctysluma #f) (want-display 'ctywide #f) (want-load 'fordumpa 'fordumpb #f) (want-sound 'fordump1 'fordump2 'fordump3)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpc-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpc-airlock-data.gc new file mode 100644 index 0000000000..73f9f079b5 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/fordumpc-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *fordumpc-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-14" + :on-notice '(when (task-closed? "fortress-dump-missile") '(ctysluma ctywide)) + :on-activate '(want-load 'ctysluma 'ctywide 'fordumpc) + :on-enter '(begin (want-display 'ctysluma 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(begin (want-display 'ctysluma #f) (want-display 'ctywide #f) (want-sound 'ctywide1 'fordump1 'fordump2)) + ) + (static-airlock-data + :airlock-name "fort-entry-gate-16" + :on-notice '(when #t '(fordumpb fordumpc)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forexitb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forexitb-airlock-data.gc new file mode 100644 index 0000000000..765002ce12 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forexitb-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *forexitb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-5" + :on-notice '(when #t '(ctyslumb ctywide)) + :on-activate '(want-load 'ctyslumb 'ctywide 'forexitb) + :on-enter '(begin (want-display 'ctyslumb 'display) (want-display 'ctywide 'display) (want-sound 'ctywide1 'ctywide2 'forexit1) (task-close! "fortress-escape-resolution")) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(begin (want-display 'ctyslumb #f) (want-display 'ctywide #f) (want-sound 'forexit1 'forexit2 'ctywide1)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forresca-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forresca-airlock-data.gc new file mode 100644 index 0000000000..e49f15d1f6 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forresca-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *forresca-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-7" + :on-notice '(when #t '(ctysluma ctywide)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(begin (want-display 'ctysluma #f) (want-display 'ctywide #f) (want-load 'forresca 'forrescb #f) (want-sound 'ctywide1 'forresc1 'forresc2)) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forrescb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forrescb-airlock-data.gc new file mode 100644 index 0000000000..73af0c6639 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/forrescb-airlock-data.gc @@ -0,0 +1,36 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *forrescb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-8" + :on-notice '(when #t '(forrescb)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross '(want-continue "forrescb-mid") + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "fort-entry-gate-9" + :on-notice '(when #t '(forrescb forresca)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(when (send-event self 'front) (want-load 'prison 'forrescb)) + ) + (static-airlock-data + :airlock-name "fort-entry-gate-11" + :on-notice '(when #t '(prison)) + :on-activate '(want-load 'prison 'forrescb) + :on-enter '(want-display 'prison 'display) + :on-exit #f + :on-cross '(want-sound 'forresc1 'forresc2 'forexit1) + :on-inside #f + :on-deactivate '(want-display 'prison #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/prison-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/prison-airlock-data.gc new file mode 100644 index 0000000000..6d017a5cad --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/fortress/prison-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *prison-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "fort-entry-gate-20" + :on-notice '(when (task-closed? "fortress-save-friends-introduction") '(forrescb)) + :on-activate '(when (task-closed? "fortress-save-friends-introduction") (want-load 'prison 'forrescb)) + :on-enter '(want-display 'forrescb 'display) + :on-exit #f + :on-cross '(want-sound 'forresc1 'forresc2 'forexit1) + :on-inside #f + :on-deactivate '(want-display 'forrescb #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/mountain/mountain-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/mountain/mountain-airlock-data.gc new file mode 100644 index 0000000000..4754822979 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/mountain/mountain-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *mountain-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-4" + :on-notice '(when #t '(ctyfarma)) + :on-activate '(want-load 'mountain 'ctyfarma #f) + :on-enter '(want-display 'ctyfarma 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'ctyfarma #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palcab-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palcab-airlock-data.gc new file mode 100644 index 0000000000..08a3768108 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palcab-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *palcab-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-17" + :on-notice '(when #t '(palshaft)) + :on-activate '(want-load 'palshaft 'palcab 'palroof) + :on-enter '(want-display 'palshaft 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'palshaft #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palent-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palent-airlock-data.gc new file mode 100644 index 0000000000..1779fb5eff --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palent-airlock-data.gc @@ -0,0 +1,56 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *palent-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-25" + :on-notice '(unless (task-closed? "palace-sneak-in-meeting") '(palshaft)) + :on-activate '(unless (task-closed? "palace-sneak-in-meeting") (want-load 'palshaft 'palent 'throne) (want-sound 'ctywide1 'palent1 'palent2)) + :on-enter '(want-display 'palshaft 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'palshaft #f) + ) + (static-airlock-data + :airlock-name "com-airlock-outer-30" + :on-notice '(when #t '(palshaft)) + :on-activate '(begin (want-load 'palshaft 'palent 'palout) (want-sound 'ctywide1 'palent1 'palent2)) + :on-enter '(begin (want-display 'palshaft 'display) (unless (send-event "com-elevator-3" 'query 'player-standing-on?) (send-event "com-elevator-3" 'jump-to 'top))) + :on-exit #f + :on-cross '(begin (want-vis 'palshaft) (task-close! "palace-sneak-in-door")) + :on-inside #f + :on-deactivate '(want-display 'palshaft #f) + ) + (static-airlock-data + :airlock-name "pal-throne-door-2" + :on-notice '(unless (task-closed? "palace-sneak-in-meeting") '(throne palout)) + :on-activate '(unless (task-closed? "palace-sneak-in-meeting") (want-load 'palent 'throne 'palout) (want-sound 'ctywide1 'palent1 'palent2)) + :on-enter '(begin (want-display 'throne 'display) (want-display 'palout 'display)) + :on-exit #f + :on-cross '(want-sound 'palent1 'palent2 'palent3) + :on-inside #f + :on-deactivate '(begin (want-display 'throne #f) (want-display 'palout #f)) + ) + (static-airlock-data + :airlock-name "pal-ent-door-1" + :on-notice '(when (task-closed? "palace-sneak-in-meeting") '(palent)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "pal-ent-door-2" + :on-notice '(when (task-closed? "palace-sneak-in-meeting") '(palent)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palroof-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palroof-airlock-data.gc new file mode 100644 index 0000000000..c5527d32e1 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palroof-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *palroof-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-18" + :on-notice '(when #t '(palshaft)) + :on-activate '(begin (want-load 'palshaft 'palcab 'palroof) (want-sound 'ctywide1 'palcab1 'palcab2)) + :on-enter '(want-display 'palshaft 'display) + :on-exit #f + :on-cross '(task-close! "palace-boss-resolution") + :on-inside #f + :on-deactivate '(want-display 'palshaft #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palshaft-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palshaft-airlock-data.gc new file mode 100644 index 0000000000..852ab5bf9e --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/palshaft-airlock-data.gc @@ -0,0 +1,76 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *palshaft-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-26" + :on-notice '(when #t '(ctypal ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-display 'ctypal 'display)) + :on-exit '(begin (want-display 'ctywide #f) (want-display 'ctypal #f)) + :on-cross '(begin (want-vis 'ctypal) (when (task-open? "palace-sneak-in-resolution") (task-close! "palace-sneak-in-resolution"))) + :on-inside '(cond ((task-closed? "palace-sneak-in-resolution") #f) ((task-closed? "palace-sneak-in-introduction") (want-load 'palshaft 'palent 'throne) (want-sound 'ctywide1 'ctywide2 'palent1)) ((task-closed? "palace-boss-resolution") #f) (else (want-load 'palshaft 'palcab 'palroof) (want-sound 'ctywide1 'ctywide2 'palcab1))) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-outer-20" ;; UNUSED + :on-notice #f + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-25" + :on-notice '(when #t '(palcab palroof)) + :on-activate #f + :on-enter '(begin (want-display 'palroof 'display) (want-display 'palcab 'display) (want-sound 'ctywide1 'palcab1 'palcab2)) + :on-exit '(begin (want-display 'palroof #f) (want-display 'palcab #f) (want-sound 'ctywide1 'palcab1 'palcab2)) + :on-cross '(want-vis 'palroof) + :on-inside '(begin (want-load 'ctypal 'ctywide 'palshaft) (want-sound 'ctywide1 'palcab1 'palcab2)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-23" + :on-notice '(when #t '(palcab palroof)) + :on-activate #f + :on-enter '(begin (want-display 'palcab 'display) (want-display 'palroof 'display)) + :on-exit '(begin (want-display 'palcab #f) (want-display 'palroof #f)) + :on-cross '(want-vis 'palcab) + :on-inside '(begin (want-load 'ctygenb 'ctywide 'palshaft) (want-sound 'ctywide1 'ctywide1 'palcab2)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-36" + :on-notice '(unless (task-closed? "palace-sneak-in-meeting") '(palent)) + :on-activate #f + :on-enter '(begin (want-display 'palent 'display)) + :on-exit '(begin (want-display 'palent #f)) + :on-cross '(want-vis 'palent) + :on-inside '(begin (want-load 'ctypal 'ctywide 'palshaft) (want-sound 'ctywide1 'palent1 'palent2)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-37" + :on-notice '(when (or (not (send-event self 'front)) (< (send-event self 'distance) 8192)) '(palent palout)) + :on-activate #f + :on-enter '(begin (want-display 'palent 'display)) + :on-exit '(begin (want-display 'palent #f)) + :on-cross '(want-vis 'palent) + :on-inside '(begin (want-load 'ctypal 'ctywide 'palshaft) (want-sound 'ctywide1 'ctywide2 'palent1)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-22" + :on-notice '(when #t '(ctygenb ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-display 'ctygenb 'display)) + :on-exit '(begin (want-display 'ctywide #f) (want-display 'ctygenb #f)) + :on-cross '(want-vis 'ctygenb) + :on-inside '(begin (want-load 'palshaft 'palcab 'palroof) (want-sound 'ctywide1 'palcab1 'palcab2)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/throne-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/throne-airlock-data.gc new file mode 100644 index 0000000000..d23e7214ee --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/palace/throne-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *throne-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "pal-throne-door-3" + :on-notice '(unless (task-closed? "palace-sneak-in-meeting") '(palent)) + :on-activate '(want-load 'palent 'throne 'palout) + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/ruins/ruins-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/ruins/ruins-airlock-data.gc new file mode 100644 index 0000000000..fa40e9f6c2 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/ruins/ruins-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *ruins-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-2" + :on-notice '(cond ((focus-test? *target* mech) (setting-pers airlock mode #f time (seconds 24)) #f) (else '(ctyslumb))) + :on-activate '(want-load 'ruins 'ctyslumb #f) + :on-enter '(want-display 'ctyslumb 'display) + :on-exit #f + :on-cross '(cond ((task-closed? "ruins-enemy-resolution") (task-close! "ruins-enemy-exit")) ((task-closed? "ruins-tower-resolution") (task-close! "ruins-tower-exit"))) + :on-inside #f + :on-deactivate '(want-display 'ctyslumb #f) + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewerb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewerb-airlock-data.gc new file mode 100644 index 0000000000..b1042f5ef9 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewerb-airlock-data.gc @@ -0,0 +1,36 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *sewerb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-1" + :on-notice '(when #t '(sewer)) + :on-activate #f + :on-enter '(begin (want-display 'sewer 'display) (want-vis 'sewer) (send-event self 'sound 'exit)) + :on-exit '(want-display 'sewer #f) + :on-cross #f + :on-inside '(begin (want-load 'ctyindb 'ctywide 'sewerb)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-outer-3" + :on-notice '(when #t '(sewerb)) + :on-activate '(begin (when (send-event self 'front) (want-load 'sewer 'sewerb #f) (send-event "sew-elevator-15" 'jump-to 'bottom))) + :on-enter '(want-display 'sewerb 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'sewerb 'display) + ) + (static-airlock-data + :airlock-name "com-airlock-inner-2" + :on-notice '(when #t '(ctyindb ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-display 'ctyindb 'display) (send-event self 'sound 'enter)) + :on-exit '(begin (want-display 'ctywide #f) (want-display 'ctyindb #f)) + :on-cross '(begin (want-vis 'ctyindb) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-inside '(begin (want-load 'sewerb 'sewer #f) (want-sound 'sewer1 'sewer2 'ctywide1)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewescb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewescb-airlock-data.gc new file mode 100644 index 0000000000..2730762d05 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/sewer/sewescb-airlock-data.gc @@ -0,0 +1,36 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *sewescb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-15" + :on-notice '(when #t '(sewesc sewescb)) + :on-activate #f + :on-enter '(begin (want-display 'sewesc 'display) (want-vis 'sewesc) (send-event self 'sound 'exit)) + :on-exit '(want-display 'sewesc #f) + :on-cross #f + :on-inside '(begin (want-load 'ctyindb 'ctywide 'sewescb)) + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-outer-11" + :on-notice '(when #t '(sewescb sewesc)) + :on-activate '(begin (when (send-event self 'front) (want-load 'sewesc 'sewescb #f) (send-event "sew-elevator-25" 'jump-to 'bottom))) + :on-enter '(want-display 'sewescb 'display) + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate '(want-display 'sewescb 'display) + ) + (static-airlock-data + :airlock-name "com-airlock-inner-16" + :on-notice '(when #t '(ctyindb ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctywide 'display) (want-display 'ctyindb 'display) (send-event self 'sound 'enter)) + :on-exit '(begin (want-display 'ctywide #f) (want-display 'ctyindb #f)) + :on-cross '(begin (want-vis 'ctyindb) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-inside '(begin (want-load 'sewescb 'sewesc #f) (want-sound 'sewer4 'sewer5 'ctywide1)) + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tomba-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tomba-airlock-data.gc new file mode 100644 index 0000000000..ffbb5cb024 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tomba-airlock-data.gc @@ -0,0 +1,66 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *tomba-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "tomb-boss-door-1" + :on-notice '(cond ((task-closed? "tomb-boss-resolution") (if (send-event self 'front) #f '(tombboss))) ((task-closed? "tomb-boss-introduction") #f) ((task-closed? "tomb-boss-door") '(tombboss)) ((and (task-closed? "tomb-poles-resolution") (task-closed? "tomb-water-resolution")) (scene-play "tomb-boss-open") #f)) + :on-activate '(when (and (task-closed? "tomb-boss-door") (not (task-closed? "tomb-boss-resolution"))) (want-load 'tomba 'tombboss 'tombext)) + :on-enter '(begin (want-display 'tombboss 'display) (want-display 'tombext 'special)) + :on-exit '(begin (want-display 'tombboss #f) (want-display 'tombext #f)) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "tomb-wing-door-3" + :on-notice '(when (or (not (task-closed? "tomb-water-resolution")) (task-closed? "tomb-boss-resolution")) '(tombc)) + :on-activate #f + :on-enter '(want-display 'tombc 'display) + :on-exit '(want-display 'tombc #f) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "tomb-wing-door-4" + :on-notice '(when (or (not (task-closed? "tomb-poles-resolution")) (task-closed? "tomb-boss-resolution")) '(tombb)) + :on-activate #f + :on-enter '(want-display 'tombb 'display) + :on-exit '(want-display 'tombb #f) + :on-cross '(want-load 'tomba 'tombb 'tombe) + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "tomb-wing-door-1" + :on-notice '(when (and (task-closed? "tomb-poles-boulder") (or (not (task-closed? "tomb-poles-resolution")) (task-closed? "tomb-boss-resolution"))) '(tombb)) + :on-activate #f + :on-enter '(want-display 'tombb 'display) + :on-exit '(want-display 'tombb #f) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "tomb-wing-door-2" + :on-notice '(when (and (task-closed? "tomb-water-vibe") (or (not (task-closed? "tomb-water-resolution")) (task-closed? "tomb-boss-resolution"))) '(tombc)) + :on-activate #f + :on-enter '(want-display 'tombc 'display) + :on-exit '(want-display 'tombc #f) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "tomb-mar-door-2" + :on-notice '(when (task-closed? "tomb-boss-resolution") '(tombd)) + :on-activate '(when (task-closed? "tomb-boss-resolution") (want-load 'tomba 'tombd 'tombb)) + :on-enter '(want-display 'tombd 'display) + :on-exit '(want-display 'tombd #f) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombboss-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombboss-airlock-data.gc new file mode 100644 index 0000000000..cfbc3ce914 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombboss-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *tombboss-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "tomb-wing-door-6" ;; there's no data here + :on-notice #f + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombc-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombc-airlock-data.gc new file mode 100644 index 0000000000..3ade540c71 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombc-airlock-data.gc @@ -0,0 +1,16 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *tombc-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "tomb-wing-door-5" + :on-notice '(when (and (task-closed? "tomb-water-vibe") (or (not (task-closed? "tomb-water-resolution")) (task-closed? "tomb-boss-resolution"))) '(tombc)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombd-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombd-airlock-data.gc new file mode 100644 index 0000000000..c9b143db20 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/tomb/tombd-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *tombd-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-outer-21" + :on-notice '(when #t '(ctypal tombd)) + :on-activate '(want-load 'ctypal 'tombd 'tomba) + :on-enter '(want-display 'ctypal 'display) + :on-exit '(want-display 'ctypal #f) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "tomb-mar-door-1" + :on-notice '(when (task-closed? "tomb-boss-resolution") '(tomba)) + :on-activate '(when (task-closed? "tomb-boss-resolution") (want-load 'ctypal 'tombd 'tomba)) + :on-enter '(want-display 'tomba 'display) + :on-exit '(begin (want-display 'tomba #f) (want-display 'tombb #f) (want-display 'tombc #f)) + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/under-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/under-airlock-data.gc new file mode 100644 index 0000000000..eb340d2be4 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/under-airlock-data.gc @@ -0,0 +1,26 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *under-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-43" + :on-notice '(when (send-event "under-locking-1" 'test #t) '(under)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "com-airlock-inner-44" + :on-notice '(when (send-event "under-locking-1" 'test #f) '(under)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + ) + ) diff --git a/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/underb-airlock-data.gc b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/underb-airlock-data.gc new file mode 100644 index 0000000000..1ff1d60e9b --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/airlock-data/under/underb-airlock-data.gc @@ -0,0 +1,46 @@ +;;-*-Lisp-*- +(in-package goal) + +(define *underb-airlock-data* (new 'static 'boxed-array :type airlock-data + (static-airlock-data + :airlock-name "com-airlock-inner-41" + :on-notice '(when (send-event "under-locking-2" 'test #t) '(under underb)) + :on-activate #f + :on-enter '(want-display 'under 'display) + :on-exit #f + :on-cross '(want-sound 'under1 'under2 'mechwat) + :on-inside #f + :on-deactivate '(want-display 'under #f) + ) + (static-airlock-data + :airlock-name "com-airlock-inner-42" + :on-notice '(when (send-event "under-locking-2" 'test #f) '(under)) + :on-activate #f + :on-enter #f + :on-exit #f + :on-cross #f + :on-inside #f + :on-deactivate #f + ) + (static-airlock-data + :airlock-name "under-door-2" + :on-notice '(when #t '(ctyport ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctyport 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(begin (want-vis 'ctyport) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-inside '(want-load 'underb 'under) + :on-deactivate '(begin (want-display 'ctyport #f) (want-display 'ctywide #f)) + ) + (static-airlock-data + :airlock-name "under-door-4" + :on-notice '(when #t '(ctyport ctywide)) + :on-activate #f + :on-enter '(begin (want-display 'ctyport 'display) (want-display 'ctywide 'display)) + :on-exit #f + :on-cross '(begin (want-vis 'ctyport) (want-sound 'ctywide1 'ctywide2 'ctywide3)) + :on-inside #f + :on-deactivate '(begin (want-display 'ctyport #f) (want-display 'ctywide #f)) + ) + ) + ) From ec5b715816f042037d6a34014814671a5c27469b Mon Sep 17 00:00:00 2001 From: Nick0778 <149975116+Nick0778@users.noreply.github.com> Date: Thu, 29 Jan 2026 03:32:09 -0300 Subject: [PATCH 2/2] Create README.md --- .../mods/airlock-customizable/README.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 goal_src/jak2/engine/mods/airlock-customizable/README.md diff --git a/goal_src/jak2/engine/mods/airlock-customizable/README.md b/goal_src/jak2/engine/mods/airlock-customizable/README.md new file mode 100644 index 0000000000..1ccc8b7649 --- /dev/null +++ b/goal_src/jak2/engine/mods/airlock-customizable/README.md @@ -0,0 +1,170 @@ +## Custom Level Support for Airlocks and Doors + +This branch implements an approach that allows the use of airlocks and every other door type from the game in custom levels. +It also allows editing every vanilla door’s data through files organized by level inside a folder called `airlock-data`. + +**Note:** This system is **disabled by default**. To enable it, go to: +`\goal_src\jak2\dgos\game.gd` +Scroll to the bottom of the file and **uncomment all the lines related to `airlock-customizable` and `airlock-data`**, and **comment out** the original `airlock.o` line. + +It is also recommended to check how vanilla airlock data are defined in these files, as this helps you understand how they work +and serves as a reference when defining their behavior for your own custom levels. + +Below is an example showing **how to add and define airlock entity behavior in a custom level**. + +### Getting Started + +First, you need to create two levels that connect through an entrance, just like the game does for airlocks and doors. + +**Important:** Only one of the two connected levels should be loaded initially. +The other level must remain unloaded, as it will be loaded dynamically by the airlock or door when activated. +This is especially important when choosing to load two different levels connected by an airlock or door. + +A vanilla example of this behavior is the **Sewer entrance**. During the first two missions, the sewer door loads `sewerb`. +In the final sewer mission, the same door instead loads `sewesc`. These are two completely different level geometries that are +conditionally loaded on the other side of the same door depending on game progression. + +Following the same approach used by vanilla airlocks and doors, we’ll begin by setting up the airlock. + +In the first level, which we’ll call `level-a`, add the airlock art group to the level’s `.gd` file. +For this example, we’ll use the following art group: + +`com-airlock-outer-ag` + +png1 + + +Next, add the entity to the custom level’s `.jsonc` file and do the following: + +- Set the `etype` to `com-airlock-outer` +- Add the `idle-distance` lump and set it to `["meters", ]` + (_Defines the maximum distance at which the airlock becomes active_) +- Add the `distance` lump and set it to `["meters", ]` + (_Defines the distance threshold at which the airlock starts opening_) + +Example: + +img1 + +For the second level, let’s call it `level-b`, follow the same process as before. +However, this time use a different airlock art group: + +`com-airlock-inner-ag` + +png2 + +Now, set the `etype` in `level-b` `.jsonc` file to `com-airlock-inner`. + +### Defining Airlock Behavior + +Now, open the file: +`airlock-customizable-h.gc` + +Scroll down to the bottom and copy the following content: + +img2 + +Inside the `airlock-data` folder, create a new folder called, for example, `my-level`. +Inside it, create two `.gc` files. I recommend using the following naming convention: + +`-airlock-data.gc`. + +In this case, the files would be named `level-a-airlock-data.gc` and `level-b-airlock-data.gc`. + +Then, at the top of both files, write `(in-package goal)` and paste the copied content inside each file. +Replace `empty` with the name of the level, matching the file name. + +`level-a-airlock-data.gc` + +img3 + +`level-b-airlock-data.gc` + +img4 + +These files are used to define the behavior of the airlock entities placed in `level-a` and `level-b`. +You can add as many entries as needed for any airlocks or doors placed in your custom levels. + +**Note:** It is recommended to check the `airlock-data` type defined at the top of the file +`airlock-customizable-h.gc` +for a better understanding of what each field shown in the image above does. + +Next, you need to define the behavior for the `level-a` airlock to open and load `level-b`, and vice versa. +Now do the following: + +- Set `:airlock-name` to the name of the airlock entity used in the level’s `.jsonc` file +- Set `:on-notice` to a pair that specifies which level must be loaded for the airlock to open + > This is not limited to a simple pair. You may use more complex GOAL logic such as `cond`, `when`, or other conditional expressions, + as long as the block ultimately evaluates to a valid action like `want-load`, `want-sound`, etc. + This allows airlocks or doors to be locked behind game events, flags, + inventory checks, or to conditionally load different levels behind the same entrance. +- Set `:on-activate` to a pair that loads the required levels using `want-load` +- Set `:on-enter` to a pair that displays the required levels using `want-display`, accompanied by the `'display` symbol + > You can also use `want-sound` here to load any required sound banks +- Set `:on-exit` to a pair that hides the levels using `want-display`, accompanied by the `#f` symbol + +Below is an example: + +`level-a-airlock-data.gc` + +img5 + +`level-b-airlock-data.gc` + +img8 + +You can also optionally define `:on-cross`, `:on-inside`, or `:on-deactivate` for additional behaviors. + +**Note:** If you’re still unsure or want more examples, it’s highly recommended to check the vanilla airlock and door data +inside the `airlock-data` folder, as they serve as a reference for defining airlock and door behavior in custom levels. + +### Initializing the `airlock-data` Array + +Now, you need to initialize the data you set up for the airlock and door entities through the following file: +`airlock-customizable.gc` +At the top of this file, you will find a method called `init-airlock-data-array!`. +This method is responsible for initializing the `airlock-data` array associated with each airlock or door entity for every level. +So, in order to do that you must add new `case` entries that match the airlock or door entity name and assign the corresponding `airlock-data` array to each case. +These new cases should be added before the `else` block, as shown below: + +`airlock-customizable.gc` + +img9 + +### Registering the `airlock-data` Files +After that, go to: + +`\goal_src\jak2\dgos\game.gd` + +Scroll down and add an entry for both created files before `"airlock-customizable.o"`, as shown below: + +img + +### Setting Up `next-actor` Lump + +Finally, you need to set up the `next-actor` lump in both levels’ `.jsonc` files. +This allows the airlock in the level being loaded to open together with the one in the already loaded level. + +To do this, add an `aid` (_Actor ID_) to both airlock entities. +Use a high value like `"aid": 100000` to avoid conflicts with other entities. + +Then add the `next-actor` lump, structured like this: + +`"next-actor": ["uint32", ]` + +Make sure to add **unique IDs** for every airlock entity in your custom levels. +The `level-a` airlock `next-actor` must point to the `level-b` airlock actor ID, and vice versa. + +The result should look like this: + +`level-a.jsonc` + +img6 + +`level-b.jsonc` + +img7 + +After completing this process, rebuild the game and test whether the airlocks work correctly in your custom levels. + +_~~Nick07_