|
|
#1 |
|
Knight
Join Date: Jan 2009
Posts: 657
![]() |
Feature suggestion 'l'ook for inventory/equipment
At present you can only 'l'ook at items in shops / your home. I suggest that when the inventory or equipment list is showing (e.g. 'i' or 'e' has been pressed) that 'l'ook could work like it does at home.
[EDIT]Never mind. I suppose 'I' is the equivalent for that. =============================================== The following is (I think) "Everything that can be done with an item in your equipment or inventory". I would suggest that it (or something like it) could be made the context sensitive help for when your inventory or equipment is showing (e.g. pressed 'i' or 'e'). Code:
=== Inventory/Equipment help ===
i Show inventory list q Quaff a potion from inventory/ground
e Show equipment list r Read a scroll from inventory/ground
d Drop an item from inv/equip { Inscribe object (inv/equip/ground)
k Destroy item from inv/equip/ground } Uninscribe object (inv/equip/ground)
w Wear/wield item from inv/ground A Activate an artifcat (inv/equip/gr)
t Take off an item from equipment a Aim a wand from inventory/ground
b Browse a book from inventory u Use a staff from inventory/ground
G Gain new spells/prayers from a book z Zap a rod from inventory/ground
m Cast a spell from a book (inv) f Fire an item from inventory/ground
p Pray a prayer from a book (inv) v Throw an item from inventory/ground
E Eat some food from inventory/ground I Observe an item (inv/equip/ground)
F Fuel your lantern from inv/ground
The following example (for 'k' - destroy item) shows some common features.
(Inven: a-c, / for Equip, - for floor, ! for squelched, ESC) Destroy which item?
a) 3 Rations of food
b) a Grey Potion of Slime Mold Juice
c) 3 Wooden Torches (5000 turns)
'a-c' is the range of inventory items, '/' switches to the equipment list,
- shows items on the floor, ! shows squelched items, ESC to cancel.
Last edited by PaulBlay; February 20, 2009 at 15:48. Reason: Command already existed (sort of) |
|
|
|
|
|
#2 |
|
Knight
Join Date: Jan 2009
Posts: 657
![]() |
Whoo! I implemented this, compiled it and it actually worked!
![]() Files altered: .\lib\help\help.hlp (Link to new help file) .\lib\help\invent.txt (New help file) .\src\cmd3.c (Add local help handling) |
|
|
|
|
|
#3 |
|
Veteran
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,962
Donated: $40
![]() |
Did you use the menus from cmd0.c? If not, you are probably duplicating functionality. (The point isn't that duplication is bad necessarily, but that if you ever want to add an inventory command, you will need to modify cmd3.c as well as cmd0.c. That is how "code [gets] all spread to hell and gone."
|
|
|
|
|
|
#4 | |
|
Knight
Join Date: Jan 2009
Posts: 657
![]() |
Quote:
![]() It's handled within the display inventory / display equipment functions. It's probably a bit of a hack but you can see for yourself. Code:
/* PTB */
/* Process '?' */
if (p_ptr->command_new == '?')
{
p_ptr->command_new = 0;
/* Show help screen */
/* Save screen */
screen_save();
/* Peruse the invent/equip help file */
(void)show_file("invent.txt", NULL, 0, 0);
/* Load screen */
screen_load();
}
/* Hack -- Process "Escape" */
else if (p_ptr->command_new == ESCAPE) /* PTB END */
|
|
|
|
|
|
|
#5 |
|
Veteran
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,962
Donated: $40
![]() |
Got it. I hadn't quite understood what you were doing. What you've got looks good, just put a comment in cmd0.c that invent.txt needs to be kept in sync.
|
|
|
|
|
|
#6 |
|
Knight
Join Date: Jan 2009
Posts: 657
![]() |
Could a moderator move this to the Development forum?
__________________
Currently turning (Angband) Japanese. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Proposed inventory changes! Comments please! | Orillian | Vanilla | 13 | February 11, 2009 21:03 |
| Elemental attacks destroying inventory items - challenging or frustrating? | hugorune | Vanilla | 24 | January 28, 2009 08:23 |
| Vendor suggestion | Zikke | Vanilla | 2 | January 12, 2009 21:39 |
| inventory management newb question | Halloween Jack | Vanilla | 16 | October 30, 2007 13:14 |
| Command Menu Suggestion | arcum42 | Vanilla | 1 | August 3, 2007 14:54 |