From 5250c9a05b2fb8cc85a85f5a687b20e014b3d37f Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Fri, 15 Jan 2010 23:04:26 +0100 Subject: Replace more hardcoded command keys with dynamic ones on the help screen. --- crawl-ref/source/command.cc | 110 +++++++++++++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 27 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index e51915e1a5..2b12f2ce06 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -2210,18 +2210,22 @@ static void _add_formatted_keyhelp(column_composer &cols) "0 : the Orb of Zot\n" " Carry it to the surface and win!\n", - - cols.add_formatted( 0, item_types, true, true, _cmdhelp_textfilter); cols.add_formatted( 0, - "Other Gameplay Actions:\n" + "Other Gameplay Actions:\n", + true, true, _cmdhelp_textfilter); + + _add_command(cols, 0, CMD_USE_ABILITY, "use special Ability (a! for help)", 2); + _add_command(cols, 0, CMD_PRAY, "Pray (^ and ^! for help)", 2); + +/* "a : use special Ability (a! for help)\n" "p : Pray (^ and ^! for help)\n", - true, true, _cmdhelp_textfilter); +*/ _add_command(cols, 0, CMD_CAST_SPELL, "cast spell, abort without targets", 2); _add_command(cols, 0, CMD_FORCE_CAST_SPELL, "cast spell, no matter what", 2); @@ -2292,20 +2296,53 @@ static void _add_formatted_keyhelp(column_composer &cols) _add_command(cols, 1, CMD_TOGGLE_AUTOPICKUP, "toggle auto-pickup"); _add_command(cols, 1, CMD_TOGGLE_FRIENDLY_PICKUP, "change ally pickup behaviour"); - std::string interact = - "Item Interaction (inventory):\n" + cols.add_formatted( + 1, + "Item Interaction (inventory):\n", + true, true, _cmdhelp_textfilter); + + _add_command(cols, 1, CMD_DISPLAY_INVENTORY, "show Inventory list", 2); + _add_command(cols, 1, CMD_LIST_EQUIPMENT, "show inventory of equipped items", 2); + _add_command(cols, 1, CMD_INSCRIBE_ITEM, "inscribe item", 2); + _add_command(cols, 1, CMD_FIRE, "Fire next appropriate item", 2); + _add_command(cols, 1, CMD_THROW_ITEM_NO_QUIVER, "select an item and Fire it", 2); + _add_command(cols, 1, CMD_QUIVER_ITEM, "select item slot to be quivered", 2); + +/* "i : show Inventory list\n" "] : show inventory of equipped items\n" "{ : inscribe item\n" "f : Fire next appropriate item\n" "F : select an item and Fire it\n" "Q : select item slot to be quivered\n" - "(, ) : cycle current ammunition\n" - "e : "; +*/ - interact += (you.species == SP_VAMPIRE ? "Drain corpses" : "Eat food"); - interact += - " (tries floor first)\n" + { + std::string interact = "e : "; + + interact += (you.species == SP_VAMPIRE ? "Drain corpses" : "Eat food"); + interact += + " (tries floor first)\n"; + + cols.add_formatted( + 1, interact, + false, true, _cmdhelp_textfilter); + } + + _add_command(cols, 1, CMD_QUAFF, "Quaff a potion", 2); + _add_command(cols, 1, CMD_READ, "Read a scroll or book", 2); + _add_command(cols, 1, CMD_MEMORISE_SPELL, "Memorise a spell from a book", 2); + _add_command(cols, 1, CMD_WIELD_WEAPON, "Wield an item ( - for none)", 2); + _add_command(cols, 1, CMD_WEAPON_SWAP, "wield item a, or switch to b", 2); + + cols.add_formatted( + 1, " (use = to assign slots)\n", + false, true, _cmdhelp_textfilter); + + _add_command(cols, 1, CMD_EVOKE_WIELDED, "eVoke power of wielded item", 2); + _add_command(cols, 1, CMD_EVOKE, "eVoke wand", 2); + +/* "q : Quaff a potion\n" "r : Read a scroll or book\n" "M : Memorise a spell from a book\n" @@ -2314,31 +2351,50 @@ static void _add_formatted_keyhelp(column_composer &cols) " (use = to assign slots)\n" "v : eVoke power of wielded item\n" "V : eVoke wand\n" +*/ + + cols.add_formatted( + 1, "W/T : Wear or Take off armour\n" - "P/R : Put on or Remove jewellery\n"; + "P/R : Put on or Remove jewellery\n", + false, true, _cmdhelp_textfilter); + + cols.add_formatted( + 1, + "Item Interaction (floor):\n", + true, true, _cmdhelp_textfilter); + + _add_command(cols, 1, CMD_PICKUP, "pick up items (also g)", 2); + + cols.add_formatted( + 1, + " (press twice for pick up menu)\n", + false, true, _cmdhelp_textfilter); + + _add_command(cols, 1, CMD_DROP, "Drop an item", 2); + + cols.add_formatted( + 1, + "d#: Drop exact number of items\n", + false, true, _cmdhelp_textfilter); - cols.add_formatted( - 1, interact, - true, true, _cmdhelp_textfilter); + { + std::string interact = "Chop up a corpse"; + if (you.species == SP_VAMPIRE && you.experience_level >= 6) + interact += " or bottle its blood"; + _add_command(cols, 1, CMD_BUTCHER, interact, 2); + } + + _add_command(cols, 1, CMD_EAT, "Eat food from floor", 2); - interact = - "Item Interaction (floor):\n" +/* ", : pick up items (also g) \n" " (press twice for pick up menu)\n" "d : Drop an item\n" "d#: Drop exact number of items\n" "c : Chop up a corpse"; - - if (you.species == SP_VAMPIRE && you.experience_level >= 6) - interact += " or bottle its blood"; - - interact += - "\n" "e : Eat food from floor\n"; - - cols.add_formatted( - 1, interact, - true, true, _cmdhelp_textfilter); +*/ cols.add_formatted( 1, -- cgit v1.2.3-54-g00ecf