"dumpinventory" console command

Moderator: GZDoom Developers

User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

"dumpinventory" console command

Post by TheDarkArchon »

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
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

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);
	}
}
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

This, Ladies adn Gents, is YAUZDF

Yet Another Undocumented ZDoom Feature
User avatar
Killo Zapit
Posts: 292
Joined: Wed Jul 16, 2003 9:26 pm
Location: Most likely sleeping.

Post by Killo Zapit »

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.

Return to “Closed Feature Suggestions [GZDoom]”