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