#include "light.hpp" #include #include #include "../mwworld/ptr.hpp" #include "containerutil.hpp" namespace MWClass { std::string Light::getName (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); if (ref->base->model.empty()) return ""; return ref->base->name; } void Light::insertIntoContainer (const MWWorld::Ptr& ptr, MWWorld::ContainerStore& containerStore) const { insertIntoContainerStore (ptr, containerStore.lights); } std::string Light::getScript (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->script; } void Light::registerSelf() { boost::shared_ptr instance (new Light); registerClass (typeid (ESM::Light).name(), instance); } }