2010-08-03 15:24:44 +02:00
|
|
|
#ifndef GAME_MWCLASS_MISC_H
|
|
|
|
#define GAME_MWCLASS_MISC_H
|
|
|
|
|
|
|
|
#include "../mwworld/class.hpp"
|
|
|
|
|
|
|
|
namespace MWClass
|
|
|
|
{
|
2011-06-19 18:14:03 +02:00
|
|
|
class Miscellaneous : public MWWorld::Class
|
2010-08-03 15:24:44 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2015-12-19 16:47:55 +01:00
|
|
|
virtual MWWorld::Ptr copyToCell(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell, int count) const;
|
|
|
|
|
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-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 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-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-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-30 15:51:07 +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;
|
2013-03-30 15:51:07 +01:00
|
|
|
///< Generate action for using via inventory menu
|
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;
|
2014-01-01 22:37:52 +01:00
|
|
|
|
2015-12-18 15:27:06 +01:00
|
|
|
virtual bool isKey (const MWWorld::ConstPtr &ptr) const;
|
2015-07-20 08:05:52 +09:00
|
|
|
|
2015-12-18 15:27:06 +01:00
|
|
|
virtual bool isGold (const MWWorld::ConstPtr& ptr) const;
|
2010-08-03 15:24:44 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|