Editor: Decouple levelled list columns (bug #6705)

check_span
Alexei Kotov 2 years ago
parent a46aa4dc2d
commit 0d18f76271

@ -129,6 +129,7 @@
Bug #6680: object.cpp handles nodetree unsafely, memory access with dangling pointer
Bug #6682: HitOnMe doesn't fire as intended
Bug #6697: Shaders vertex lighting incorrectly clamped
Bug #6705: OpenMW CS: A typo in the Creature levelled list
Bug #6711: Log time differs from real time
Bug #6717: Broken script causes interpreter stack corruption
Bug #6718: Throwable weapons cause arrow enchantment effect to be applied to the whole body

@ -267,7 +267,7 @@ namespace CSMWorld
{ ColumnId_LevelledList,"Levelled List" },
{ ColumnId_LevelledItemId,"Levelled Item" },
{ ColumnId_LevelledItemLevel,"Item Level" },
{ ColumnId_LevelledItemLevel,"PC Level" },
{ ColumnId_LevelledItemType, "Calculate all levels <= player" },
{ ColumnId_LevelledItemTypeEach, "Select a new item for each instance" },
{ ColumnId_LevelledItemChanceNone, "Chance None" },
@ -373,6 +373,8 @@ namespace CSMWorld
{ ColumnId_Persistent, "Persistent" },
{ ColumnId_Blocked, "Blocked" },
{ ColumnId_LevelledCreatureId,"Levelled Creature" },
{ -1, 0 } // end marker
};
}

@ -346,6 +346,8 @@ namespace CSMWorld
ColumnId_Persistent = 313,
ColumnId_Blocked = 314,
ColumnId_LevelledCreatureId = 315,
// Allocated to a separate value range, so we don't get a collision should we ever need
// to extend the number of use values.
ColumnId_UseValue1 = 0x10000,

@ -617,27 +617,39 @@ CSMWorld::RefIdCollection::RefIdCollection()
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_PartRefFemale, CSMWorld::ColumnBase::Display_BodyPart));
LevListColumns levListColumns (baseColumns);
LevListColumns creatureLevListColumns (baseColumns);
LevListColumns itemLevListColumns (baseColumns);
std::map<UniversalId::Type, NestedRefIdAdapterBase*> creatureLevListMap, itemLevListMap;
creatureLevListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
new NestedLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
itemLevListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList,
new NestedLevListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList)));
// Nested table
// Levelled creature nested table
mColumns.emplace_back(Columns::ColumnId_LevelledList,
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
levListColumns.mLevList = &mColumns.back();
std::map<UniversalId::Type, NestedRefIdAdapterBase*> levListMap;
levListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
new NestedLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
levListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList,
new NestedLevListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList)));
mNestedAdapters.emplace_back(&mColumns.back(), levListMap);
creatureLevListColumns.mLevList = &mColumns.back();
mNestedAdapters.emplace_back(&mColumns.back(), creatureLevListMap);
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_LevelledCreatureId, CSMWorld::ColumnBase::Display_Referenceable));
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_LevelledItemLevel, CSMWorld::ColumnBase::Display_Integer));
// Levelled item nested table
mColumns.emplace_back(Columns::ColumnId_LevelledList,
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
itemLevListColumns.mLevList = &mColumns.back();
mNestedAdapters.emplace_back(&mColumns.back(), itemLevListMap);
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_LevelledItemId, CSMWorld::ColumnBase::Display_Referenceable));
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_LevelledItemLevel, CSMWorld::ColumnBase::Display_Integer));
// Nested list
// Shared levelled list nested list
mColumns.emplace_back(Columns::ColumnId_LevelledList,
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List);
levListColumns.mNestedListLevList = &mColumns.back();
creatureLevListColumns.mNestedListLevList = &mColumns.back();
itemLevListColumns.mNestedListLevList = &mColumns.back();
std::map<UniversalId::Type, NestedRefIdAdapterBase*> nestedListLevListMap;
nestedListLevListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
new NestedListLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
@ -673,9 +685,9 @@ CSMWorld::RefIdCollection::RefIdCollection()
new IngredientRefIdAdapter (ingredientColumns)));
mAdapters.insert (std::make_pair (UniversalId::Type_CreatureLevelledList,
new LevelledListRefIdAdapter<ESM::CreatureLevList> (
UniversalId::Type_CreatureLevelledList, levListColumns)));
UniversalId::Type_CreatureLevelledList, creatureLevListColumns)));
mAdapters.insert (std::make_pair (UniversalId::Type_ItemLevelledList,
new LevelledListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList, levListColumns)));
new LevelledListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList, itemLevListColumns)));
mAdapters.insert (std::make_pair (UniversalId::Type_Light,
new LightRefIdAdapter (lightColumns)));
mAdapters.insert (std::make_pair (UniversalId::Type_Lockpick,

Loading…
Cancel
Save