ship.lisp 866 B

1234567891011121314151617181920212223
  1. ;;; SHIP INFO ;;;
  2. (defun display-crew (player-ship-obj)
  3. (let ((crew-names
  4. (loop for member in (crew-members (crew player-ship-obj))
  5. collect (list (name member)))))
  6. (format T "~%CREW DETAILS~%~%")
  7. (format-table T (list (list (sanity-val (crew player-ship-obj)))) :column-label '("Sanity"))
  8. (format T "~%")
  9. (format-table T crew-names :column-label '("Name" "Buff" "Buff Amount"))))
  10. (defun display-inventory (player-ship-obj)
  11. (let* ((inventory (inventory player-ship-obj))
  12. (inventory-list (loop for slot in (return-slots inventory)
  13. collect (list
  14. slot (slot-value inventory slot)))))
  15. (format T "~%INVENTORY~%")
  16. (format-table T inventory-list :column-label '("Resource" "Amount"))))
  17. (defun ship-info (player-ship-obj)
  18. (display-crew player-ship-obj)
  19. (display-inventory player-ship-obj))
  20. ;;; SHIP INFO END ;;;