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;
|
2012-07-25 17:18:17 +04:00
|
|
|
|
2010-08-03 15:24:44 +02:00
|
|
|
public:
|
|
|
|
|
2015-01-12 11:29:56 +01:00
|
|
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const;
|
2010-08-14 10:02:54 +02:00
|
|
|
///< Add reference into a cell for rendering
|
|
|
|
|
2015-05-10 01:09:00 +02:00
|
|
|
virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const;
|
2011-11-11 23:01:12 -05:00
|
|
|
|
2015-12-18 15:27:06 +01:00
|
|
|
virtual std::string getName (const MWWorld::ConstPtr& ptr) const;
|
2019-09-11 00:06:50 +03:00
|
|
|
///< \return name or ID; can return an empty string.
|
2010-08-03 15:24:44 +02:00
|
|
|
|
2017-05-05 21:21:11 +02:00
|
|
|
virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
2012-04-23 15:27:03 +02:00
|
|
|
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;
|
2010-08-05 15:40:03 +02:00
|
|
|
///< 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;
|
2012-04-16 22:58:16 +02:00
|
|
|
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
|
|
|
|
2015-12-18 15:27:06 +01:00
|
|
|
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
|
2012-04-07 19:53:49 +02:00
|
|
|
///< 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();
|
2012-03-13 18:50:32 +02:00
|
|
|
|
2015-12-18 16:09:08 +01:00
|
|
|
virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const;
|
2012-03-13 18:50:32 +02:00
|
|
|
///< Return the pick up sound Id
|
|
|
|
|
2015-12-18 16:09:08 +01:00
|
|
|
virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const;
|
2012-03-13 18:50:32 +02:00
|
|
|
///< 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
|
2012-05-15 18:05:53 +02:00
|
|
|
|
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;
|
2014-05-24 14:48:37 +02:00
|
|
|
///< 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
|
|
|
|
2018-07-09 19:31:40 +04:00
|
|
|
virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr, bool force=false) const;
|
2012-05-15 18:05:53 +02:00
|
|
|
///< 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
|
|
|
|
2015-12-18 16:48:19 +01:00
|
|
|
virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const;
|
2013-04-07 21:38:53 +02:00
|
|
|
|
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
|