mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 07:06:43 +00:00
removed sDefaultWorldspace, only sDefaultWorldspaceId now.
sDefaultWorldspaceId is a StringRefId to be able to getvalue easily.
This commit is contained in:
parent
141878f30d
commit
56cb2a83ec
7 changed files with 10 additions and 11 deletions
|
@ -264,8 +264,7 @@ namespace NavMeshTool
|
||||||
const osg::Vec2i cellPosition(cell.mData.mX, cell.mData.mY);
|
const osg::Vec2i cellPosition(cell.mData.mX, cell.mData.mY);
|
||||||
const std::size_t cellObjectsBegin = data.mObjects.size();
|
const std::size_t cellObjectsBegin = data.mObjects.size();
|
||||||
const auto cellWorldspace = Misc::StringUtils::lowerCase(
|
const auto cellWorldspace = Misc::StringUtils::lowerCase(
|
||||||
(cell.isExterior() ? ESM::RefId::stringRefId(ESM::Cell::sDefaultWorldspace) : cell.mId)
|
(cell.isExterior() ? ESM::Cell::sDefaultWorldspaceId : cell.mId).serializeText());
|
||||||
.serializeText());
|
|
||||||
WorldspaceNavMeshInput& navMeshInput = [&]() -> WorldspaceNavMeshInput& {
|
WorldspaceNavMeshInput& navMeshInput = [&]() -> WorldspaceNavMeshInput& {
|
||||||
auto it = navMeshInputs.find(cellWorldspace);
|
auto it = navMeshInputs.find(cellWorldspace);
|
||||||
if (it == navMeshInputs.end())
|
if (it == navMeshInputs.end())
|
||||||
|
|
|
@ -337,7 +337,7 @@ std::pair<CSMWorld::UniversalId, std::string> CSMWorld::IdTable::view(int row) c
|
||||||
return std::make_pair(UniversalId::Type_None, "");
|
return std::make_pair(UniversalId::Type_None, "");
|
||||||
|
|
||||||
if (id[0] == '#')
|
if (id[0] == '#')
|
||||||
id = ESM::Cell::sDefaultWorldspace;
|
id = ESM::Cell::sDefaultWorldspaceId.getValue();
|
||||||
|
|
||||||
return std::make_pair(UniversalId(UniversalId::Type_Scene, id), hint);
|
return std::make_pair(UniversalId(UniversalId::Type_Scene, id), hint);
|
||||||
}
|
}
|
||||||
|
|
|
@ -305,7 +305,8 @@ void CSVWorld::RegionMap::view()
|
||||||
}
|
}
|
||||||
|
|
||||||
emit editRequest(
|
emit editRequest(
|
||||||
CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspace), hint.str());
|
CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspaceId.getValue()),
|
||||||
|
hint.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::RegionMap::viewInTable()
|
void CSVWorld::RegionMap::viewInTable()
|
||||||
|
|
|
@ -47,7 +47,7 @@ CSVWorld::SceneSubView::SceneSubView(const CSMWorld::UniversalId& id, CSMDoc::Do
|
||||||
CSVRender::WorldspaceWidget* worldspaceWidget = nullptr;
|
CSVRender::WorldspaceWidget* worldspaceWidget = nullptr;
|
||||||
widgetType whatWidget;
|
widgetType whatWidget;
|
||||||
|
|
||||||
if (Misc::StringUtils::ciEqual(id.getId(), ESM::Cell::sDefaultWorldspace))
|
if (Misc::StringUtils::ciEqual(id.getId(), ESM::Cell::sDefaultWorldspaceId.getValue()))
|
||||||
{
|
{
|
||||||
whatWidget = widget_Paged;
|
whatWidget = widget_Paged;
|
||||||
|
|
||||||
|
@ -168,7 +168,8 @@ void CSVWorld::SceneSubView::cellSelectionChanged(const CSMWorld::UniversalId& i
|
||||||
|
|
||||||
void CSVWorld::SceneSubView::cellSelectionChanged(const CSMWorld::CellSelection& selection)
|
void CSVWorld::SceneSubView::cellSelectionChanged(const CSMWorld::CellSelection& selection)
|
||||||
{
|
{
|
||||||
setUniversalId(CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspace));
|
setUniversalId(
|
||||||
|
CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspaceId.getValue()));
|
||||||
int size = selection.getSize();
|
int size = selection.getSize();
|
||||||
|
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace MWWorld
|
||||||
, mNameID(cell.mName)
|
, mNameID(cell.mName)
|
||||||
, mRegion(cell.mRegion)
|
, mRegion(cell.mRegion)
|
||||||
, mId(cell.mId)
|
, mId(cell.mId)
|
||||||
, mParent(ESM::RefId::stringRefId(ESM::Cell::sDefaultWorldspace))
|
, mParent(ESM::Cell::sDefaultWorldspaceId)
|
||||||
, mMood{
|
, mMood{
|
||||||
.mAmbiantColor = cell.mAmbi.mAmbient,
|
.mAmbiantColor = cell.mAmbi.mAmbient,
|
||||||
.mDirectionalColor = cell.mAmbi.mSunlight,
|
.mDirectionalColor = cell.mAmbi.mSunlight,
|
||||||
|
|
|
@ -39,8 +39,7 @@ namespace ESM
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
const std::string Cell::sDefaultWorldspace = "sys::default";
|
const StringRefId Cell::sDefaultWorldspaceId = StringRefId("sys::default");
|
||||||
const RefId Cell::sDefaultWorldspaceId = ESM::RefId::stringRefId(Cell::sDefaultWorldspace);
|
|
||||||
|
|
||||||
// Some overloaded compare operators.
|
// Some overloaded compare operators.
|
||||||
bool operator==(const MovedCellRef& ref, const RefNum& refNum)
|
bool operator==(const MovedCellRef& ref, const RefNum& refNum)
|
||||||
|
|
|
@ -66,8 +66,7 @@ namespace ESM
|
||||||
*/
|
*/
|
||||||
struct Cell
|
struct Cell
|
||||||
{
|
{
|
||||||
static const std::string sDefaultWorldspace;
|
static const ESM::StringRefId sDefaultWorldspaceId;
|
||||||
static const ESM::RefId sDefaultWorldspaceId;
|
|
||||||
|
|
||||||
constexpr static RecNameInts sRecordId = REC_CELL;
|
constexpr static RecNameInts sRecordId = REC_CELL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue