mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 12:09:41 +00:00
added missing getId functions to classes derived from MWWorld::Class
This commit is contained in:
parent
8952154488
commit
4fb897f2f8
32 changed files with 128 additions and 0 deletions
|
@ -25,6 +25,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Activator::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Activator>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -13,6 +13,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Apparatus::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Apparatus>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Apparatus::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Apparatus::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -13,6 +13,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual float getWeight (const MWWorld::Ptr& ptr) const;
|
virtual float getWeight (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
|
|
|
@ -25,6 +25,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Armor::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Armor>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Armor::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Armor::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual float getWeight (const MWWorld::Ptr& ptr) const;
|
virtual float getWeight (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
|
|
|
@ -22,6 +22,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Book::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Book>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Book::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Book::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Clothing::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Clothing>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Clothing::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Clothing::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,11 @@ namespace
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Container::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Container>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Container::ensureCustomData (const MWWorld::Ptr& ptr) const
|
void Container::ensureCustomData (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
if (!ptr.getRefData().getCustomData())
|
if (!ptr.getRefData().getCustomData())
|
||||||
|
|
|
@ -15,6 +15,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,11 @@ namespace
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string CreatureLevList::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::CreatureLevList>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
std::string CreatureLevList::getName (const MWWorld::Ptr& ptr) const
|
std::string CreatureLevList::getName (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -11,6 +11,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual std::string getName (const MWWorld::Ptr& ptr) const;
|
virtual std::string getName (const MWWorld::Ptr& ptr) const;
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
|
@ -42,6 +42,11 @@ namespace
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Door::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Door>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Door::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Door::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -16,6 +16,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string ItemLevList::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::ItemLevList>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
std::string ItemLevList::getName (const MWWorld::Ptr& ptr) const
|
std::string ItemLevList::getName (const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -9,6 +9,9 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual std::string getName (const MWWorld::Ptr& ptr) const;
|
virtual std::string getName (const MWWorld::Ptr& ptr) const;
|
||||||
///< \return name (the one that is to be presented to the user; not the internal one);
|
///< \return name (the one that is to be presented to the user; not the internal one);
|
||||||
/// can return an empty string.
|
/// can return an empty string.
|
||||||
|
|
|
@ -47,6 +47,11 @@ namespace
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Light::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Light>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -14,6 +14,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Lockpick::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Lockpick>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,11 @@ bool isGold (const MWWorld::Ptr& ptr)
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Miscellaneous::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Miscellaneous>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Miscellaneous::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Miscellaneous::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Potion::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Potion>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Potion::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Potion::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Probe::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Probe>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Probe::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Probe::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Repair::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Repair>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Repair::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Repair::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
const std::string model = getModel(ptr);
|
const std::string model = getModel(ptr);
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
|
|
||||||
namespace MWClass
|
namespace MWClass
|
||||||
{
|
{
|
||||||
|
std::string Static::getId (const MWWorld::Ptr& ptr) const
|
||||||
|
{
|
||||||
|
return ptr.get<ESM::Static>()->mBase->mId;
|
||||||
|
}
|
||||||
|
|
||||||
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Static> *ref =
|
MWWorld::LiveCellRef<ESM::Static> *ref =
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace MWClass
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Return ID of \a ptr
|
||||||
|
virtual std::string getId (const MWWorld::Ptr& ptr) const;
|
||||||
|
|
||||||
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
|
||||||
///< Add reference into a cell for rendering
|
///< Add reference into a cell for rendering
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue