From: Christoph Senjak Date: Mon, 24 Aug 2009 07:07:55 +0000 (+0200) Subject: Key-Dungeons are now strings. X-Git-Url: http://uxul.de/gitweb/?a=commitdiff_plain;h=ab302d9ac8adefaf2bfe630e29c0847b0d372e16;p=uxul-world.git Key-Dungeons are now strings. Should work with run-room. --- diff --git a/on-collision.lisp b/on-collision.lisp index 8fbaf2a..68e284e 100755 --- a/on-collision.lisp +++ b/on-collision.lisp @@ -28,8 +28,7 @@ ((moving-rectangle player) (standing-rectangle door) (collision collision)) - - (cond ((find (dungeon standing-rectangle) (keys moving-rectangle)) + (cond ((find-if #'(lambda (x) (string= x (dungeon standing-rectangle))) (keys moving-rectangle)) (setf (keys moving-rectangle) (delete (dungeon standing-rectangle) (keys moving-rectangle) :count 1)) (setf (visible standing-rectangle) nil) (setf (active standing-rectangle) nil) diff --git a/room.lisp b/room.lisp index f017379..e51b6d3 100755 --- a/room.lisp +++ b/room.lisp @@ -147,6 +147,16 @@ (add-object (make-instance 'flying-nasobem :x (* 128 x) :y (* 128 y)) room)) + ((eq type 'key) + (add-object (make-instance 'key + :x (* 128 x) + :y (* 128 y) + :dungeon arg1) room)) + ((eq type 'door) + (add-object (make-instance 'door + :x (* 128 x) + :y (* 128 y) + :dungeon arg1) room)) ((eq type 'burning-marshmallow) (add-object (make-instance 'burning-marshmallow :x (* 128 x)