- added new IF_UNTOSSABLE flag for items that should be removable by any inventory function but not be droppable by the 'drop' CCMD.

SVN r3049 (trunk)
This commit is contained in:
Christoph Oelckers 2010-12-16 08:21:38 +00:00
parent 19b8e15af4
commit a06b88fa50
3 changed files with 5 additions and 4 deletions

View File

@ -628,7 +628,7 @@ AInventory *AInventory::CreateTossable ()
{
return NULL;
}
if ((ItemFlags & IF_UNDROPPABLE) || Owner == NULL || Amount <= 0)
if ((ItemFlags & (IF_UNDROPPABLE|IF_UNTOSSABLE)) || Owner == NULL || Amount <= 0)
{
return NULL;
}

View File

@ -116,10 +116,10 @@ enum
IF_PICKUPGOOD = 1<<2, // HandlePickup wants normal pickup FX to happen
IF_QUIET = 1<<3, // Don't give feedback when picking up
IF_AUTOACTIVATE = 1<<4, // Automatically activate item on pickup
IF_UNDROPPABLE = 1<<5, // The player cannot manually drop the item
IF_UNDROPPABLE = 1<<5, // Item cannot be removed unless done explicitly with RemoveInventory
IF_INVBAR = 1<<6, // Item appears in the inventory bar
IF_HUBPOWER = 1<<7, // Powerup is kept when moving in a hub
// IF_INTERHUBSTRIP = 1<<8, // Item is removed when travelling between hubs
IF_UNTOSSABLE = 1<<8, // The player cannot manually drop the item
IF_ADDITIVETIME = 1<<9, // when picked up while another item is active, time is added instead of replaced.
IF_ALWAYSPICKUP = 1<<10, // For IF_AUTOACTIVATE, MaxAmount=0 items: Always "pick up", even if it doesn't do anything
IF_FANCYPICKUPSOUND = 1<<11, // Play pickup sound in "surround" mode

View File

@ -279,12 +279,13 @@ static FFlagDef InventoryFlags[] =
DEFINE_FLAG(IF, UNDROPPABLE, AInventory, ItemFlags),
DEFINE_FLAG(IF, INVBAR, AInventory, ItemFlags),
DEFINE_FLAG(IF, HUBPOWER, AInventory, ItemFlags),
DEFINE_FLAG(IF, UNTOSSABLE, AInventory, ItemFlags),
DEFINE_FLAG(IF, ADDITIVETIME, AInventory, ItemFlags),
DEFINE_FLAG(IF, ALWAYSPICKUP, AInventory, ItemFlags),
DEFINE_FLAG(IF, FANCYPICKUPSOUND, AInventory, ItemFlags),
DEFINE_FLAG(IF, BIGPOWERUP, AInventory, ItemFlags),
DEFINE_FLAG(IF, KEEPDEPLETED, AInventory, ItemFlags),
DEFINE_FLAG(IF, IGNORESKILL, AInventory, ItemFlags),
DEFINE_FLAG(IF, ADDITIVETIME, AInventory, ItemFlags),
DEFINE_FLAG(IF, NOATTENPICKUPSOUND, AInventory, ItemFlags),
DEFINE_FLAG(IF, PERSISTENTPOWER, AInventory, ItemFlags),