2010-08-03 13:17:31 +02:00
|
|
|
#ifndef GAME_MWCLASS_ACTIVATOR_H
|
|
|
|
#define GAME_MWCLASS_ACTIVATOR_H
|
|
|
|
|
|
|
|
#include "../mwworld/class.hpp"
|
|
|
|
|
|
|
|
namespace MWClass
|
|
|
|
{
|
|
|
|
class Activator : public MWWorld::Class
|
|
|
|
{
|
2012-07-25 17:18:17 +04:00
|
|
|
|
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 13:17:31 +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;
|
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 13:17:31 +02:00
|
|
|
|
2015-12-19 16:13:00 +01:00
|
|
|
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
2012-04-16 22:58:16 +02:00
|
|
|
///< @return true if this object has a tooltip when focused (default implementation: false)
|
|
|
|
|
2015-12-18 15:27:06 +01:00
|
|
|
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) 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
|
|
|
|
|
2013-08-28 11:36:22 -07:00
|
|
|
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const;
|
|
|
|
///< Generate action for activation
|
|
|
|
|
2010-08-03 13:17:31 +02:00
|
|
|
static void registerSelf();
|
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;
|
2010-08-03 13:17:31 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|