ship.lisp 1.1 KB

1234567891011121314151617181920212223242526
  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 ()
  11. (let ((inventory-list (list
  12. (list "Credits" (player-ship-credits *player-ship*))
  13. (list "Petrofuel" (player-inventory-petrofuel (player-ship-inventory *player-ship*)))
  14. (list "Gruel" (player-inventory-gruel (player-ship-inventory *player-ship*)))
  15. (list "Spice" (player-inventory-spice (player-ship-inventory *player-ship*)))
  16. (list "Ammo" (player-inventory-ammo (player-ship-inventory *player-ship*)))
  17. (list "Archeotech" (player-inventory-archeotech (player-ship-inventory *player-ship*))))))
  18. (format T "~%INVENTORY~%")
  19. (format-table T inventory-list :column-label '("Resource" "Amount"))))
  20. (defun ship-info ()
  21. (display-crew)
  22. (display-inventory))
  23. ;;; SHIP INFO END ;;;