mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:45:31 +00:00
[Client] Make it possible to check whether a class has a ContainerStore
This commit is contained in:
parent
258e319acb
commit
ec1311fcb7
5 changed files with 54 additions and 0 deletions
|
@ -36,6 +36,16 @@ namespace MWClass
|
|||
virtual MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const;
|
||||
///< Return container store
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Make it possible to check whether a class has a container store
|
||||
*/
|
||||
virtual bool hasContainerStore(const MWWorld::Ptr &ptr) const { return true; }
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
///< Return name of the script attached to ptr
|
||||
|
||||
|
|
|
@ -73,6 +73,16 @@ namespace MWClass
|
|||
|
||||
virtual bool hasInventoryStore (const MWWorld::Ptr &ptr) const;
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Make it possible to check whether a class has a container store
|
||||
*/
|
||||
virtual bool hasContainerStore(const MWWorld::Ptr &ptr) const { return true; }
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
///< Return name of the script attached to ptr
|
||||
|
||||
|
|
|
@ -71,6 +71,16 @@ namespace MWClass
|
|||
|
||||
virtual bool hasInventoryStore(const MWWorld::Ptr &ptr) const { return true; }
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Make it possible to check whether a class has a container store
|
||||
*/
|
||||
virtual bool hasContainerStore(const MWWorld::Ptr &ptr) const { return true; }
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
virtual void hit(const MWWorld::Ptr& ptr, float attackStrength, int type) const;
|
||||
|
||||
virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const;
|
||||
|
|
|
@ -128,6 +128,19 @@ namespace MWWorld
|
|||
throw std::runtime_error ("class does not have an inventory store");
|
||||
}
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Make it possible to check whether a class has a container store
|
||||
*/
|
||||
bool Class::hasContainerStore(const Ptr &ptr) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
bool Class::hasInventoryStore(const Ptr &ptr) const
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -154,6 +154,17 @@ namespace MWWorld
|
|||
///< Return inventory store or throw an exception, if class does not have a
|
||||
/// inventory store (default implementation: throw an exception)
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Make it possible to check whether a class has a container store
|
||||
*/
|
||||
virtual bool hasContainerStore(const Ptr& ptr) const;
|
||||
///< Does this object have a container store? (default implementation: false)
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
virtual bool hasInventoryStore (const Ptr& ptr) const;
|
||||
///< Does this object have an inventory store, i.e. equipment slots? (default implementation: false)
|
||||
|
||||
|
|
Loading…
Reference in a new issue