diff --git a/dialogue.lisp b/dialogue.lisp
index 8583731..ad77eda 100644
--- a/dialogue.lisp
+++ b/dialogue.lisp
@@ -75,9 +75,12 @@ If not, have some tea on me: I’m paying. =w="
:face (getf keys :face))))
-(defun move (speaker world-coords &key (delay .05))
- (list
- (list :speaker speaker :coords world-coords :delay delay)))
+(defun move (speaker coords &key (delay .05))
+ (if (or (getf coords :Δx) (getf coords :Δy))
+ (list
+ (list :speaker speaker :relative-coords coords :delay delay))
+ (list
+ (list :speaker speaker :coords coords :delay delay))))
@@ -166,6 +169,19 @@ coordinates listed in the DIALOGUE’s :COORDS property. … If applicable, ofc.
finished-moving-p))
+(defun ensure-dialogue-movement (map dialogue-list)
+ "Given a DIALOGUE-LIST, ensure that the first line of dialogue’s movement is
+absolute rather than relative, if it contains any movement at all."
+ (let ((dialogue (car dialogue-list)))
+ (when (and (getf dialogue :relative-coords)
+ (not (getf dialogue :coords)))
+ (let ((speaker-coords (🌍:getf-entity-data map (dialogue-speaker dialogue) :coords))
+ (relative-coords (getf dialogue :relative-coords)))
+ (setf (getf (car dialogue-list) :coords)
+ (list :x (+ (getf speaker-coords :x) (or (getf relative-coords :Δx) 0))
+ :y (+ (getf speaker-coords :y) (or (getf relative-coords :Δy) 0))))))))
+
+
(defun finished-printing-p (dialogue)
"Whether or not a line of dialogue has been completely printed to the screen."
(or (not (getf dialogue :text))
@@ -180,6 +196,7 @@ Returns the state for use with STATE-LOOP, pay attention!"
(update-speaking-face map (car dialogue-list))
(update-entity-data map (car dialogue-list))
(progress-line-delivery (car dialogue-list))
+ (ensure-dialogue-movement map dialogue-list)
;; Progress to the next line of dialogue as appropriate.
(let* ((dialogue (car dialogue-list))
(text (getf dialogue :text))
@@ -315,6 +332,7 @@ and max-row; for use with RENDER-STRING. Like so:
(optimal-text-placement-vertically text coords :width width :height height
:downp (not playerp)))))
+
(defun ensure-dialogue-layout (map dialogue-list)
"Given a DIALOGUE-LIST, ensure that the FIRST line of dialogue has a :layout
property — that is, a property detailing the optimal width and coordinates for
diff --git a/flora-search-aurora.lisp b/flora-search-aurora.lisp
index 51185a1..b7a2b6c 100644
--- a/flora-search-aurora.lisp
+++ b/flora-search-aurora.lisp
@@ -107,16 +107,23 @@ dialogue, among which one will be selected randomly."
map (start-dialogue (say interactee-id :en en-line :eo eo-line)))))
-(defun string->symbol (string)
- "Given a STRING with an optionally defined package (e.g., “package:symbol”),
-return it as an appopriate symbol."
- (let* ((split (str:split ":" (string-upcase string)))
- (package (when (eq (length split) 2)
- (car split)))
- (symbol (or (cadr split) (car split))))
- (if package
- (intern symbol package)
- (intern symbol))))
+(defun move-trigger (map trigger-plist)
+ "A trigger function that forces the player to move either relatively or
+absolutely, depending on the properties of TRIGGER-PLIST (:ΔX & ΔY or X & Y).
+It will also display a monologue of the :DESC-* properties before movement.
+Useful for making barriers the player character refuses to traverse."
+ (make-dialogue-state
+ map
+ (apply
+ #'start-dialogue
+ (append
+ (loop for en-line in (str:lines (getf trigger-plist :desc-en))
+ for eo-line in (str:lines (getf trigger-plist :desc-eo))
+ collect (mumble 'player :en en-line :eo eo-line))
+ (list (move 'player (list :Δx (getf trigger-plist :Δx)
+ :Δy (getf trigger-plist :Δy)
+ :x (getf trigger-plist :x)
+ :y (getf trigger-plist :y))))))))
(defun entrance-trigger (map trigger-plist)
@@ -617,32 +624,12 @@ avoid triggering this."
(flashback-casino-outro map)))
-(defun flashback-casino-trigger (map &optional trigger-plist)
+(defun flashback-casino-seat-trigger (map &optional trigger-plist)
(make-dialogue-state
map
(flashback-casino-dialogue map)))
-(defun flashback-casino-exit-top-trigger (map &optional trigger-plist)
- (make-dialogue-state
- map
- (start-dialogue
- (mumble 'player :eo "(Mi eble reiru al la gepatroj.)"
- :en "(I should probably get back to my folks.)")
- (mumble 'player :eo "(Ili atendas min por ekfesti!)"
- :en "(They're waiting on me, after all!)")
- (move 'player '(:x 35 :y 2)))))
-
-
-(defun flashback-casino-exit-bottom-trigger (map &optional trigger-plist)
- (make-dialogue-state
- map
- (start-dialogue
- (mumble 'player :eo "(Mi ne fuĝu de mia propra naskiĝtaga festo!)"
- :en "(I can't ditch my own birthday party!)")
- (move 'player '(:x 36 :y 17)))))
-
-
;;; ———————————————————————————————————
;;; Main-menu data
diff --git a/res/maps/flashback-casino.tmx b/res/maps/flashback-casino.tmx
index 3b29554..1f52398 100644
--- a/res/maps/flashback-casino.tmx
+++ b/res/maps/flashback-casino.tmx
@@ -85,22 +85,34 @@
diff --git a/res/maps/outdoors.tmx b/res/maps/outdoors.tmx
index 54cd126..a928b8b 100644
--- a/res/maps/outdoors.tmx
+++ b/res/maps/outdoors.tmx
@@ -1,5 +1,5 @@
-