1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-23 20:39:57 +00:00

Issue #61: Basic alchemy class (doesn't do anything yet)

This commit is contained in:
Marc Zinnschlag 2012-09-27 11:59:40 +02:00
parent bb6d9a329c
commit cd343c4fbd
3 changed files with 10 additions and 2 deletions

View file

@ -61,7 +61,7 @@ add_openmw_dir (mwclass
add_openmw_dir (mwmechanics add_openmw_dir (mwmechanics
mechanicsmanagerimp stat creaturestats magiceffects movement actors drawstate spells mechanicsmanagerimp stat creaturestats magiceffects movement actors drawstate spells
activespells npcstats aipackage aisequence activespells npcstats aipackage aisequence alchemy
) )
add_openmw_dir (mwbase add_openmw_dir (mwbase

View file

@ -253,8 +253,10 @@ namespace MWGui
void AlchemyWindow::open() void AlchemyWindow::open()
{ {
openContainer(MWBase::Environment::get().getWorld()->getPlayer().getPlayer()); openContainer(MWBase::Environment::get().getWorld()->getPlayer().getPlayer()); // this sets mPtr
setFilter(ContainerBase::Filter_Ingredients); setFilter(ContainerBase::Filter_Ingredients);
mAlchemy.setAlchemist (mPtr);
// pick the best available apparatus // pick the best available apparatus
MWWorld::ContainerStore& store = MWWorld::Class::get(mPtr).getContainerStore(mPtr); MWWorld::ContainerStore& store = MWWorld::Class::get(mPtr).getContainerStore(mPtr);

View file

@ -1,6 +1,8 @@
#ifndef MWGUI_ALCHEMY_H #ifndef MWGUI_ALCHEMY_H
#define MWGUI_ALCHEMY_H #define MWGUI_ALCHEMY_H
#include "../mwmechanics/alchemy.hpp"
#include "window_base.hpp" #include "window_base.hpp"
#include "container.hpp" #include "container.hpp"
#include "widgets.hpp" #include "widgets.hpp"
@ -46,6 +48,10 @@ namespace MWGui
virtual void onReferenceUnavailable() { ; } virtual void onReferenceUnavailable() { ; }
void update(); void update();
private:
MWMechanics::Alchemy mAlchemy;
}; };
} }