mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 06:41:36 +00:00
Prevent consumption of ingredients that don't have a first effect
This commit is contained in:
parent
0ed1310417
commit
f5c5ebc1dc
2 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,7 @@
|
||||||
Bug #7088: Deleting last save game of last character doesn't clear character name/details
|
Bug #7088: Deleting last save game of last character doesn't clear character name/details
|
||||||
Bug #7092: BSA archives from higher priority directories don't take priority
|
Bug #7092: BSA archives from higher priority directories don't take priority
|
||||||
Bug #7122: Teleportation to underwater should cancel active water walking effect
|
Bug #7122: Teleportation to underwater should cancel active water walking effect
|
||||||
|
Bug #7163: Myar Aranath: Wheat breaks the GUI
|
||||||
Bug #7172: Current music playlist continues playing indefinitely if next playlist is empty
|
Bug #7172: Current music playlist continues playing indefinitely if next playlist is empty
|
||||||
Feature #5492: Let rain and snow collide with statics
|
Feature #5492: Let rain and snow collide with statics
|
||||||
Feature #6447: Add LOD support to Object Paging
|
Feature #6447: Add LOD support to Object Paging
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "../mwworld/actioneat.hpp"
|
#include "../mwworld/actioneat.hpp"
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
#include "../mwworld/nullaction.hpp"
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
|
@ -72,6 +73,8 @@ namespace MWClass
|
||||||
|
|
||||||
std::unique_ptr<MWWorld::Action> Ingredient::use(const MWWorld::Ptr& ptr, bool force) const
|
std::unique_ptr<MWWorld::Action> Ingredient::use(const MWWorld::Ptr& ptr, bool force) const
|
||||||
{
|
{
|
||||||
|
if (ptr.get<ESM::Ingredient>()->mBase->mData.mEffectID[0] < 0)
|
||||||
|
return std::make_unique<MWWorld::NullAction>();
|
||||||
std::unique_ptr<MWWorld::Action> action = std::make_unique<MWWorld::ActionEat>(ptr);
|
std::unique_ptr<MWWorld::Action> action = std::make_unique<MWWorld::ActionEat>(ptr);
|
||||||
|
|
||||||
action->setSound(ESM::RefId::stringRefId("Swallow"));
|
action->setSound(ESM::RefId::stringRefId("Swallow"));
|
||||||
|
|
Loading…
Reference in a new issue