diff --git a/dialogue.lisp b/dialogue.lisp index c7dc056..aa2f807 100644 --- a/dialogue.lisp +++ b/dialogue.lisp @@ -57,17 +57,19 @@ If not, have some tea on me: I’m paying. =w=" (list :speaker speaker :face face))) -(defun say (speaker &rest text) +(defun say (speaker &rest keys) (list - (list :speaker speaker :face 'talking-face :progress 0 - :text (…:getf-lang text)) + (list :speaker speaker :progress 0 + :face (or (getf keys :face) 'talking-face) + :text (…:getf-lang keys)) (car (face speaker 'normal-face)))) -(defun mumble (speaker &rest text) +(defun mumble (speaker &rest keys) (list (list :speaker speaker :progress 0 - :text (…:getf-lang text)))) + :text (…:getf-lang keys) + :face (getf keys :face)))) (defun move (speaker world-coords &key (delay .05)) @@ -168,7 +170,7 @@ Returns the state for use with STATE-LOOP, pay attention!" (did-finish-printing-p (finished-printing-p dialogue)) (did-finish-moving-p (progress-movement map dialogue))) ;; Only show the cursor when rendering text! - (if did-finish-moving-p + (if (or did-finish-moving-p (not did-finish-printing-p)) (✎:show-cursor) (✎:hide-cursor)) (cond @@ -187,9 +189,7 @@ Returns the state for use with STATE-LOOP, pay attention!" (setf (getf (car dialogue-list) :progress) (length text)) (list :dialogue dialogue-list :map map)) ;; If no input, keep steady! - ((or (not did-finish-printing-p) - (not did-finish-moving-p) - (cdr dialogue-list)) + ('t (list :dialogue dialogue-list :map map))))) @@ -334,7 +334,7 @@ A state-function for use with STATE-LOOP." "Return a state-function for a section of dialogue, for use with STATE-LOOP." (lambda (matrix &key (map map) (dialogue dialogue-list)) (🌍:overworld-state-draw matrix map) - (dialogue-state matrix :map map :dialogue dialogue-list))) + (dialogue-state matrix :map map :dialogue dialogue))) ;; Split a banana in two, bisection-fruit, diff --git a/flora-search-aurora.lisp b/flora-search-aurora.lisp index 7e9818e..5f582f5 100644 --- a/flora-search-aurora.lisp +++ b/flora-search-aurora.lisp @@ -40,19 +40,87 @@ (in-package :flora-search-aurora) -(defparameter *literary-girl-dialogue* - (💬:start-dialogue - (💬:mumble "literary-girl" :en "...") - (💬:say "player" :eo "Kielas apud la mar'?" - :en "How's the view?") - (💬:face "player" "<.<") - (💬:say "literary-girl" :eo "Kielas apud la ruinoj de via viv'?" - :en "How's your trainwreck of a life?") - (💬:face "player" '💬:normal-face))) +(defmacro getf-act (map act) + `(getf (gethash :acts ,map) ,act)) -(defun literary-girl-dialogue (map) - (make-dialogue-state map *literary-girl-dialogue*)) +(defmacro getf-know (map idea) + `(getf (gethash :knows ,map) ,idea)) + + +(defun childhood-friend-greetings (map) + (if (getf-act map :sasha-greetings) + (incf (getf-act map :sasha-greetings)) + (setf (getf-act map :sasha-greetings) 0)) + (let ((sasha "childhood-friend")) + (case (getf-act map :sasha-greetings) + (0 + (💬:start-dialogue + (💬:mumble sasha :en "...") + (💬:say "player" :eo "Kielas apud la mar'?" + :en "How's the view?") + (💬:face "player" "<.<") + (💬:say sasha :eo "Kielas apud la ruinoj de via viv'?" + :en "How's your trainwreck of a life?") + (💬:face "player" '💬:normal-face))) + (1 + (start-dialogue + (mumble "player" :en "...") + (face "player" "o<") + (mumble "player" :eo "Eee.. pardonu." + :en "Well... sorry."))) + (3 + (start-dialogue + (say "player" :eo "Nu, vere, mia celo sufiĉe klaras al mi. Jam baldaŭ redungiĝos." + :en "I'm not too aimless, actually. I've got good job prospects, right about now." + :face "