X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fplayer.scm;h=8b9a22f5c72c5de58370db5843ee11bce20b0035;hp=3d1ec7288baf6c83387046b4612436546e1105c3;hb=902b52f87ea65d6a52cb84afee32ad20d89b2bc3;hpb=4d1280ec16d7645817bf741cde658e358de66327 diff --git a/mudsync/player.scm b/mudsync/player.scm index 3d1ec72..8b9a22f 100644 --- a/mudsync/player.scm +++ b/mudsync/player.scm @@ -39,7 +39,8 @@ (build-actions (init (wrap-apply player-init)) (handle-input (wrap-apply player-handle-input)) - (tell (wrap-apply player-tell)))) + (tell (wrap-apply player-tell)) + (disconnect-self-destruct (wrap-apply player-disconnect-self-destruct)))) (define player-actions* (append player-actions @@ -91,6 +92,16 @@ (<- player (gameobj-gm player) 'write-home #:text text)) +(define-mhandler (player-disconnect-self-destruct player message) + "Action routine for being told to disconnect and self destruct." + (define loc (gameobj-loc player)) + (when loc + (<- player loc 'tell-room + #:exclude (actor-id player) + #:text (format #f "~a disappears in a puff of entropy!\n" + (slot-ref player 'name)))) + (gameobj-self-destruct player)) + ;;; Command handling ;;; ================