2016-01-01 23:49:53 +00:00
|
|
|
#include "bodypart.hpp"
|
|
|
|
|
2022-09-08 19:08:59 +00:00
|
|
|
#include <components/esm3/loadbody.hpp>
|
|
|
|
|
2016-01-01 23:49:53 +00:00
|
|
|
#include "../mwrender/objects.hpp"
|
|
|
|
#include "../mwrender/renderinginterface.hpp"
|
|
|
|
|
|
|
|
#include "../mwworld/cellstore.hpp"
|
|
|
|
|
2022-06-28 22:32:11 +00:00
|
|
|
#include "classmodel.hpp"
|
2022-05-13 17:28:53 +00:00
|
|
|
|
2016-01-01 23:49:53 +00:00
|
|
|
namespace MWClass
|
|
|
|
{
|
2022-04-04 00:44:53 +00:00
|
|
|
BodyPart::BodyPart()
|
|
|
|
: MWWorld::RegisteredClass<BodyPart>(ESM::BodyPart::sRecordId)
|
|
|
|
{
|
|
|
|
}
|
2016-01-01 23:49:53 +00:00
|
|
|
|
|
|
|
MWWorld::Ptr BodyPart::copyToCellImpl(const MWWorld::ConstPtr& ptr, MWWorld::CellStore& cell) const
|
|
|
|
{
|
|
|
|
const MWWorld::LiveCellRef<ESM::BodyPart>* ref = ptr.get<ESM::BodyPart>();
|
|
|
|
|
|
|
|
return MWWorld::Ptr(cell.insert(ref), &cell);
|
|
|
|
}
|
|
|
|
|
|
|
|
void BodyPart::insertObjectRendering(
|
|
|
|
const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
|
|
|
|
{
|
|
|
|
if (!model.empty())
|
|
|
|
{
|
|
|
|
renderingInterface.getObjects().insertModel(ptr, model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-16 19:15:03 +00:00
|
|
|
std::string_view BodyPart::getName(const MWWorld::ConstPtr& ptr) const
|
2016-01-01 23:49:53 +00:00
|
|
|
{
|
2022-08-16 19:15:03 +00:00
|
|
|
return {};
|
2016-01-01 23:49:53 +00:00
|
|
|
}
|
|
|
|
|
2019-09-10 18:56:10 +00:00
|
|
|
bool BodyPart::hasToolTip(const MWWorld::ConstPtr& ptr) const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-01 23:49:53 +00:00
|
|
|
std::string BodyPart::getModel(const MWWorld::ConstPtr& ptr) const
|
|
|
|
{
|
2022-06-28 22:32:11 +00:00
|
|
|
return getClassModel<ESM::BodyPart>(ptr);
|
2016-01-01 23:49:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|