When using the storage command (or, specifically, storage eq), all ammo item types in your equipment list inside storage do not show the quantity in that item slot, even though they are stackable, and are actually sitting there in your account's storage.
Code: Select all
storage eq
eq
-----------Storage-------------
-- Equipment --
41 Stun Arrow (Arrow)
45 Guisarme [3] (Weapon)
46 Mantle [1] (Armor)
47 Hat [1] (Armor)
48 Mantle [1] (Armor)
49 Poo Poo Hat (Armor) -- Not Identified
50 Poo Poo Hat (Armor) -- Not Identified
51 Poo Poo Hat (Armor) -- Not Identified
52 Poo Poo Hat (Armor) -- Not Identified
53 Guisarme [3] (Weapon)
54 Adventurer's Suit [1] (Armor)
55 Adventurer's Suit [1] (Armor)
-------------------------------
Capacity: 56/300
-------------------------------
I suggested a similar fix for inventory to EternalHarvest, many many revisions before current (8161 as of this writing), to fix inventory: i or i eq for quite a long time did not show the arrow quantities inventory, except when they were equipped.
Instead of letting someone else fix this, I actually buckled down and studied that fix, and then made and equivalent one for storage. This was done shamelessly for the ego boost that finding and coding a bug on your own does... and in hopes that I could parlay this patch into a request for SVN write access so I can carry on further bug fixes or improvements.
The change is contained in /src/Commands.pm in the cmdStorage_list subroutine called by cmdStorage.
I added a comment header for the command, detailing its usage, and what routine calls it.
Tabs are used for whitespace, and I took the liberty along with the bugfix, of removing extraneous single tabs that could just be a \n instead:
Code: Select all
Index: src/Commands.pm
===================================================================
--- src/Commands.pm (revision 8161)
+++ src/Commands.pm (working copy)
+## cmdStorage_list
+##
+## Displays the contents of storage, or a subset indicated by switches.
+##
+## Called by: cmdStorage (not called directly)
+##
+## Usage:
+## cmdStorage_list(<list_type>)
+##
+## Only uses the first parameter of the scalar passed.
+## <list_type> ::= ''|eq|nu|u
+##
+##
sub cmdStorage_list {
my $type = shift;
message "$type\n";
-
+
my @useable;
my @equipment;
my @non_useable;
-
+
for (my $i = 0; $i < @storageID; $i++) {
next if ($storageID[$i] eq "");
my $item = $storage{$storageID[$i]};
@@ -4317,22 +4396,31 @@
$eqp{binID} = $i;
$eqp{name} = $item->{name};
$eqp{type} = $itemTypes_lut{$item->{type}};
+ ## Add amt so we can give quantities for ammo.
+ $eqp{amount} = $item->{amount};
$eqp{identified} = " -- " . T("Not Identified") if !$item->{identified};
push @equipment, \%eqp;
} else {
push @non_useable, $item;
}
}
-
+
my $msg = T("-----------Storage-------------\n");
-
+
if (!$type || $type eq 'eq') {
$msg .= T("-- Equipment --\n");
foreach my $item (@equipment) {
- $msg .= sprintf("%-3d %s (%s) %s\n", $item->{binID}, $item->{name}, $item->{type}, $item->{identified});
+ ## altered to allow for Arrows/Ammo which will are stackable equip.
+ my $line = sprintf("%-3d %s (%s)", $item->{binID}, $item->{name}, $item->{type});
+ if ($item->{amount} > 1) {
+ $line .= " x $item->{amount}";
+ } else {
+ $line .= $item->{identified};
+ }
+ $msg .= $line . "\n";
}
}
-
+
if (!$type || $type eq 'nu') {
$msg .= T("-- Non-Usable --\n");
for (my $i = 0; $i < @non_useable; $i++) {
@@ -4345,7 +4433,7 @@
[$binID, $display]);
}
}
-
+
if (!$type || $type eq 'u') {
$msg .= T("-- Usable --\n");
for (my $i = 0; $i < @useable; $i++) {
@@ -4358,7 +4446,7 @@
[$binID, $display]);
}
}
-
+
$msg .= "-------------------------------\n";
$msg .= TF("Capacity: %d/%d\n", $storage{items}, $storage{items_max});
$msg .= "-------------------------------\n";
Code: Select all
storage eq
eq
-----------Storage-------------
-- Equipment --
41 Stun Arrow (Arrow) x 1000
45 Guisarme [3] (Weapon)
46 Mantle [1] (Armor)
47 Hat [1] (Armor)
48 Mantle [1] (Armor)
49 Poo Poo Hat (Armor) -- Not Identified
50 Poo Poo Hat (Armor) -- Not Identified
51 Poo Poo Hat (Armor) -- Not Identified
52 Poo Poo Hat (Armor) -- Not Identified
53 Guisarme [3] (Weapon)
54 Adventurer's Suit [1] (Armor)
55 Adventurer's Suit [1] (Armor)
-------------------------------
Capacity: 56/300
-------------------------------
I have only tested this with arrows, on an archer/hunter character or two, not with other ammo types (bullets or kunais). By just testing for the quantity and displaying it, I figured that any issues with particular ammo (item) types were avoided.
Provided that there are no serious faults or further improvements with this fix, I would like to request write access to the repository to commit it, so that other players can benefit from being able to check their inventory from the console.
Update
Commited as r8162.
Omitted obscene ranting/preview of a future fix. This part was not committed since glomming multiple fixes together is bad practice!