OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
light.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWCLASS_LIGHT_H
2 #define GAME_MWCLASS_LIGHT_H
3 
4 #include "../mwworld/class.hpp"
5 
6 namespace MWClass
7 {
8  class Light : public MWWorld::Class
9  {
10  virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const;
11 
12  public:
13 
14  virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const;
16 
17  virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const;
18 
19  virtual std::string getName (const MWWorld::ConstPtr& ptr) const;
22 
23  virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
25 
26  virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
28 
29  virtual bool showsInInventory (const MWWorld::ConstPtr& ptr) const;
30 
31  virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
32  const MWWorld::Ptr& actor) const;
34 
35  virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
37 
38  virtual std::pair<std::vector<int>, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const;
41 
42  virtual int getValue (const MWWorld::ConstPtr& ptr) const;
44 
45  static void registerSelf();
46 
47  virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const;
49 
50  virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const;
52 
53  virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
55 
56  virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
57  const;
59 
60  virtual void setRemainingUsageTime (const MWWorld::Ptr& ptr, float duration) const;
62 
63  virtual float getRemainingUsageTime (const MWWorld::ConstPtr& ptr) const;
65 
66  virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;
67 
68  virtual float getWeight (const MWWorld::ConstPtr& ptr) const;
69 
70  virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const;
71 
72  std::pair<int, std::string> canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const;
73 
74  virtual std::string getSound(const MWWorld::ConstPtr& ptr) const;
75  };
76 }
77 
78 #endif
std::pair< int, std::string > canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const
Definition: light.cpp:227
virtual float getWeight(const MWWorld::ConstPtr &ptr) const
Definition: light.cpp:221
Definition: tooltips.hpp:18
virtual std::string getName(const MWWorld::ConstPtr &ptr) const
Definition: light.cpp:69
virtual std::string getSound(const MWWorld::ConstPtr &ptr) const
Returns sound id.
Definition: light.cpp:254
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const
Definition: light.cpp:58
virtual bool showsInInventory(const MWWorld::ConstPtr &ptr) const
Definition: light.cpp:176
virtual MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr &ptr, int count) const
Definition: light.cpp:150
Definition: renderinginterface.hpp:9
virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const
Definition: light.cpp:209
virtual std::pair< std::vector< int >, bool > getEquipmentSlots(const MWWorld::ConstPtr &ptr) const
Definition: light.cpp:99
virtual std::string getUpSoundId(const MWWorld::ConstPtr &ptr) const
Return the pick up sound Id.
Definition: light.cpp:125
virtual int getValue(const MWWorld::ConstPtr &ptr) const
Return trade value of the object. Throws an exception, if the object can't be traded.
Definition: light.cpp:111
Definition: light.hpp:8
virtual float getRemainingUsageTime(const MWWorld::ConstPtr &ptr) const
Returns the remaining duration of the object.
Definition: light.cpp:200
Definition: physicssystem.hpp:51
virtual bool canSell(const MWWorld::ConstPtr &item, int npcServices) const
Determine whether or not item can be sold to an npc with the given npcServices.
Definition: light.cpp:216
Base class for referenceable esm records.
Definition: class.hpp:52
virtual void insertObject(const MWWorld::Ptr &ptr, const std::string &model, MWPhysics::PhysicsSystem &physics) const
Add reference into a cell for rendering (default implementation: don't render anything).
Definition: light.cpp:40
virtual void insertObjectRendering(const MWWorld::Ptr &ptr, const std::string &model, MWRender::RenderingInterface &renderingInterface) const
Add reference into a cell for rendering.
Definition: light.cpp:31
virtual boost::shared_ptr< MWWorld::Action > use(const MWWorld::Ptr &ptr) const
Generate action for using via inventory menu.
Definition: light.cpp:186
Mutable state of a cell.
Definition: cellstore.hpp:53
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
virtual bool hasToolTip(const MWWorld::ConstPtr &ptr) const
Definition: light.cpp:143
virtual std::string getInventoryIcon(const MWWorld::ConstPtr &ptr) const
Return name of inventory icon.
Definition: light.cpp:136
virtual boost::shared_ptr< MWWorld::Action > activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
Generate action for activation.
Definition: light.cpp:79
virtual std::string getScript(const MWWorld::ConstPtr &ptr) const
Return name of the script attached to ptr.
Definition: light.cpp:92
static void registerSelf()
Definition: light.cpp:118
virtual std::string getDownSoundId(const MWWorld::ConstPtr &ptr) const
Return the put down sound Id.
Definition: light.cpp:130
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void setRemainingUsageTime(const MWWorld::Ptr &ptr, float duration) const
Sets the remaining duration of the object.
Definition: light.cpp:195