diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/client/user-interface.lisp b/client/user-interface.lisp index c6077b4..00e2e8b 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -77,7 +77,9 @@ (while (not (runningp)) ;;TODO replace with `loop' (sleep 0.5)) (connect-server) - (query-server "signup localuser default")) ;;just use a default user + (query-server "signup" + (query-user scr "What is your name?" :cls T) + "default")) (defun choose-world-size (scr) "Let the user choose his preferred world size" diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/client/user-interface.lisp b/client/user-interface.lisp index c6077b4..00e2e8b 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -77,7 +77,9 @@ (while (not (runningp)) ;;TODO replace with `loop' (sleep 0.5)) (connect-server) - (query-server "signup localuser default")) ;;just use a default user + (query-server "signup" + (query-user scr "What is your name?" :cls T) + "default")) (defun choose-world-size (scr) "Let the user choose his preferred world size" diff --git a/content/biomes.lisp b/content/biomes.lisp index 4f20bd9..c678443 100644 --- a/content/biomes.lisp +++ b/content/biomes.lisp @@ -15,7 +15,7 @@ (new-biome grassland :ground "tall elephant grass" - :char #\; :col ':yellow + :char #\; :col :yellow :features '((acacia 100) (boulder 200) (impala 500) (warthog 600) (lion 2400) (leopard 3000) @@ -24,29 +24,29 @@ (new-biome forest :ground "leaf litter and small shrubs" - :char #\. :col ':green + :char #\. :col :green :features '((miombo 10) (acacia 15) (warthog 500) (impala 800) (elephant 1000) (leopard 3200))) ;TODO (new-biome stream :ground "shallow flowing water" - :char #\~ :col ':blue + :char #\~ :col :blue :features '()) ;TODO (new-biome swamp :ground "short sedge grass growing on boggy black soil" - :char #\w :col ':green + :char #\w :col :green :features '((warthog 500) (buffalo 400) (lion 3000))) ;TODO (new-biome hill :ground "hard, stony soil" - :char #\m :col ':cyan ;XXX very bright - hurts the eyes... + :char #\m :col :cyan ;XXX very bright - hurts the eyes... :features '((boulder 20) (miombo 80) (warthog 600) (leopard 3200))) ;TODO (new-biome desert :ground "deep, drifting sand" - :char #\^ :col ':white ;XXX yellow would be better, but shows up brown + :char #\^ :col :white ;XXX yellow would be better, but shows up brown :features '((cactus 100) (boulder 200) (oryx 800) (lion 3600))) ;TODO diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/client/user-interface.lisp b/client/user-interface.lisp index c6077b4..00e2e8b 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -77,7 +77,9 @@ (while (not (runningp)) ;;TODO replace with `loop' (sleep 0.5)) (connect-server) - (query-server "signup localuser default")) ;;just use a default user + (query-server "signup" + (query-user scr "What is your name?" :cls T) + "default")) (defun choose-world-size (scr) "Let the user choose his preferred world size" diff --git a/content/biomes.lisp b/content/biomes.lisp index 4f20bd9..c678443 100644 --- a/content/biomes.lisp +++ b/content/biomes.lisp @@ -15,7 +15,7 @@ (new-biome grassland :ground "tall elephant grass" - :char #\; :col ':yellow + :char #\; :col :yellow :features '((acacia 100) (boulder 200) (impala 500) (warthog 600) (lion 2400) (leopard 3000) @@ -24,29 +24,29 @@ (new-biome forest :ground "leaf litter and small shrubs" - :char #\. :col ':green + :char #\. :col :green :features '((miombo 10) (acacia 15) (warthog 500) (impala 800) (elephant 1000) (leopard 3200))) ;TODO (new-biome stream :ground "shallow flowing water" - :char #\~ :col ':blue + :char #\~ :col :blue :features '()) ;TODO (new-biome swamp :ground "short sedge grass growing on boggy black soil" - :char #\w :col ':green + :char #\w :col :green :features '((warthog 500) (buffalo 400) (lion 3000))) ;TODO (new-biome hill :ground "hard, stony soil" - :char #\m :col ':cyan ;XXX very bright - hurts the eyes... + :char #\m :col :cyan ;XXX very bright - hurts the eyes... :features '((boulder 20) (miombo 80) (warthog 600) (leopard 3200))) ;TODO (new-biome desert :ground "deep, drifting sand" - :char #\^ :col ':white ;XXX yellow would be better, but shows up brown + :char #\^ :col :white ;XXX yellow would be better, but shows up brown :features '((cactus 100) (boulder 200) (oryx 800) (lion 3600))) ;TODO diff --git a/params.lisp b/params.lisp index d8d9db5..3b1f3fa 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21898)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/client/user-interface.lisp b/client/user-interface.lisp index c6077b4..00e2e8b 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -77,7 +77,9 @@ (while (not (runningp)) ;;TODO replace with `loop' (sleep 0.5)) (connect-server) - (query-server "signup localuser default")) ;;just use a default user + (query-server "signup" + (query-user scr "What is your name?" :cls T) + "default")) (defun choose-world-size (scr) "Let the user choose his preferred world size" diff --git a/content/biomes.lisp b/content/biomes.lisp index 4f20bd9..c678443 100644 --- a/content/biomes.lisp +++ b/content/biomes.lisp @@ -15,7 +15,7 @@ (new-biome grassland :ground "tall elephant grass" - :char #\; :col ':yellow + :char #\; :col :yellow :features '((acacia 100) (boulder 200) (impala 500) (warthog 600) (lion 2400) (leopard 3000) @@ -24,29 +24,29 @@ (new-biome forest :ground "leaf litter and small shrubs" - :char #\. :col ':green + :char #\. :col :green :features '((miombo 10) (acacia 15) (warthog 500) (impala 800) (elephant 1000) (leopard 3200))) ;TODO (new-biome stream :ground "shallow flowing water" - :char #\~ :col ':blue + :char #\~ :col :blue :features '()) ;TODO (new-biome swamp :ground "short sedge grass growing on boggy black soil" - :char #\w :col ':green + :char #\w :col :green :features '((warthog 500) (buffalo 400) (lion 3000))) ;TODO (new-biome hill :ground "hard, stony soil" - :char #\m :col ':cyan ;XXX very bright - hurts the eyes... + :char #\m :col :cyan ;XXX very bright - hurts the eyes... :features '((boulder 20) (miombo 80) (warthog 600) (leopard 3200))) ;TODO (new-biome desert :ground "deep, drifting sand" - :char #\^ :col ':white ;XXX yellow would be better, but shows up brown + :char #\^ :col :white ;XXX yellow would be better, but shows up brown :features '((cactus 100) (boulder 200) (oryx 800) (lion 3600))) ;TODO diff --git a/params.lisp b/params.lisp index d8d9db5..3b1f3fa 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21898)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/server/item-methods.lisp b/server/item-methods.lisp index d269cb5..59ceb70 100644 --- a/server/item-methods.lisp +++ b/server/item-methods.lisp @@ -3,7 +3,7 @@ ;;;; set in Africa. ;;;; ;;;; This file defines all CLOS methods used in the game for the different -;;;; item classes. +;;;; item classes (human methods are separate in player.lisp). ;;;; ;;;; (c) 2018 Daniel Vedder, MIT license ;;;; @@ -15,6 +15,7 @@ (let* ((here (coord (.x a) (.y a))) (target (coordsindir (.x a) (.y a) dir)) (target-patch (coord (first target) (second target)))) + ;;XXX more conditions? (cond ((null target-patch) (logf 3 "~S is attempting to move out of bounds ~S" a target) 'OUT-OF-BOUNDS) @@ -41,30 +42,32 @@ (leading-vowl (.name d)) (leading-vowel (.name tl))) NIL))) -;;TODO (defmethod attack ((f feature) (tl tool))) -;;TODO (defmethod attack ((a animal) (w weapon))) +;;TODO (defmethod attack ((at attacker) (f feature) (tl tool))) +;;TODO (defmethod attack ((at attacker) (an animal) (w weapon))) (defmethod update ((a animal)) (when (> (age-of-the-world) (.last-move a)) (random-move a) (incf (.last-move a)))) - + +(defmethod habitat-p ((a animal) b) + "Is the biome b a possible habitat of animal a?" + ;;XXX Don't quite like this, but it works + (when (eq (.habitat a) T) + (return-from habitat-p T)) + (dolist (h (.habitat a)) + (when (equalp (symbol-to-string h) (biome-name b)) + (return T)))) + (defmethod random-move ((a animal)) "Move in a random direction within the species' habitat niche" - ;;TODO rewrite with `move' (do* ((dir (random-elt *directions*) (random-elt *directions*)) (next-patch (patchindir (.x a) (.y a) dir) (patchindir (.x a) (.y a) dir)) (ttl 10 (1- ttl))) - ((zerop ttl) - NIL) + ((zerop ttl) NIL) (when (and next-patch (null (patch-occupant next-patch)) - (member (read-from-string - (biome-name (patch-biome next-patch))) - (.habitat a))) - (setf (patch-occupant (coord (.x a) (.y a))) NIL) - (setf (.x a) (first (patch-pos next-patch)) - (.y a) (second (patch-pos next-patch))) - (setf (patch-occupant next-patch) a) + (habitat-p a (patch-biome next-patch))) + (move a dir) (return-from random-move a)))) diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/client/user-interface.lisp b/client/user-interface.lisp index c6077b4..00e2e8b 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -77,7 +77,9 @@ (while (not (runningp)) ;;TODO replace with `loop' (sleep 0.5)) (connect-server) - (query-server "signup localuser default")) ;;just use a default user + (query-server "signup" + (query-user scr "What is your name?" :cls T) + "default")) (defun choose-world-size (scr) "Let the user choose his preferred world size" diff --git a/content/biomes.lisp b/content/biomes.lisp index 4f20bd9..c678443 100644 --- a/content/biomes.lisp +++ b/content/biomes.lisp @@ -15,7 +15,7 @@ (new-biome grassland :ground "tall elephant grass" - :char #\; :col ':yellow + :char #\; :col :yellow :features '((acacia 100) (boulder 200) (impala 500) (warthog 600) (lion 2400) (leopard 3000) @@ -24,29 +24,29 @@ (new-biome forest :ground "leaf litter and small shrubs" - :char #\. :col ':green + :char #\. :col :green :features '((miombo 10) (acacia 15) (warthog 500) (impala 800) (elephant 1000) (leopard 3200))) ;TODO (new-biome stream :ground "shallow flowing water" - :char #\~ :col ':blue + :char #\~ :col :blue :features '()) ;TODO (new-biome swamp :ground "short sedge grass growing on boggy black soil" - :char #\w :col ':green + :char #\w :col :green :features '((warthog 500) (buffalo 400) (lion 3000))) ;TODO (new-biome hill :ground "hard, stony soil" - :char #\m :col ':cyan ;XXX very bright - hurts the eyes... + :char #\m :col :cyan ;XXX very bright - hurts the eyes... :features '((boulder 20) (miombo 80) (warthog 600) (leopard 3200))) ;TODO (new-biome desert :ground "deep, drifting sand" - :char #\^ :col ':white ;XXX yellow would be better, but shows up brown + :char #\^ :col :white ;XXX yellow would be better, but shows up brown :features '((cactus 100) (boulder 200) (oryx 800) (lion 3600))) ;TODO diff --git a/params.lisp b/params.lisp index d8d9db5..3b1f3fa 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21898)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/server/item-methods.lisp b/server/item-methods.lisp index d269cb5..59ceb70 100644 --- a/server/item-methods.lisp +++ b/server/item-methods.lisp @@ -3,7 +3,7 @@ ;;;; set in Africa. ;;;; ;;;; This file defines all CLOS methods used in the game for the different -;;;; item classes. +;;;; item classes (human methods are separate in player.lisp). ;;;; ;;;; (c) 2018 Daniel Vedder, MIT license ;;;; @@ -15,6 +15,7 @@ (let* ((here (coord (.x a) (.y a))) (target (coordsindir (.x a) (.y a) dir)) (target-patch (coord (first target) (second target)))) + ;;XXX more conditions? (cond ((null target-patch) (logf 3 "~S is attempting to move out of bounds ~S" a target) 'OUT-OF-BOUNDS) @@ -41,30 +42,32 @@ (leading-vowl (.name d)) (leading-vowel (.name tl))) NIL))) -;;TODO (defmethod attack ((f feature) (tl tool))) -;;TODO (defmethod attack ((a animal) (w weapon))) +;;TODO (defmethod attack ((at attacker) (f feature) (tl tool))) +;;TODO (defmethod attack ((at attacker) (an animal) (w weapon))) (defmethod update ((a animal)) (when (> (age-of-the-world) (.last-move a)) (random-move a) (incf (.last-move a)))) - + +(defmethod habitat-p ((a animal) b) + "Is the biome b a possible habitat of animal a?" + ;;XXX Don't quite like this, but it works + (when (eq (.habitat a) T) + (return-from habitat-p T)) + (dolist (h (.habitat a)) + (when (equalp (symbol-to-string h) (biome-name b)) + (return T)))) + (defmethod random-move ((a animal)) "Move in a random direction within the species' habitat niche" - ;;TODO rewrite with `move' (do* ((dir (random-elt *directions*) (random-elt *directions*)) (next-patch (patchindir (.x a) (.y a) dir) (patchindir (.x a) (.y a) dir)) (ttl 10 (1- ttl))) - ((zerop ttl) - NIL) + ((zerop ttl) NIL) (when (and next-patch (null (patch-occupant next-patch)) - (member (read-from-string - (biome-name (patch-biome next-patch))) - (.habitat a))) - (setf (patch-occupant (coord (.x a) (.y a))) NIL) - (setf (.x a) (first (patch-pos next-patch)) - (.y a) (second (patch-pos next-patch))) - (setf (patch-occupant next-patch) a) + (habitat-p a (patch-biome next-patch))) + (move a dir) (return-from random-move a)))) diff --git a/server/player.lisp b/server/player.lisp index 1c9c267..c14ad45 100644 --- a/server/player.lisp +++ b/server/player.lisp @@ -40,11 +40,10 @@ "A human moves one space in the specified direction, if possible." ;;TODO allow for attack/explore mode (let ((p (get-player (.name h)))) - (logf 4 "Moving player ~A (~S)" (.name h) p) (case (call-next-method) ('OUT-OF-BOUNDS (msg-player p "Out of bounds.") NIL) ('PATCH-OCCUPIED - (msg-player p "This patch is occupied by ~A." + (msg-player p "This patch is blocked by ~A." (leading-vowel (.name (patch-occupant (patchindir (.x h) (.y h) dir))))) NIL) diff --git a/TODO b/TODO index 00f554e..ffd042e 100644 --- a/TODO +++ b/TODO @@ -10,12 +10,16 @@ GAME -* display player panel information - +* change world to 2D array + +* optimise world creation & map transfer + * implement look/walk/attack modes * expand player implementation +* "sound system" (noises in landscape) + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? diff --git a/client/user-interface.lisp b/client/user-interface.lisp index c6077b4..00e2e8b 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -77,7 +77,9 @@ (while (not (runningp)) ;;TODO replace with `loop' (sleep 0.5)) (connect-server) - (query-server "signup localuser default")) ;;just use a default user + (query-server "signup" + (query-user scr "What is your name?" :cls T) + "default")) (defun choose-world-size (scr) "Let the user choose his preferred world size" diff --git a/content/biomes.lisp b/content/biomes.lisp index 4f20bd9..c678443 100644 --- a/content/biomes.lisp +++ b/content/biomes.lisp @@ -15,7 +15,7 @@ (new-biome grassland :ground "tall elephant grass" - :char #\; :col ':yellow + :char #\; :col :yellow :features '((acacia 100) (boulder 200) (impala 500) (warthog 600) (lion 2400) (leopard 3000) @@ -24,29 +24,29 @@ (new-biome forest :ground "leaf litter and small shrubs" - :char #\. :col ':green + :char #\. :col :green :features '((miombo 10) (acacia 15) (warthog 500) (impala 800) (elephant 1000) (leopard 3200))) ;TODO (new-biome stream :ground "shallow flowing water" - :char #\~ :col ':blue + :char #\~ :col :blue :features '()) ;TODO (new-biome swamp :ground "short sedge grass growing on boggy black soil" - :char #\w :col ':green + :char #\w :col :green :features '((warthog 500) (buffalo 400) (lion 3000))) ;TODO (new-biome hill :ground "hard, stony soil" - :char #\m :col ':cyan ;XXX very bright - hurts the eyes... + :char #\m :col :cyan ;XXX very bright - hurts the eyes... :features '((boulder 20) (miombo 80) (warthog 600) (leopard 3200))) ;TODO (new-biome desert :ground "deep, drifting sand" - :char #\^ :col ':white ;XXX yellow would be better, but shows up brown + :char #\^ :col :white ;XXX yellow would be better, but shows up brown :features '((cactus 100) (boulder 200) (oryx 800) (lion 3600))) ;TODO diff --git a/params.lisp b/params.lisp index d8d9db5..3b1f3fa 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21898)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/server/item-methods.lisp b/server/item-methods.lisp index d269cb5..59ceb70 100644 --- a/server/item-methods.lisp +++ b/server/item-methods.lisp @@ -3,7 +3,7 @@ ;;;; set in Africa. ;;;; ;;;; This file defines all CLOS methods used in the game for the different -;;;; item classes. +;;;; item classes (human methods are separate in player.lisp). ;;;; ;;;; (c) 2018 Daniel Vedder, MIT license ;;;; @@ -15,6 +15,7 @@ (let* ((here (coord (.x a) (.y a))) (target (coordsindir (.x a) (.y a) dir)) (target-patch (coord (first target) (second target)))) + ;;XXX more conditions? (cond ((null target-patch) (logf 3 "~S is attempting to move out of bounds ~S" a target) 'OUT-OF-BOUNDS) @@ -41,30 +42,32 @@ (leading-vowl (.name d)) (leading-vowel (.name tl))) NIL))) -;;TODO (defmethod attack ((f feature) (tl tool))) -;;TODO (defmethod attack ((a animal) (w weapon))) +;;TODO (defmethod attack ((at attacker) (f feature) (tl tool))) +;;TODO (defmethod attack ((at attacker) (an animal) (w weapon))) (defmethod update ((a animal)) (when (> (age-of-the-world) (.last-move a)) (random-move a) (incf (.last-move a)))) - + +(defmethod habitat-p ((a animal) b) + "Is the biome b a possible habitat of animal a?" + ;;XXX Don't quite like this, but it works + (when (eq (.habitat a) T) + (return-from habitat-p T)) + (dolist (h (.habitat a)) + (when (equalp (symbol-to-string h) (biome-name b)) + (return T)))) + (defmethod random-move ((a animal)) "Move in a random direction within the species' habitat niche" - ;;TODO rewrite with `move' (do* ((dir (random-elt *directions*) (random-elt *directions*)) (next-patch (patchindir (.x a) (.y a) dir) (patchindir (.x a) (.y a) dir)) (ttl 10 (1- ttl))) - ((zerop ttl) - NIL) + ((zerop ttl) NIL) (when (and next-patch (null (patch-occupant next-patch)) - (member (read-from-string - (biome-name (patch-biome next-patch))) - (.habitat a))) - (setf (patch-occupant (coord (.x a) (.y a))) NIL) - (setf (.x a) (first (patch-pos next-patch)) - (.y a) (second (patch-pos next-patch))) - (setf (patch-occupant next-patch) a) + (habitat-p a (patch-biome next-patch))) + (move a dir) (return-from random-move a)))) diff --git a/server/player.lisp b/server/player.lisp index 1c9c267..c14ad45 100644 --- a/server/player.lisp +++ b/server/player.lisp @@ -40,11 +40,10 @@ "A human moves one space in the specified direction, if possible." ;;TODO allow for attack/explore mode (let ((p (get-player (.name h)))) - (logf 4 "Moving player ~A (~S)" (.name h) p) (case (call-next-method) ('OUT-OF-BOUNDS (msg-player p "Out of bounds.") NIL) ('PATCH-OCCUPIED - (msg-player p "This patch is occupied by ~A." + (msg-player p "This patch is blocked by ~A." (leading-vowel (.name (patch-occupant (patchindir (.x h) (.y h) dir))))) NIL) diff --git a/server/server.lisp b/server/server.lisp index ba0cfd0..9bf2b07 100644 --- a/server/server.lisp +++ b/server/server.lisp @@ -143,7 +143,7 @@ ;;Update all items and occupants in each patch (dotimes (y (world-size)) (dotimes (x (world-size)) - (unless running (return-from update-loop)) + (unless running (return-from update-loop)) ;;XXX right place? (when (patch-occupant (coord x y)) (update (patch-occupant (coord x y)))) (dolist (i (patch-items (coord x y))) @@ -296,7 +296,7 @@ (.hunger p) (length (remove-if #'(lambda (x) (or (null (first x)) (zerop (second x)))) - (.inventory p))) + (.inventory p))) ;;XXX Show all slots? (if (.tool p) (.name (.tool p)) ""))))) (defun move-player (dir)