1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00
OpenMW/apps/openmw/mwclass/repair.hpp

64 lines
2.7 KiB
C++
Raw Normal View History

2010-08-03 15:24:44 +02:00
#ifndef GAME_MWCLASS_REPAIR_H
#define GAME_MWCLASS_REPAIR_H
#include "../mwworld/class.hpp"
namespace MWClass
{
class Repair : public MWWorld::Class
{
MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override;
2010-08-03 15:24:44 +02:00
public:
void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override;
///< Add reference into a cell for rendering
std::string getName (const MWWorld::ConstPtr& ptr) const override;
///< \return name or ID; can return an empty string.
2010-08-03 15:24:44 +02:00
std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const override;
2010-08-07 20:25:17 +02:00
///< Generate action for activation
MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override;
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
std::string getScript (const MWWorld::ConstPtr& ptr) const override;
///< Return name of the script attached to ptr
int getValue (const MWWorld::ConstPtr& ptr) const override;
///< 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();
std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override;
///< Return the pick up sound Id
std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override;
///< Return the put down sound Id
2012-04-15 17:52:39 +02:00
std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override;
2012-04-15 17:52:39 +02:00
///< Return name of inventory icon.
2012-07-24 20:22:11 +04:00
std::string getModel(const MWWorld::ConstPtr &ptr) const override;
2013-03-23 08:16:46 +01:00
std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr, bool force=false) const override;
2013-03-23 08:16:46 +01:00
///< Generate action for using via inventory menu (default implementation: return a
/// null action).
bool hasItemHealth (const MWWorld::ConstPtr& ptr) const override;
2013-03-23 08:16:46 +01:00
///< \return Item health data available? (default implementation: false)
int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const override;
2013-03-23 08:16:46 +01:00
///< Return item max health or throw an exception, if class does not have item health
2014-10-05 17:59:53 -05:00
/// (default implementation: throw an exception)
float getWeight (const MWWorld::ConstPtr& ptr) const override;
2013-05-11 18:38:27 +02:00
bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override;
2010-08-03 15:24:44 +02:00
};
}
#endif