1 #ifndef GAME_MWCLASS_APPARATUS_H 2 #define GAME_MWCLASS_APPARATUS_H 3 4 #include "../mwworld/class.hpp" 5 6 namespace MWClass 7 { 8 class Apparatus : public MWWorld::Class 9 { 10 11 MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; 12 13 public: 14 15 float getWeight (const MWWorld::ConstPtr& ptr) const override; 16 17 void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; 18 ///< Add reference into a cell for rendering 19 20 void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; 21 22 std::string getName (const MWWorld::ConstPtr& ptr) const override; 23 ///< \return name or ID; can return an empty string. 24 25 std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, 26 const MWWorld::Ptr& actor) const override; 27 ///< Generate action for activation 28 29 std::string getScript (const MWWorld::ConstPtr& ptr) const override; 30 ///< Return name of the script attached to ptr 31 32 int getValue (const MWWorld::ConstPtr& ptr) const override; 33 ///< Return trade value of the object. Throws an exception, if the object can't be traded. 34 35 MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; 36 ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. 37 38 static void registerSelf(); 39 40 std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; 41 ///< Return the pick up sound Id 42 43 std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; 44 ///< Return the put down sound Id 45 46 std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; 47 ///< Return name of inventory icon. 48 49 std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr, bool force=false) const override; 50 ///< Generate action for using via inventory menu 51 52 std::string getModel(const MWWorld::ConstPtr &ptr) const override; 53 54 bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; 55 }; 56 } 57 58 #endif 59