(define-mhandler (player-handle-input player message input)
(define split-input (split-verb-and-rest input))
- (define input-verb (pk 'input-verb (car split-input)))
- (define input-rest (pk 'input-rest (cdr split-input)))
+ (define input-verb (car split-input))
+ (define input-rest (cdr split-input))
(define command-candidates
- (pk 'candidates
- (player-gather-command-handlers player input-verb)))
+ (player-gather-command-handlers player input-verb))
(define winner
- (pk 'winner (find-command-winner command-candidates input-rest)))
+ (find-command-winner command-candidates input-rest))
(match winner
((cmd-action winner-id message-args)
- (apply send-message player (pk 'winner-id winner-id) (pk 'cmd-action cmd-action) (pk 'message-args message-args)))
+ (apply send-message player winner-id cmd-action message-args))
(#f
(<- player (gameobj-gm player) 'write-home
#:text "Huh?\n"))))
;; Now return a big ol sorted list of ((actor-id . command))
(append
- (sort-commands-append-actor (pk 'room-commands room-commands)
+ (sort-commands-append-actor room-commands
player-loc '()) ; room doesn't go by anything
(sort-commands-multi-actors co-occupant-commands)
(sort-commands-append-actor our-commands
(sort
actors-and-commands
(lambda (x y)
- (pk 'x x)
- (pk 'y y)
(> (command-priority (car x))
(command-priority (car y))))))
actor-goes-by
matched)) ; matched is kwargs if truthy
(return (list (command-action command)
- (pk 'earlier-actor-id actor-id) matched))
+ actor-id matched))
#f))))
sorted-candidates)
#f)))