Remove keyword keys to standardize strings as keys convention
This commit is contained in:
26
main.lisp
26
main.lisp
@@ -5,18 +5,22 @@
|
|||||||
(defparameter *chronostory-gacha-url-format "https://chronostory.onrender.com/api/gacha-items?gachaId=~a")
|
(defparameter *chronostory-gacha-url-format "https://chronostory.onrender.com/api/gacha-items?gachaId=~a")
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(reload-mob-data)
|
(reload-mob-data)
|
||||||
|
|
||||||
(defvar foo nil)
|
(defvar foo nil
|
||||||
(setf foo (serapeum/bundle:random-elt *chronostory-mobs*))
|
(setf foo (serapeum/bundle:random-elt *chronostory-mobs*)
|
||||||
*chronostory-drops*
|
*chronostory-drops*
|
||||||
|
|
||||||
(filter-map
|
(reload-item-data
|
||||||
(lambda (m)
|
(filter-map
|
||||||
(when (= (parse-integer (gethash "DROPPERID" m))
|
(lambda (m)
|
||||||
(parse-integer (href foo "mob" "mob_id")))
|
(when (= (parse-integer (gethash "DROPPERID" m))
|
||||||
(gethash "ITEMNAME" m)))
|
(parse-integer (href foo "mob" "mob_id")))
|
||||||
(coerce *chronostory-drops* 'list)))
|
(gethash "ITEMNAME" m))
|
||||||
|
(coerce *chronostory-drops* 'list)
|
||||||
|
|
||||||
|
|
||||||
; (sb-ext:save-lisp-and-die "my-prog" :toplevel #'show-mobs :executable t)
|
(hash-table-keys (aref (@ *chronostory-spawns* :el-nath) 0))
|
||||||
|
(hash-table-keys (aref *chronostory-drops* 0))))))))
|
||||||
|
|
||||||
|
;; (sb-ext:save-lisp-and-die "my-prog" :toplevel #'show-mobs :executable t)
|
||||||
|
|||||||
10
spawns.lisp
10
spawns.lisp
@@ -62,14 +62,14 @@ separate csvs."
|
|||||||
(loop for row in csv
|
(loop for row in csv
|
||||||
with mapname = ""
|
with mapname = ""
|
||||||
for hm = (pairhash keys row (dict))
|
for hm = (pairhash keys row (dict))
|
||||||
when (let ((name (gethash :monster hm)))
|
when (let ((name (gethash "Monster" hm)))
|
||||||
(and (string-not-equal "" name)
|
(and (string-not-equal "" name)
|
||||||
(string-not-equal "-" name)
|
(string-not-equal "-" name)
|
||||||
(string-not-equal "Monster" name)))
|
(string-not-equal "Monster" name)))
|
||||||
do (progn
|
do (progn
|
||||||
(if (and (string-not-equal mapname "") (string-equal (gethash :mapname hm) ""))
|
(if (and (string-not-equal mapname "") (string-equal (gethash "MapName" hm) ""))
|
||||||
(setf (gethash :mapname hm) mapname)
|
(setf (gethash "MapName" hm) mapname)
|
||||||
(setf mapname (gethash :mapname hm)))
|
(setf mapname (gethash "MapName" hm)))
|
||||||
(vector-push-extend hm result)))
|
(vector-push-extend hm result)))
|
||||||
result))
|
result))
|
||||||
|
|
||||||
@@ -113,5 +113,3 @@ separate csvs."
|
|||||||
(if-not *chronostory-spawns*
|
(if-not *chronostory-spawns*
|
||||||
(reload-spawn-data)
|
(reload-spawn-data)
|
||||||
*chronostory-spawns*))
|
*chronostory-spawns*))
|
||||||
|
|
||||||
(refresh-spawn-data)
|
|
||||||
|
|||||||
@@ -18,5 +18,4 @@
|
|||||||
(map 'vector func vec))
|
(map 'vector func vec))
|
||||||
|
|
||||||
(defun string-to-hash-table-key (s)
|
(defun string-to-hash-table-key (s)
|
||||||
(let ((k2 (string-upcase (string-replace " " s ""))))
|
(string-replace " " s ""))
|
||||||
(intern k2 :keyword)))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user