game-type help

Paul Stewart (stewart@hibp6.ecse.rpi.edu)
Wed, 15 Mar 1995 22:27:11 -0500

I quote from $command_mode:/help starting around line 25:

: elseif (player.cardgame != #0)
: if ($code_utils:has_property(player.cardgame, "hm_index"))
: if (topic == "")
: topic = "help";
I propose the following:
elseif ($code_utils:has_property(player.cardgame, "hm_haliases") &&
topic in player.cardgame.hm_haliases)
topic = "help";
: endif
: if (idx = topic in player.cardgame.hm_index)
: player:notify_list("? ", player.cardgame.hm_help[idx]);
: else
: player:notify("(there is no help for \"" + args[1] + "\")");
: endif
: else
: player:notify("(" + player.cardgame.name + " has no help
available)");
: endif
: else
: if ($code_utils:has_property($help_mgr, topic + "_obj") &&
: $code_utils:has_property($help_mgr.(topic + "_obj"), "hm_index"))
: if (idx = "help" in $help_mgr.(topic + "_obj").hm_index)
: player:notify_list("? ", $help_mgr.(topic + "_obj").hm_help[idx]);
: else
: player:notify("(there is no default help for \"" + topic + "\")");
: endif
: else
: player:notify("(there is no help for \"" + topic + "\")");
: endif
: endif

My rationale:

Before /game <name> <disc> adding, one can do "/help <name>" to get the
"help" for the game (as procured by the second half of the code I quoted).
This won't work after adding because the first half of the quoted code
will be executed. What I'd like is a few alias names that will point back
at the "help" entry in the game. We could generalize it to a whole help
alias setup, but I'm not sure if that's necessary. Possibly others like
Phil that have a few more equivalent commands might see more use in this.

--
Paul