docs: add support for :override-doc in method declarations as well as documenting state handlers (#2139)

Adding support for better child-type method docstrings. This is a
problem unique to methods.

Usually, a child-type will have the same signature and a common name
will apply, but the implementation is different. This means, you
probably want a different docstring to describe what is happening.

Currently this is possible to do via `:replace`. The problem with
replace is two fold:
- a replaced method ends up in the generated `deftype`...because you
usually change the signature!
- we don't put docstrings in the `deftype` in normal GOAL, this is just
something we do for the `all-types` file (they go in the `defmethod`
instead)
- more importantly, this means anytime you now want to change the
parent's name/args/return type -- you have to apply that change
everywhere.

So this is a better design you can now just declare the method like so:
```clj
(:override-doc "my new docstring" <method_id>)
```

And internally a pseudo-replaced method will be added, but it will
inherit everything from the parent (except the docstring of course)

Unrelated - I also made all the keyword args for declaring methods not
depend on ordering

This also adds support for documenting virtual and non-virtual state
handlers. For example:

```clj
  (:states
    (part-tester-idle (:event "test") symbol))
```

or

```clj
(idle () _type_ :state (:event "test") 20)
```

I will probably add the ability to give some sort of over-view docstring
at a later date.

Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
Tyler Wilding
2023-01-21 20:45:45 -05:00
committed by GitHub
parent e5d6ac1c41
commit abf61a94fb
65 changed files with 793 additions and 472 deletions
+2 -8
View File
@@ -281,8 +281,7 @@
;; definition for method 24 of type ashelin-shot
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight ashelin-shot ((obj ashelin-shot))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(draw-beam (-> *part-id-table* 675) (-> obj tail-pos) (-> obj starting-dir) #f #t)
0
(none)
@@ -547,8 +546,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! ashelin-shot ((obj ashelin-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(set! (-> obj attack-mode) 'eco-yellow)
(set! (-> obj max-speed) 307200.0)
@@ -556,7 +554,3 @@
(set! (-> obj timeout) (seconds 1.335))
(none)
)
+2 -4
View File
@@ -281,8 +281,7 @@
;; definition for method 24 of type sig-shot
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight sig-shot ((obj sig-shot))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(draw-beam (-> *part-id-table* 655) (-> obj tail-pos) (-> obj starting-dir) #f #t)
0
(none)
@@ -546,8 +545,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! sig-shot ((obj sig-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(set! (-> obj attack-mode) 'eco-yellow)
(set! (-> obj max-speed) 307200.0)
-18
View File
@@ -4,7 +4,6 @@
;; definition for method 9 of type sigt-wait-spot
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! sigt-wait-spot ((obj sigt-wait-spot))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
@@ -14,7 +13,6 @@
;; definition for method 11 of type sigt-wait-spot
(defmethod ai-task-method-11 sigt-wait-spot ((obj sigt-wait-spot) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(when (>= s4-0 0)
(let ((s3-0 (-> arg0 course spots (-> obj spot-indexes s4-0))))
@@ -63,7 +61,6 @@
;; definition for method 11 of type sigt-fight-focus
(defmethod ai-task-method-11 sigt-fight-focus ((obj sigt-fight-focus) (arg0 bot))
"Virtual"
(let ((a1-1 (handle->process (-> arg0 focus handle))))
(if (and a1-1
(attacked-by-player? arg0 (the-as process-focusable a1-1))
@@ -79,14 +76,12 @@
;; definition for method 10 of type sigt-fight-focus
;; WARN: Return type mismatch bot-flags vs none.
(defmethod ai-task-method-10 sigt-fight-focus ((obj sigt-fight-focus) (arg0 bot))
"Virtual"
(logclear! (-> arg0 bot-flags) (bot-flags bf00))
(none)
)
;; definition for method 11 of type sigt-repair-gun
(defmethod ai-task-method-11 sigt-repair-gun ((obj sigt-repair-gun) (arg0 bot))
"Virtual"
(cond
((not (logtest? (bot-flags bf19) (-> arg0 bot-flags)))
(ai-task-control-method-14 (-> arg0 ai-ctrl) obj arg0)
@@ -219,7 +214,6 @@
;; definition for method 9 of type sigt-choose-piston
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! sigt-choose-piston ((obj sigt-choose-piston))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
@@ -229,7 +223,6 @@
;; definition for method 11 of type sigt-choose-piston
(defmethod ai-task-method-11 sigt-choose-piston ((obj sigt-choose-piston) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(cond
((< s4-0 0)
@@ -264,7 +257,6 @@
;; definition for method 10 of type sigt-choose-piston
(defmethod ai-task-method-10 sigt-choose-piston ((obj sigt-choose-piston) (arg0 bot))
"Virtual"
(clear-poi-and-focus! arg0)
(none)
)
@@ -315,7 +307,6 @@
;; definition for method 9 of type sigt-riding-piston
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! sigt-riding-piston ((obj sigt-riding-piston))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
@@ -326,7 +317,6 @@
;; definition for method 11 of type sigt-riding-piston
;; WARN: Return type mismatch symbol vs none.
(defmethod ai-task-method-11 sigt-riding-piston ((obj sigt-riding-piston) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(when (or (< s4-0 0) (player-blocking-spot? arg0 (-> arg0 course spots (-> obj spot-indexes s4-0))))
(set! s4-0 (choose-spot arg0 (the-as int (-> obj num-spots)) (the-as (pointer uint) (-> obj spot-indexes))))
@@ -353,7 +343,6 @@
;; definition for method 10 of type sigt-riding-piston
(defmethod ai-task-method-10 sigt-riding-piston ((obj sigt-riding-piston) (arg0 bot))
"Virtual"
(clear-poi-and-focus! arg0)
(none)
)
@@ -361,7 +350,6 @@
;; definition for method 9 of type sigt-charge-plasma
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! sigt-charge-plasma ((obj sigt-charge-plasma))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
@@ -371,7 +359,6 @@
;; definition for method 11 of type sigt-charge-plasma
(defmethod ai-task-method-11 sigt-charge-plasma ((obj sigt-charge-plasma) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(when (>= s4-0 0)
(let ((s3-0 (-> arg0 course spots (-> obj spot-indexes s4-0))))
@@ -446,14 +433,9 @@
;; definition for method 10 of type sigt-charge-plasma
;; WARN: Return type mismatch int vs none.
(defmethod ai-task-method-10 sigt-charge-plasma ((obj sigt-charge-plasma) (arg0 bot))
"Virtual"
(clear-poi-and-focus! arg0)
(set! (-> arg0 stack 920) (logand -2 (-> arg0 stack 920)))
(set! (-> arg0 focus-mode) 0)
0
(none)
)
+3
View File
@@ -222,6 +222,9 @@
(adjust-bbox-for-limits-along-axis (_type_ joint-exploder-list int) joint-exploder-list 28)
(adjust-bbox-for-limits (_type_ joint-exploder-list) none 29)
)
(:states
joint-exploder-shatter
)
)
;; definition for method 3 of type joint-exploder
+8
View File
@@ -397,6 +397,9 @@
:method-count-assert 14
:size-assert #x22c
:flag-assert #xe01b0022c
(:states
cam-combiner-active
)
)
;; definition for method 3 of type camera-combiner
@@ -496,6 +499,8 @@
cam-fixed
cam-fixed-read-entity
cam-free-floating
cam-launcher-longfall
cam-launcher-shortfall
cam-lookat
cam-point-watch
cam-pov
@@ -631,6 +636,9 @@
(camera-master-method-15 (_type_ vector) vector 15)
(camera-master-method-16 (_type_ symbol) int 16)
)
(:states
cam-master-active
)
)
;; definition for method 3 of type camera-master
@@ -359,6 +359,9 @@
:method-count-assert 14
:size-assert #xd8
:flag-assert #xe006000d8
(:states
othercam-running
)
)
;; definition for method 3 of type othercam
+5 -10
View File
@@ -17,8 +17,7 @@
;; definition for method 39 of type projectile
;; WARN: Return type mismatch int vs sound-id.
(defmethod play-impact-sound! projectile ((obj projectile))
"Plays impact sound
:virtual"
"Plays impact sound"
(the-as sound-id 0)
)
@@ -122,8 +121,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
;; definition for method 24 of type projectile
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight projectile ((obj projectile))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
0
(none)
)
@@ -427,8 +425,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
;; definition for method 31 of type projectile
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! projectile ((obj projectile))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
0
(none)
)
@@ -664,8 +661,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
;; definition for method 39 of type projectile-bounce
(defmethod play-impact-sound! projectile-bounce ((obj projectile-bounce))
"Plays impact sound
:virtual"
"Plays impact sound"
(let* ((a2-0 (-> obj root-override))
(v1-0 (-> a2-0 status))
)
@@ -721,8 +717,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
;; definition for method 31 of type projectile-bounce
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! projectile-bounce ((obj projectile-bounce))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj max-speed) 450560.0)
(set! (-> obj timeout) (seconds 1.6))
(set! (-> obj update-velocity) projectile-bounce-update-velocity)
+3
View File
@@ -23,6 +23,9 @@
:method-count-assert 14
:size-assert #x8c
:flag-assert #xe0010008c
(:states
part-tester-idle
)
)
;; definition for method 3 of type part-tester
+3
View File
@@ -16,6 +16,9 @@
:method-count-assert 20
:size-assert #xcc
:flag-assert #x14005000cc
(:states
viewer-process
)
)
;; definition for method 3 of type viewer
+4
View File
@@ -33,6 +33,10 @@
(relocate-nav (_type_ int) none 18)
(evaluate-joint-control (_type_) none 19)
)
(:states
(process-drawable-art-error string)
process-drawable-idle
)
)
;; definition for method 3 of type process-drawable
+5 -8
View File
@@ -72,7 +72,9 @@
;; definition for method 18 of type curve-control
(defmethod total-distance curve-control ((obj curve-control))
"Calcuate the total path length by summing the distance between each adjacent [[curve]] vertex"
"Will lazily calculate and set the [[curve]]'s `length`
@returns total path length of the [[curve]]
@see [[curve-length]]"
(let ((f0-0 (-> obj curve length)))
(when (= f0-0 0.0)
(set! f0-0 (curve-length (-> obj curve)))
@@ -325,8 +327,7 @@ using the fractional component of `idx` as the interpolant, return this result
;; definition for method 12 of type curve-control
(defmethod displacement-between-two-points-copy! curve-control ((obj curve-control) (ret vector) (percent float) (mag float))
"Calls [[path-control::26]] with the provided args
@see [[path-control::26]]"
"Calls [[path-control::26]] with the `idx` at a given percent along the path @see [[path-control::26]]"
(displacement-between-two-points! obj ret (/ percent (the float (+ (-> obj curve num-cverts) -1))) mag)
)
@@ -354,11 +355,7 @@ using the fractional component of `idx` as the interpolant, return this result
;; definition for method 13 of type curve-control
(defmethod displacement-between-two-points-normalized! curve-control ((obj curve-control) (ret vector) (idx float))
"Calls [[path-control::26], with the provided `idx`
@param! ret The [[vector]] the result is stored within
@param idx The vertex index
@returns The resulting displacement vector, normalized
@see [[path-control::26]]"
"@see [[curve-control::12]]"
(displacement-between-points-at-percent-normalized!
obj
ret
+3
View File
@@ -77,6 +77,9 @@
:method-count-assert 14
:size-assert #xd0
:flag-assert #xe005000d0
(:states
time-of-day-tick
)
)
;; definition for method 3 of type time-of-day-proc
-2
View File
@@ -2249,7 +2249,6 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 10 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod nav-state-method-10 nav-state ((obj nav-state))
"Virtual/Stub"
0
(none)
)
@@ -2522,7 +2521,6 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
;; definition for method 50 of type nav-state
;; WARN: Return type mismatch int vs none.
(defmethod nav-state-method-50 nav-state ((obj nav-state))
"Virtual/Stub"
0
(none)
)
+2 -4
View File
@@ -66,8 +66,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight gun-blue-shot ((obj gun-blue-shot))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(let* ((s5-0 (ppointer->process (-> obj parent)))
(s4-0 (-> *part-id-table* 196))
(s3-0 (get-field-spec-by-id s4-0 (sp-field-id spt-omega)))
@@ -343,8 +342,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-blue-shot ((obj gun-blue-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(with-pp
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1))
(set! (-> obj init-pos quad) (-> obj root-override trans quad))
+1 -2
View File
@@ -166,8 +166,7 @@
;; definition for method 31 of type gun-dark-shot
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-dark-shot ((obj gun-dark-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj attack-mode) 'eco-dark)
(vector-normalize! (-> obj root-override transv) (+ 225280.0 (* 225280.0 (-> obj charge-level))))
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 72) obj))
+5 -10
View File
@@ -26,8 +26,7 @@
;; definition for method 31 of type gun-eject
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-eject ((obj gun-eject))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-gun" (the-as (pointer uint32) #f)))
@@ -73,8 +72,7 @@
;; definition for method 31 of type gun-mag-yellow
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-mag-yellow ((obj gun-mag-yellow))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-yellow" (the-as (pointer uint32) #f)))
@@ -114,8 +112,7 @@
;; definition for method 31 of type gun-mag-red
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-mag-red ((obj gun-mag-red))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-red" (the-as (pointer uint32) #f)))
@@ -155,8 +152,7 @@
;; definition for method 31 of type gun-mag-blue
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-mag-blue ((obj gun-mag-blue))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-blue" (the-as (pointer uint32) #f)))
@@ -196,8 +192,7 @@
;; definition for method 31 of type gun-mag-dark
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-mag-dark ((obj gun-mag-dark))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-dark" (the-as (pointer uint32) #f)))
+2 -4
View File
@@ -80,8 +80,7 @@
;; definition for method 24 of type gun-yellow-shot
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight gun-yellow-shot ((obj gun-yellow-shot))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(draw-beam (-> *part-id-table* 227) (-> obj tail-pos) (-> obj starting-dir) #f #t)
0
(none)
@@ -409,8 +408,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! gun-yellow-shot ((obj gun-yellow-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj hit-actor?) #f)
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1))
+1 -2
View File
@@ -416,8 +416,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch projectile-options vs none.
(defmethod init-proj-settings! turret-shot ((obj turret-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1))
(set! (-> obj attack-mode) 'turret)
+6
View File
@@ -190,6 +190,12 @@
(update-value-callback (_type_ int int) none 25)
(alloc-string-if-needed (_type_ int) none 26)
)
(:states
hud-arriving
hud-hidden
hud-in
(hud-leaving float)
)
)
;; definition for method 3 of type hud
+1 -2
View File
@@ -411,8 +411,7 @@
;; definition for method 31 of type juicer-shot
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! juicer-shot ((obj juicer-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(logior! (-> obj options) (projectile-options proj-options-8000))
(set! (-> obj attack-mode) 'eco-yellow)
(set! (-> obj move) juicer-proj-move)
-6
View File
@@ -4,7 +4,6 @@
;; definition for method 9 of type kidt-wait-spot
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! kidt-wait-spot ((obj kidt-wait-spot))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
@@ -15,7 +14,6 @@
;; definition for method 11 of type kidt-wait-spot
;; WARN: Return type mismatch symbol vs none.
(defmethod ai-task-method-11 kidt-wait-spot ((obj kidt-wait-spot) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(when (>= s4-0 0)
(let ((s3-0 (-> arg0 course spots (-> obj spot-indexes s4-0))))
@@ -45,7 +43,3 @@
((-> obj check-done) obj (the-as kid arg0))
(none)
)
-6
View File
@@ -4,7 +4,6 @@
;; definition for method 9 of type kort-wait-spot
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! kort-wait-spot ((obj kort-wait-spot))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) -1)
(set! (-> obj num-spots) (the-as uint 0))
@@ -15,7 +14,6 @@
;; definition for method 11 of type kort-wait-spot
;; WARN: Return type mismatch symbol vs none.
(defmethod ai-task-method-11 kort-wait-spot ((obj kort-wait-spot) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(when (>= s4-0 0)
(let ((s3-0 (-> arg0 course spots (-> obj spot-indexes s4-0))))
@@ -45,7 +43,3 @@
((-> obj check-done) obj (the-as kor arg0))
(none)
)
-7
View File
@@ -105,7 +105,6 @@
;; definition for method 11 of type ai-task
;; WARN: Return type mismatch int vs none.
(defmethod ai-task-method-11 ai-task ((obj ai-task) (arg0 bot))
"Virtual"
0
(none)
)
@@ -113,7 +112,6 @@
;; definition for method 10 of type ai-task
;; WARN: Return type mismatch int vs none.
(defmethod ai-task-method-10 ai-task ((obj ai-task) (arg0 bot))
"Virtual"
0
(none)
)
@@ -121,7 +119,6 @@
;; definition for method 9 of type ai-task
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! ai-task ((obj ai-task))
"Virtual"
0
(none)
)
@@ -317,7 +314,3 @@
)
(none)
)
-1
View File
@@ -870,7 +870,6 @@
;; definition for method 24 of type elec-gate
;; WARN: Return type mismatch int vs none.
(defmethod elec-gate-method-24 elec-gate ((obj elec-gate))
"virtual"
0
(none)
)
@@ -197,8 +197,7 @@
;; definition for method 31 of type centurion-shot
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! centurion-shot ((obj centurion-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
((the-as (function projectile none) (find-parent-method centurion-shot 31)) obj)
(set! (-> obj max-speed) 327680.0)
(set! (-> obj timeout) (seconds 1.25))
+1 -2
View File
@@ -43,8 +43,7 @@
;; definition for method 31 of type spyder-shot
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! spyder-shot ((obj spyder-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
((the-as (function projectile none) (find-parent-method spyder-shot 31)) obj)
(set! (-> obj max-speed) 307200.0)
(set! (-> obj timeout) (seconds 0.267))
+5 -10
View File
@@ -363,8 +363,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight guard-shot ((obj guard-shot))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(draw-beam (-> *part-id-table* 610) (-> obj tail-pos) (-> obj starting-dir) #f #t)
(let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> obj starting-dir) 2048.0))
(v1-2 (vector+! (new 'stack-no-clear 'vector) (-> obj tail-pos) a0-3))
@@ -703,8 +702,7 @@
;; definition for method 31 of type guard-shot
;; INFO: Used lq/sq
(defmethod init-proj-settings! guard-shot ((obj guard-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj hit-actor?) #f)
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(set! (-> obj attack-mode) 'guard-shot)
@@ -805,8 +803,7 @@
;; definition for method 31 of type vehicle-grenade
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! vehicle-grenade ((obj vehicle-grenade))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj attack-mode) 'eco-dark)
(initialize-skeleton
obj
@@ -845,8 +842,7 @@
;; definition for method 39 of type vehicle-grenade
(defmethod play-impact-sound! vehicle-grenade ((obj vehicle-grenade))
"Plays impact sound
:virtual"
"Plays impact sound"
(let* ((a2-0 (-> obj root-override))
(v1-0 (-> a2-0 status))
)
@@ -1120,8 +1116,7 @@
;; definition for method 31 of type guard-lazer-shot
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! guard-lazer-shot ((obj guard-lazer-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj attack-mode) 'shock)
(set! (-> obj max-speed) 131072.0)
(set! (-> obj timeout) (seconds 0.125))
+3 -6
View File
@@ -348,8 +348,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight metalhead-shot ((obj metalhead-shot))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(draw-beam (-> *part-id-table* 624) (-> obj tail-pos) (-> obj starting-dir) #f #t)
(let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> obj starting-dir) 2048.0))
(v1-2 (vector+! (new 'stack-no-clear 'vector) (-> obj tail-pos) a0-3))
@@ -601,8 +600,7 @@
;; definition for method 31 of type metalhead-shot
;; INFO: Used lq/sq
(defmethod init-proj-settings! metalhead-shot ((obj metalhead-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(set! (-> obj attack-mode) 'metalhead-shot)
(set! (-> obj max-speed) 532480.0)
@@ -994,8 +992,7 @@
;; definition for method 31 of type metalhead-grenade-shot
;; WARN: Return type mismatch sound-id vs none.
(defmethod init-proj-settings! metalhead-grenade-shot ((obj metalhead-grenade-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj attack-mode) 'eco-yellow)
(set! (-> obj blast-radius) 4096.0)
(set! (-> obj max-speed) 135168.0)
+2 -4
View File
@@ -577,8 +577,7 @@ This commonly includes things such as:
;; INFO: Used lq/sq
;; WARN: Return type mismatch time-frame vs sound-id.
(defmethod play-impact-sound! dig-spikey-sphere ((obj dig-spikey-sphere))
"Plays impact sound
:virtual"
"Plays impact sound"
(let* ((a0-1 (-> obj root-override))
(s5-0 (-> a0-1 status))
)
@@ -677,8 +676,7 @@ This commonly includes things such as:
;; definition for method 31 of type dig-spikey-sphere
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! dig-spikey-sphere ((obj dig-spikey-sphere))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(with-pp
(set! (-> obj attack-mode) 'eco-dark)
(initialize-skeleton
+1 -2
View File
@@ -206,8 +206,7 @@
;; definition for method 31 of type predator-shot
;; INFO: Used lq/sq
(defmethod init-proj-settings! predator-shot ((obj predator-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(set! (-> obj attack-mode) 'predator-shot)
(set! (-> obj max-speed) 532480.0)
@@ -1525,13 +1525,8 @@
;; definition for method 24 of type fort-elec-gate
;; WARN: Return type mismatch int vs none.
(defmethod elec-gate-method-24 fort-elec-gate ((obj fort-elec-gate))
"virtual"
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 551) obj))
(set! (-> obj part-off) (create-launch-control (-> *part-group-id-table* 552) obj))
0
(none)
)
@@ -790,8 +790,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-proj-settings! fort-robotank-shot ((obj fort-robotank-shot))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(set! (-> obj tail-pos quad) (-> obj root-override trans quad))
(set! (-> obj attack-mode) 'fort-robotank-shot)
(set! (-> obj max-speed) 819200.0)
@@ -1560,13 +1560,8 @@
;; definition for method 24 of type fort-elec-gate
;; WARN: Return type mismatch int vs none.
(defmethod elec-gate-method-24 fort-elec-gate ((obj fort-elec-gate))
"virtual"
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 653) obj))
(set! (-> obj part-off) (create-launch-control (-> *part-group-id-table* 654) obj))
0
(none)
)
+2 -4
View File
@@ -1289,8 +1289,7 @@ This commonly includes things such as:
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod draw-laser-sight grenade ((obj grenade))
"TODO - confirm If applicable, draw the laser sight particles
:virtual"
"TODO - confirm If applicable, draw the laser sight particles"
(let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-0
(let ((t9-1 (method-of-type part-tracker activate)))
@@ -1573,8 +1572,7 @@ This commonly includes things such as:
;; definition for method 31 of type grenade
(defmethod init-proj-settings! grenade ((obj grenade))
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc
:virtual"
"Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc"
(with-pp
(initialize-skeleton
obj
-6
View File
@@ -4,7 +4,6 @@
;; definition for method 9 of type halt-wait-spot
;; WARN: Return type mismatch int vs none.
(defmethod reset-task! halt-wait-spot ((obj halt-wait-spot))
"Virtual"
(set! (-> obj check-done) #f)
(set! (-> obj which-spot) 0)
(set! (-> obj num-spots) (the-as uint 1))
@@ -15,7 +14,6 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch symbol vs none.
(defmethod ai-task-method-11 halt-wait-spot ((obj halt-wait-spot) (arg0 bot))
"Virtual"
(let ((s4-0 (-> obj which-spot)))
(if (logtest? *display-bot-marks* (bot-marks-controls bmc16))
(bot-debug-draw-spot-sphere
@@ -35,7 +33,3 @@
((-> obj check-done) obj (the-as hal arg0))
(none)
)
+1 -1
View File
@@ -766,7 +766,7 @@ TEST_F(WithGameTests, StaticLambda) {
{"Add: 30 sub: -10\n0\n"});
}
TEST_F(WithGameTests, StaticLambdaArrayDraft) {
TEST_F(WithGameTests, StaticLambdaArray) {
shared_compiler->runner.run_static_test(testCategory, "test-static-array-of-lambdas.gc",
{"2\n1\n0\n"});
}