Ok so I have a minor fix for this problem, I can't really go any further until I have more confirmation of how things should be organised. In "test.def", the entity which shouldn't be droppable is defined as:
entityDef veil_stone
{
"inherit" "atdm:playertool"
"editor_displayFolder" "interactables/special"
"editor_usage" "The Stone"
"editor_color" "0.078 0.914 0.600"
// model
"model" "models/volta/special/veil_stone.ASE"
"density" ".5"
"bouncyness" "0.01"
"mass" "20"
//Inventory
"frob_distance" "75"
"inv_droppable" "0"
"notPushable" "1"
"inv_name" "The Stone"
"inv_icon" "guis/assets/hud/inventory_icons/icon_stone"
}And in the .map file there is:
// entity 16
{
"classname" "veil_stone"
"name" "veil_stone_2"
"inv_map_start" "1"
"origin" "89 -94 86"
"rotation" "1 0 0 0 1 0 0 0 1"
}Items are loaded into the shop using CShop::AddPersistentStartingEquipment() in particular:
if (!itemMerged)
{
CShopItemPtr anItem(new CShopItem(*found, quantity, 0, false));
bool canDrop = itemDict->GetBool("inv_droppable", "1"); //This is always returning true (by default) - the dictionary cannot find "inv_droppable" or "inv_icon" or etc
anItem->SetCanDrop(canDrop);
_startingItems.Append(anItem);
}
However, the itemDict refers to the entity defined in the .map file rather than the .def file. So if "inv_droppable" "0" is added to the .map file entity, the drop button will be removed for it
// entity 16
{
"classname" "veil_stone"
"name" "veil_stone_2"
"inv_map_start" "1"
"origin" "89 -94 86"
"rotation" "1 0 0 0 1 0 0 0 1"
"inv_droppable" "0" <----- I can't make this bold but this is the key line
}Now I'm not sure whether the inv_droppable should be defined in the .map entities or the .def entities, so I need some confirmation regarding this And now I need to go to bed now, it's past 2AM