mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 19:53:53 +00:00
(#1191) Disallow picking up if inventory disabled
Check if window manager has allowed the inventory window if not, then items should not be possible to pick up
This commit is contained in:
parent
072dc6d438
commit
72a3c50eb8
1 changed files with 3 additions and 0 deletions
|
@ -514,6 +514,9 @@ namespace MWGui
|
|||
|
||||
void InventoryWindow::pickUpObject (MWWorld::Ptr object)
|
||||
{
|
||||
// If the inventory is not yet enabled, don't pick anything up
|
||||
if (!MWBase::Environment::get().getWindowManager()->isAllowed(GW_Inventory))
|
||||
return;
|
||||
// make sure the object is of a type that can be picked up
|
||||
std::string type = object.getTypeName();
|
||||
if ( (type != typeid(ESM::Apparatus).name())
|
||||
|
|
Loading…
Reference in a new issue