aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-07-17 18:34:09 -0500
committerGravatar Pouar <pouar@pouar.net>2020-07-17 18:34:09 -0500
commitd3cd3c7da3fd93c905e331c0b270a933cfc251db (patch)
tree3cb85145b7eb73beb03002bfeb4aea75cbba0c93
parentremove element-type-mixin (diff)
apparently the macro-level macro was redundant
-rw-r--r--core/classes.lisp30
-rw-r--r--core/libexec.lisp8
-rw-r--r--core/util.lisp5
-rw-r--r--data/map/bandits-domain.lisp20
-rw-r--r--data/map/haunted-forest.lisp12
-rw-r--r--data/map/pirates-cove.lisp5
-rw-r--r--data/map/silver-cape.lisp9
-rw-r--r--data/map/sky.lisp38
-rw-r--r--data/map/your-ship.lisp18
-rw-r--r--packages.lisp3
10 files changed, 56 insertions, 92 deletions
diff --git a/core/classes.lisp b/core/classes.lisp
index b0da297..ef4b34b 100644
--- a/core/classes.lisp
+++ b/core/classes.lisp
@@ -387,21 +387,21 @@
(f:fmt t (name-of character) " starts to make a mess on the floor" #\Newline)))
(set-status-condition 'yadfa-status-conditions:messing character))
t))
-(macro-level `(progn ,@(iter (for i in '("BLADDER" "BOWELS"))
- (appending (iter (for j in '("CONTENTS-OF" "FILL-RATE-OF"))
- (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
- (declare (ignore object))
- 0))
- (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
- (declare (ignore object newval))
- 0))))
- (appending (iter (for j in '("NEED-TO-POTTY-LIMIT-OF" "POTTY-DANCE-LIMIT-OF" "POTTY-DESPERATE-LIMIT-OF" "MAXIMUM-LIMIT-OF"))
- (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
- (declare (ignore object))
- 1))
- (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
- (declare (ignore object newval))
- 1)))))))
+#.`(progn ,@(iter (for i in '("BLADDER" "BOWELS"))
+ (appending (iter (for j in '("CONTENTS-OF" "FILL-RATE-OF"))
+ (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
+ (declare (ignore object))
+ 0))
+ (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
+ (declare (ignore object newval))
+ 0))))
+ (appending (iter (for j in '("NEED-TO-POTTY-LIMIT-OF" "POTTY-DANCE-LIMIT-OF" "POTTY-DESPERATE-LIMIT-OF" "MAXIMUM-LIMIT-OF"))
+ (collect `(defmethod ,(a:format-symbol :yadfa "~a/~a" i j) ((object base-character))
+ (declare (ignore object))
+ 1))
+ (collect `(defmethod (setf ,(a:format-symbol :yadfa "~a/~a" i j)) (newval (object base-character))
+ (declare (ignore object newval))
+ 1))))))
(defclass bladder-character (base-character)
((bladder/contents
:initarg :bladder/contents
diff --git a/core/libexec.lisp b/core/libexec.lisp
index e8b4044..96e9130 100644
--- a/core/libexec.lisp
+++ b/core/libexec.lisp
@@ -1635,10 +1635,10 @@
(defgeneric get-process-potty-action-type (user type had-accident))
(defgeneric output-process-potty-text (user padding type action had-accident &key stream))
(defmethod get-babyish-padding ((user team-member))
- (macro-level `(cond ,@(iter (for i in '(diaper pullup closed-bottoms))
- (collect `((filter-items (wear-of user) ',i)
- ',i)))
- (t nil))))
+ #.`(cond ,@(iter (for i in '(diaper pullup closed-bottoms))
+ (collect `((filter-items (wear-of user) ',i)
+ ',i)))
+ (t nil)))
(defmethod get-process-potty-action-type ((user ally-last-minute-potty-training) (type (eql :wet)) had-accident)
(cond ((and
(car had-accident)
diff --git a/core/util.lisp b/core/util.lisp
index ac4d528..b8a4c0c 100644
--- a/core/util.lisp
+++ b/core/util.lisp
@@ -128,8 +128,3 @@ argument.")
((or docstring declare)
(cdr body))
(t body))))))
-(defmacro macro-level (&body body)
- (a:with-gensyms (macro)
- `(macrolet ((,macro ()
- ,@body))
- (,macro))))
diff --git a/data/map/bandits-domain.lisp b/data/map/bandits-domain.lisp
index dfdd997..bb55200 100644
--- a/data/map/bandits-domain.lisp
+++ b/data/map/bandits-domain.lisp
@@ -1,7 +1,6 @@
;;;; -*- mode: Common-Lisp; sly-buffer-package: "yadfa-zones"; coding: utf-8-unix; -*-
(in-package :yadfa-zones)
-(macro-level
- `(progn
+#.`(progn
,@(iter (for i from 10 to 20)
(collect
`(ensure-zone (0 ,i 0 bandits-domain)
@@ -9,10 +8,7 @@
:description "A path filled with bandits"
:enter-text "You follow the path"
:warp-points ,(when (= i 10) '(list 'ironside '(2 0 0 ironside)))
- :enemy-spawn-list 'bandits-way)))))
-
-(macro-level
- `(progn
+ :enemy-spawn-list 'bandits-way)))
,@(iter (for i from -1 downto -10)
(collect
`(ensure-zone (,i 21 0 bandits-domain)
@@ -20,7 +16,7 @@
:description "A town run by the Raccoon Bandits"
:enter-text "You're wander around Bandit's Town"
,@(when (= i -3)
- '(:events '(yadfa-events:enter-bandits-shop-2))))))))
+ '(:events '(yadfa-events:enter-bandits-shop-2)))))))
(ensure-zone (-3 22 0 bandits-domain)
:name "Bandit's Shop"
:description "A local shop"
@@ -169,14 +165,13 @@
:enter-text "You're at the entrance of Bandit Town"
:warp-points (list 'home '(0 1 0 home))
:events '(yadfa-events:enter-bandits-village-1))
-(macro-level
- `(progn
+#.`(progn
,@(iter (for i from 22 to 30)
(collect
`(ensure-zone (0 ,i 0 bandits-domain)
:name "Bandit's Town"
:description "A town run by the Raccoon Bandits"
- :enter-text "You're wander around Bandit's Town")))))
+ :enter-text "You're wander around Bandit's Town"))))
(ensure-zone (0 31 0 bandits-domain)
:name "Bandit's Town"
:description "A town run by the Raccoon Bandits"
@@ -188,8 +183,7 @@
:name "Bandit's Cove Dock"
:description "The dock of Bandit's Cove"
:enter-text "You're at a dock")
-(macro-level
- `(progn
+#.`(progn
,@(let ((a ()))
(iter (for y from 19 to 23)
(alexandria:appendf a (iter (for x from 2 to 6)
@@ -198,7 +192,7 @@
:description "A cove filled with bandits"
:enter-text "You're at a cove run by bandits"
:enemy-spawn-list 'bandits-cove)))))
- a)))
+ a))
(ensure-zone (6 24 0 bandits-domain)
:name "Bandit's Cave Entrance"
:description "A mysterious cave"
diff --git a/data/map/haunted-forest.lisp b/data/map/haunted-forest.lisp
index a844484..bff2b25 100644
--- a/data/map/haunted-forest.lisp
+++ b/data/map/haunted-forest.lisp
@@ -180,9 +180,9 @@
:description "You're in a strange forest. Spooky sounds and scary eyes all around."
:enter-text "You're wondering around the haunted forest"
:enemy-spawn-list 'haunted-forest)
-(macro-level `(progn ,@(iter (for i from 3 to 7)
- (collect `(ensure-zone (,i -5 0 haunted-forest)
- :name "Haunted Forest"
- :description "You're in a strange forest. Spooky sounds and scary eyes all around."
- :enter-text "You're wondering around the haunted forest"
- :enemy-spawn-list 'haunted-forest)))))
+#.`(progn ,@(iter (for i from 3 to 7)
+ (collect `(ensure-zone (,i -5 0 haunted-forest)
+ :name "Haunted Forest"
+ :description "You're in a strange forest. Spooky sounds and scary eyes all around."
+ :enter-text "You're wondering around the haunted forest"
+ :enemy-spawn-list 'haunted-forest))))
diff --git a/data/map/pirates-cove.lisp b/data/map/pirates-cove.lisp
index d71ba70..f974e26 100644
--- a/data/map/pirates-cove.lisp
+++ b/data/map/pirates-cove.lisp
@@ -31,8 +31,7 @@
:enter-text "You're inside Pirate's Cove"
:enemy-spawn-list (list '(:chance 1/8
:enemies ((yadfa-enemies:diaper-pirate . (list :level (random-from-range 4 8)))))))
-(macro-level
- `(progn
+#.`(progn
,@(iter (for i from 0 to 10)
(collect `(ensure-zone (1 0 ,i pirates-cove)
:name "Pirate's Cove Lighthouse"
@@ -48,4 +47,4 @@
:enemies ((yadfa-enemies:diaper-pirate .
(list :level (random-from-range 4 8))))))
,@(when (= i 10)
- '(:events '(yadfa-events:pirates-cove-2))))))))
+ '(:events '(yadfa-events:pirates-cove-2)))))))
diff --git a/data/map/silver-cape.lisp b/data/map/silver-cape.lisp
index 558c4a3..732de69 100644
--- a/data/map/silver-cape.lisp
+++ b/data/map/silver-cape.lisp
@@ -1,7 +1,6 @@
;;;; -*- mode: Common-Lisp; sly-buffer-package: "yadfa-zones"; coding: utf-8-unix; -*-
(in-package :yadfa-zones)
-(macro-level
- `(progn
+#.`(progn
,@(iter (for i from 0 to 20)
(collect
`(ensure-zone (0 ,i 0 silver-cape)
@@ -11,16 +10,14 @@
:warp-points ,(when (= i 0) '(list 'rpgmaker-dungeon '(0 5 0 rpgmaker-dungeon)))
,@(cond ((= i 7)
'(:direction-attributes (list :east (list :hidden t)))))
- ,@(when (= i 0) '(:events '(yadfa-events:enter-silver-cape-1 yadfa-events:secret-underground-pipe-silver-cape))))))))
-(macro-level
- `(progn
+ ,@(when (= i 0) '(:events '(yadfa-events:enter-silver-cape-1 yadfa-events:secret-underground-pipe-silver-cape))))))
,@(iter (for i from -10 to 10)
(unless (= i 0)
(collect
`(ensure-zone (,i 10 0 silver-cape)
:name "Silver Cape Street"
:description "A busy street with various furries moving back and forth"
- :enter-text "You enter the street"))))))
+ :enter-text "You enter the street")))))
(ensure-zone (-1 6 0 silver-cape)
:name "Silver Cape Navy HQ Entrance"
:description "The entrance to Navy HQ."
diff --git a/data/map/sky.lisp b/data/map/sky.lisp
index ca184e2..369a365 100644
--- a/data/map/sky.lisp
+++ b/data/map/sky.lisp
@@ -9,15 +9,14 @@
:description "The entrance to the pool"
:enter-text "You're swimming in the pool"
:underwater t)
-(macro-level
- `(progn
+#.`(progn
,@(iter (for x from -10 to 10)
(iter (for y from -2 downto -17)
(collect `(ensure-zone (,x ,y 0 candle-carnival)
:name "Candle Carnival Pool"
:description "This pool makes up most of this floor"
:enter-text "You're swimming in the pool"
- :underwater t))))))
+ :underwater t)))))
(ensure-zone (0 -18 0 candle-carnival)
:name "Elevator"
:description "An elevator to the upper deck"
@@ -30,23 +29,14 @@
:enter-text "You enter the elevator"
:stairs (list :down)
:direction-attributes (list :down (list :exit-text "Going down")))
-(macro-level
- `(progn
- ,@(iter (for i from -17 to -2)
- (collect `(ensure-zone (0 i 1 candle-carnival)
- :name "Catwalk"
- :description "A catwalk over the pool"
- :enter-text "You're swimming in the pool"
- :warp-points '(dive (0 ,i 0 candle-carnival)))))))
-(macro-level
- `(progn
+#.`(progn
,@(iter (for i from -10 to 10)
(unless (= i -10)
(collect `(ensure-zone (i -10 1 candle-carnival)
:name "Catwalk"
:description "A catwalk over the pool"
:enter-text "You're swimming in the pool"
- :warp-points '(dive (i -10 0 candle-carnival))))))))
+ :warp-points '(dive (i -10 0 candle-carnival)))))))
(ensure-zone (-11 -10 1 candle-carnival)
:name "Water slide"
:description "A water slide that lets you slide to the bottom"
@@ -102,8 +92,7 @@
#:mansion
#:launch-pad)
(:documentation "Contains symbols for the sky base"))
-(macro-level
- (let ((syms '(sky-base:landing-pad
+#.(let ((syms '(sky-base:landing-pad
sky-base:living-quarters
sky-base:main-office
sky-base:shop
@@ -145,7 +134,7 @@
(collect i)
(collect `(0 0 0 ,i))))
,@(when (eq sym 'sky-base:landing-pad)
- '(:events '(yadfa-events:secret-underground-pipe-sky-base)))))))))
+ '(:events '(yadfa-events:secret-underground-pipe-sky-base))))))))
(ensure-zone (0 -1 0 sky-base:launch-pad)
:name "Rocket Pad"
:description "A rocket pad"
@@ -157,8 +146,7 @@
:description "A city orbiting the planet on a giant platform"
:enter-text "You're on the part of the pathway that acts as the city's gangway"
:events '(yadfa-events:secret-underground-pipe-star-city))
-(macro-level
- `(progn
+#.`(progn
,@(iter
(with a = ())
(for y from 1 to 21)
@@ -170,19 +158,18 @@
:name "Star City"
:description "A city orbiting the planet on a giant platform"
:enter-text "You're wondering across the platform")))))
- (finally (return a)))))
+ (finally (return a))))
(ensure-zone (-2 3 0 star-city)
:name "Star City Hotel Lobby"
:description "A luxurious hotel"
:enter-text "you're in the hotel lobby"
:stairs (list :up))
-(macro-level
- `(progn
+#.`(progn
,@(iter (for x from -3 downto -7)
(collect `(ensure-zone (,x 3 0 star-city)
:name "Star City Hotel Hall"
:description "A luxurious hotel"
- :enter-text "you're in the hall")))))
+ :enter-text "you're in the hall"))))
(ensure-zone (-3 2 0 star-city)
:name "Star City Hotel Diner"
:description "A luxurious hotel"
@@ -222,13 +209,12 @@
:description "A luxurious hotel"
:enter-text "you're in the hall"
:stairs (list :up :down))
-(macro-level
- `(progn
+#.`(progn
,@(iter (for x from -1 downto -5)
(collect `(ensure-zone (,x 3 1 star-city)
:name "Star City Hotel Hall"
:description "A luxurious hotel"
- :enter-text "you're in the hall")))))
+ :enter-text "you're in the hall"))))
(ensure-zone (0 22 0 star-city)
:name "Star City"
:description "A city orbiting the planet on a giant platform"
diff --git a/data/map/your-ship.lisp b/data/map/your-ship.lisp
index 4d71ae8..460f90a 100644
--- a/data/map/your-ship.lisp
+++ b/data/map/your-ship.lisp
@@ -1,7 +1,6 @@
;;;; -*- mode: Common-Lisp; sly-buffer-package: "yadfa-zones"; coding: utf-8-unix; -*-
(in-package :yadfa-zones)
-(macro-level
- `(progn
+#.`(progn
,@(iter (for y from 0 to 2)
(iter (for x from (- y) to y)
(collect `(ensure-zone (,x ,y 0 your-ship)
@@ -12,18 +11,14 @@
(or (= x 1) (= x -1))
(= y 2)))
:down (list :hidden t)
- :up (list :hidden t))))))))
-(macro-level
- `(progn
+ :up (list :hidden t))))))
,@(iter (for i from -2 to 2)
(collect `(ensure-zone (,i 11 0 your-ship)
:name "Emacs"
:description "The stern of your ship"
:direction-attributes (list :north (list :hidden ,(or (= i 1) (= i -1)))
:down (list :hidden t)
- :up (list :hidden t)))))))
-(macro-level
- `(progn
+ :up (list :hidden t)))))
,@(iter (for i from 3 to 10)
(collect `(ensure-zone (-2 ,i 0 your-ship)
:name "Emacs"
@@ -36,7 +31,7 @@
(collect `(ensure-zone (0 ,i 0 your-ship)
:name "Passage Way"
:description "The passage way of your ship"
- ,@(when (= i 3) '(:stairs (list :up :down))))))))
+ ,@(when (= i 3) '(:stairs (list :up :down)))))))
(ensure-zone (0 3 1 your-ship)
:name "Bridge"
:description "You can steer your ship from here"
@@ -92,8 +87,7 @@
:name "Chest"
:description "Place all your crap here"
:placeable t)))
-(macro-level
- `(progn
+#.`(progn
,@(iter (for i from -1 to 1)
(unless (= i 0)
(collect `(ensure-zone (,i 6 0 your-ship)
@@ -103,7 +97,7 @@
:south (list :hidden t))
:warp-points ,(if (= i -1)
'(list :exit '(0 21 0 silver-cape))
- ())))))))
+ ()))))))
(ensure-zone (-1 5 0 your-ship)
:name "Cabin"
:description "A Cabin of your ship"
diff --git a/packages.lisp b/packages.lisp
index 409990e..64f668d 100644
--- a/packages.lisp
+++ b/packages.lisp
@@ -22,8 +22,7 @@
#:in*
#:sum*
#:defunassert
- #:lappendf
- #:macro-level)
+ #:lappendf)
(:documentation "Utility functions that aren't really part of the game's API")
(:local-nicknames (:s :serapeum) (:a :alexandria) (:u :ugly-tiny-infix-macro) (:g :global-vars)
(:c :clim) (:ce :clim-extensions) (:cc :conditional-commands)))