diff --git a/base.nls b/base.nls index 9c24bd9..dd8a740 100644 --- a/base.nls +++ b/base.nls @@ -62,6 +62,7 @@ to do-base-logic end to claim-base [claimer] + debug who "BASE-CLAIM" (word "by " ([who] of claimer) ": " team " -> " [team] of claimer) set team [team] of claimer set color get-base-color end @@ -107,12 +108,13 @@ to regenerate end to base-shot-at - debug "BASE-SHOT" (word who " by " ([shooter] of myself)) set armor armor - 1 ifelse armor > 0 [ + debug who "BASE-SHOT" (word "by " ([shooter] of myself)) explode "decay" play-sound "shot" ] [ + debug who "BASE-KILL" (word "by " ([shooter] of myself)) explode "shot" play-sound "kill" ] diff --git a/explosion.nls b/explosion.nls index e1972dc..1791623 100644 --- a/explosion.nls +++ b/explosion.nls @@ -31,7 +31,6 @@ to make-explosions-table end to explode [name] - debug "EXPLODE" name let data table:get explodes name foreach data [ create-explosion ? diff --git a/lobo.nlogo b/lobo.nlogo index 8a04228..c93d646 100644 --- a/lobo.nlogo +++ b/lobo.nlogo @@ -82,10 +82,10 @@ end ;; Other procedures ;; ================ -to debug [action msg] +to debug [agent action msg] ; Comment this and remove the output box ; to turn off debugging info: - output-print (word (round timer) ": " action ": " msg) + output-print (word (round timer) ": " agent ": " action " (" msg ")") end to setup-defaults diff --git a/tank.nls b/tank.nls index 5b6b830..c1c6fca 100644 --- a/tank.nls +++ b/tank.nls @@ -95,7 +95,7 @@ end to fire if fire-cool-down = 0 [ ifelse ammunition > 0 [ - debug "FIRE" (word who " (" ammunition " left)") + debug who "TANK-FIRE" (word ammunition " left") set ammunition ammunition - 1 fire-bullet play-sound "fire" @@ -107,7 +107,7 @@ to fire end to tank-shot-at - debug "SHOT" (word who " by " ([shooter] of myself)) + debug who "TANK-SHOT" (word "by " ([shooter] of myself)) set armor armor - 1 ifelse armor = 0 [ explode "kill" @@ -120,7 +120,7 @@ to tank-shot-at end to kill-tank - debug "KILL" (word who " by " ([shooter] of myself)) + debug who "TANK-KILL" (word "by " ([shooter] of myself)) if is-player? [ set player-deaths player-deaths + 1 ]