1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00

67 lines
2.9 KiB
C++
Raw Normal View History

2010-08-03 15:24:44 +02:00
#ifndef GAME_MWCLASS_BOOK_H
#define GAME_MWCLASS_BOOK_H
#include "../mwworld/class.hpp"
namespace MWClass
{
class Book : public MWWorld::Class
{
2015-12-18 16:24:24 +01:00
virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const;
2010-08-03 15:24:44 +02:00
public:
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering
virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const;
2011-11-11 23:01:12 -05:00
virtual std::string getName (const MWWorld::ConstPtr& ptr) const;
2010-08-03 17:11:41 +02:00
///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string.
2010-08-03 15:24:44 +02:00
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const;
2010-08-07 20:25:17 +02:00
///< Generate action for activation
2015-12-18 00:12:03 +01:00
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
///< Return name of the script attached to ptr
2015-12-19 16:29:07 +01:00
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
///< Return trade value of the object. Throws an exception, if the object can't be traded.
2010-08-03 15:24:44 +02:00
static void registerSelf();
2015-12-18 16:09:08 +01:00
virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const;
///< Return the pick up sound Id
2015-12-18 16:09:08 +01:00
virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const;
///< Return the put down sound Id
2012-04-15 17:52:39 +02:00
2015-12-18 15:53:47 +01:00
virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
2012-04-15 17:52:39 +02:00
///< Return name of inventory icon.
2012-05-12 21:44:33 +02:00
2015-12-18 15:56:45 +01:00
virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const;
2012-05-12 21:44:33 +02:00
///< @return the enchantment ID if the object is enchanted, otherwise an empty string
2015-12-18 16:43:11 +01:00
virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const;
///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it.
2013-03-28 17:41:00 +01:00
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr, bool force=false) const;
///< Generate action for using via inventory menu
2012-07-24 20:22:11 +04:00
2015-12-18 15:51:05 +01:00
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
2013-03-28 17:41:00 +01:00
virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const;
2015-12-18 16:00:50 +01:00
virtual float getWeight (const MWWorld::ConstPtr& ptr) const;
2013-05-11 18:38:27 +02:00
2015-12-18 15:58:23 +01:00
virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
2010-08-03 15:24:44 +02:00
};
}
#endif