##// END OF EJS Templates
Remove curact, implement selact
naryl -
r45:0669fc21 default
parent child Browse files
Show More
@@ -146,10 +146,8 b''
146 (void))
146 (void))
147
147
148 (defun call-act (title)
148 (defun call-act (title)
149 (setf *current-action title)
150 (with-frame
149 (with-frame
151 (funcall (getprop *acts title :act)))
150 (funcall (getprop *acts title :act)))
152 (setf *current-action nil)
153 (void))
151 (void))
154
152
155 ;;; Text windows
153 ;;; Text windows
@@ -190,8 +188,8 b''
190 (create :title title :img img :act act :selected nil))
188 (create :title title :img img :act act :selected nil))
191 (update-acts))
189 (update-acts))
192
190
193 (defun del-act (&optional title)
191 (defun del-act (title)
194 (delete (getprop *acts (or title *current-action)))
192 (delete (getprop *acts title))
195 (update-acts))
193 (update-acts))
196
194
197 (defun clear-act ()
195 (defun clear-act ()
@@ -102,9 +102,6 b''
102
102
103 ;;; 14act
103 ;;; 14act
104
104
105 (defpsmacro curact ()
106 `*current-action)
107
108 (defpsmacro showacts (enable)
105 (defpsmacro showacts (enable)
109 `(api-call enable-frame :acts ,enable))
106 `(api-call enable-frame :acts ,enable))
110
107
@@ -191,6 +191,11 b''
191
191
192 ;;; 14act
192 ;;; 14act
193
193
194 (defun selact ()
195 (loop :for (k v) :of *acts
196 :do (when (@ v :selected)
197 (return-from selact (@ v :name)))))
198
194 (defun curacts ()
199 (defun curacts ()
195 (let ((acts (api-call copy-obj *acts)))
200 (let ((acts (api-call copy-obj *acts)))
196 (lambda ()
201 (lambda ()
@@ -7,7 +7,6 b''
7 ;; Inventory (objects)
7 ;; Inventory (objects)
8 (var *objs (create))
8 (var *objs (create))
9 (var *current-location nil)
9 (var *current-location nil)
10 (var *current-action nil)
11 ;; Game time
10 ;; Game time
12 (var *started-at (chain *date (now)))
11 (var *started-at (chain *date (now)))
13 ;; Timers
12 ;; Timers
@@ -8,7 +8,7 b''
8 (:export #:api-call #:by-id
8 (:export #:api-call #:by-id
9 #:has
9 #:has
10
10
11 #:*globals #:*objs #:*current-location #:*current-action
11 #:*globals #:*objs #:*current-location
12 #:*started-at #:*timer-interval #:*timer-obj #:*loaded-games
12 #:*started-at #:*timer-interval #:*timer-obj #:*loaded-games
13
13
14 #:*acts #:*state-stash #:*playing #:*locals
14 #:*acts #:*state-stash #:*playing #:*locals
General Comments 0
You need to be logged in to leave comments. Login now