"dumpinventory" console command
Moderator: GZDoom Developers
-
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
"dumpinventory" console command
Would it be possible to include a "dumpinventory" console command which works like dump classes but only dumps whats in the players inventory. This will come in handy when the player has a large inventory and needs to know
-
- Lead GZDoom+Raze Developer
- Posts: 49194
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Look what's already there: 

Code: Select all
//===========================================================================
//
// CCMD printinv
//
// Prints the console player's current inventory.
//
//===========================================================================
CCMD (printinv)
{
AInventory *item;
for (item = players[consoleplayer].mo->Inventory; item != NULL; item = item->Inventory)
{
Printf ("%s #%lu (%d/%d)\n", item->GetClass()->Name+1, item->InventoryID, item->Amount, item->MaxAmount);
}
}
-
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
-
- Posts: 292
- Joined: Wed Jul 16, 2003 9:26 pm
- Location: Most likely sleeping.
Bah, I knew about that. It's right in the cmdlist thing and it's pretty obvious what it does. Though I have to say "printinv" is a hell of a lot less intuitive then "dumpinventory", especially with all the other dump* commands. I would vote to rename it to be more consistent, but honestly that would be nitpicking.