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