mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 19:20:49 +00:00
Merge branch 'ltexmstt' into 'master'
Add movable static and ESM4 land texture stores, don't show tooltips for unnamed ESM4Named objects See merge request OpenMW/openmw!3528
This commit is contained in:
commit
62b787a214
@ -14,6 +14,7 @@
|
||||
#include <components/esm4/loadingr.hpp>
|
||||
#include <components/esm4/loadligh.hpp>
|
||||
#include <components/esm4/loadmisc.hpp>
|
||||
#include <components/esm4/loadmstt.hpp>
|
||||
#include <components/esm4/loadnpc.hpp>
|
||||
#include <components/esm4/loadstat.hpp>
|
||||
#include <components/esm4/loadterm.hpp>
|
||||
@ -85,6 +86,7 @@ namespace MWClass
|
||||
ESM4Named<ESM4::Ingredient>::registerSelf();
|
||||
ESM4Light::registerSelf();
|
||||
ESM4Named<ESM4::MiscItem>::registerSelf();
|
||||
ESM4Named<ESM4::MovableStatic>::registerSelf();
|
||||
ESM4Npc::registerSelf();
|
||||
ESM4Named<ESM4::Potion>::registerSelf();
|
||||
ESM4Static::registerSelf();
|
||||
|
@ -138,17 +138,17 @@ namespace MWClass
|
||||
{
|
||||
}
|
||||
|
||||
bool hasToolTip(const MWWorld::ConstPtr& ptr) const override { return true; }
|
||||
|
||||
MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr& ptr, int count) const override
|
||||
{
|
||||
return ESM4Impl::getToolTipInfo(ptr.get<Record>()->mBase->mFullName, count);
|
||||
}
|
||||
|
||||
std::string_view getName(const MWWorld::ConstPtr& ptr) const override
|
||||
{
|
||||
return ptr.get<Record>()->mBase->mFullName;
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo getToolTipInfo(const MWWorld::ConstPtr& ptr, int count) const override
|
||||
{
|
||||
return ESM4Impl::getToolTipInfo(getName(ptr), count);
|
||||
}
|
||||
|
||||
bool hasToolTip(const MWWorld::ConstPtr& ptr) const override { return !getName(ptr).empty(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <components/esm4/loadingr.hpp>
|
||||
#include <components/esm4/loadligh.hpp>
|
||||
#include <components/esm4/loadmisc.hpp>
|
||||
#include <components/esm4/loadmstt.hpp>
|
||||
#include <components/esm4/loadrefr.hpp>
|
||||
#include <components/esm4/loadstat.hpp>
|
||||
#include <components/esm4/loadtree.hpp>
|
||||
@ -240,6 +241,9 @@ namespace MWLua
|
||||
case ESM::REC_MISC4:
|
||||
cell.mStore->template forEachType<ESM4::MiscItem>(visitor);
|
||||
break;
|
||||
case ESM::REC_MSTT4:
|
||||
cell.mStore->template forEachType<ESM4::MovableStatic>(visitor);
|
||||
break;
|
||||
case ESM::REC_ALCH4:
|
||||
cell.mStore->template forEachType<ESM4::Potion>(visitor);
|
||||
break;
|
||||
|
@ -47,6 +47,7 @@ namespace MWLua
|
||||
constexpr std::string_view ESM4Ingredient = "ESM4Ingredient";
|
||||
constexpr std::string_view ESM4Light = "ESM4Light";
|
||||
constexpr std::string_view ESM4MiscItem = "ESM4Miscellaneous";
|
||||
constexpr std::string_view ESM4MovableStatic = "ESM4MovableStatic";
|
||||
constexpr std::string_view ESM4Potion = "ESM4Potion";
|
||||
constexpr std::string_view ESM4Static = "ESM4Static";
|
||||
constexpr std::string_view ESM4Terminal = "ESM4Terminal";
|
||||
@ -91,6 +92,7 @@ namespace MWLua
|
||||
{ ESM::REC_INGR4, ObjectTypeName::ESM4Ingredient },
|
||||
{ ESM::REC_LIGH4, ObjectTypeName::ESM4Light },
|
||||
{ ESM::REC_MISC4, ObjectTypeName::ESM4MiscItem },
|
||||
{ ESM::REC_MSTT4, ObjectTypeName::ESM4MovableStatic },
|
||||
{ ESM::REC_ALCH4, ObjectTypeName::ESM4Potion },
|
||||
{ ESM::REC_STAT4, ObjectTypeName::ESM4Static },
|
||||
{ ESM::REC_TERM4, ObjectTypeName::ESM4Terminal },
|
||||
@ -230,6 +232,7 @@ namespace MWLua
|
||||
addType(ObjectTypeName::ESM4Ingredient, { ESM::REC_INGR4 });
|
||||
addType(ObjectTypeName::ESM4Light, { ESM::REC_LIGH4 });
|
||||
addType(ObjectTypeName::ESM4MiscItem, { ESM::REC_MISC4 });
|
||||
addType(ObjectTypeName::ESM4MovableStatic, { ESM::REC_MSTT4 });
|
||||
addType(ObjectTypeName::ESM4Potion, { ESM::REC_ALCH4 });
|
||||
addType(ObjectTypeName::ESM4Static, { ESM::REC_STAT4 });
|
||||
addESM4TerminalBindings(addType(ObjectTypeName::ESM4Terminal, { ESM::REC_TERM4 }), context);
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include <components/esm4/loadingr.hpp>
|
||||
#include <components/esm4/loadligh.hpp>
|
||||
#include <components/esm4/loadmisc.hpp>
|
||||
#include <components/esm4/loadmstt.hpp>
|
||||
#include <components/esm4/loadnpc.hpp>
|
||||
#include <components/esm4/loadrefr.hpp>
|
||||
#include <components/esm4/loadstat.hpp>
|
||||
|
@ -73,6 +73,7 @@ namespace ESM4
|
||||
struct Flora;
|
||||
struct Ingredient;
|
||||
struct MiscItem;
|
||||
struct MovableStatic;
|
||||
struct Terminal;
|
||||
struct Tree;
|
||||
struct Weapon;
|
||||
@ -95,8 +96,9 @@ namespace MWWorld
|
||||
CellRefList<ESM4::Static>, CellRefList<ESM4::Light>, CellRefList<ESM4::Activator>, CellRefList<ESM4::Potion>,
|
||||
CellRefList<ESM4::Ammunition>, CellRefList<ESM4::Armor>, CellRefList<ESM4::Book>, CellRefList<ESM4::Clothing>,
|
||||
CellRefList<ESM4::Container>, CellRefList<ESM4::Door>, CellRefList<ESM4::Flora>, CellRefList<ESM4::Ingredient>,
|
||||
CellRefList<ESM4::Terminal>, CellRefList<ESM4::Tree>, CellRefList<ESM4::MiscItem>, CellRefList<ESM4::Weapon>,
|
||||
CellRefList<ESM4::Furniture>, CellRefList<ESM4::Creature>, CellRefList<ESM4::Npc>>;
|
||||
CellRefList<ESM4::Terminal>, CellRefList<ESM4::Tree>, CellRefList<ESM4::MiscItem>,
|
||||
CellRefList<ESM4::MovableStatic>, CellRefList<ESM4::Weapon>, CellRefList<ESM4::Furniture>,
|
||||
CellRefList<ESM4::Creature>, CellRefList<ESM4::Npc>>;
|
||||
|
||||
/// \brief Mutable state of a cell
|
||||
class CellStore
|
||||
|
@ -301,6 +301,7 @@ namespace MWWorld
|
||||
case ESM::REC_LVLC4:
|
||||
case ESM::REC_LVLN4:
|
||||
case ESM::REC_MISC4:
|
||||
case ESM::REC_MSTT4:
|
||||
case ESM::REC_NPC_4:
|
||||
case ESM::REC_STAT4:
|
||||
case ESM::REC_TERM4:
|
||||
|
@ -92,11 +92,13 @@ namespace ESM4
|
||||
struct HeadPart;
|
||||
struct Ingredient;
|
||||
struct Land;
|
||||
struct LandTexture;
|
||||
struct LevelledCreature;
|
||||
struct LevelledItem;
|
||||
struct LevelledNpc;
|
||||
struct Light;
|
||||
struct MiscItem;
|
||||
struct MovableStatic;
|
||||
struct Npc;
|
||||
struct Outfit;
|
||||
struct Potion;
|
||||
@ -139,10 +141,10 @@ namespace MWWorld
|
||||
Store<ESM4::Armor>, Store<ESM4::ArmorAddon>, Store<ESM4::Book>, Store<ESM4::Cell>, Store<ESM4::Clothing>,
|
||||
Store<ESM4::Container>, Store<ESM4::Creature>, Store<ESM4::Door>, Store<ESM4::Furniture>,
|
||||
Store<ESM4::Flora>, Store<ESM4::Hair>, Store<ESM4::HeadPart>, Store<ESM4::Ingredient>, Store<ESM4::Land>,
|
||||
Store<ESM4::LevelledCreature>, Store<ESM4::LevelledItem>, Store<ESM4::LevelledNpc>, Store<ESM4::Light>,
|
||||
Store<ESM4::MiscItem>, Store<ESM4::Npc>, Store<ESM4::Outfit>, Store<ESM4::Potion>, Store<ESM4::Race>,
|
||||
Store<ESM4::Reference>, Store<ESM4::Static>, Store<ESM4::Terminal>, Store<ESM4::Tree>, Store<ESM4::Weapon>,
|
||||
Store<ESM4::World>>;
|
||||
Store<ESM4::LandTexture>, Store<ESM4::LevelledCreature>, Store<ESM4::LevelledItem>,
|
||||
Store<ESM4::LevelledNpc>, Store<ESM4::Light>, Store<ESM4::MiscItem>, Store<ESM4::MovableStatic>,
|
||||
Store<ESM4::Npc>, Store<ESM4::Outfit>, Store<ESM4::Potion>, Store<ESM4::Race>, Store<ESM4::Reference>,
|
||||
Store<ESM4::Static>, Store<ESM4::Terminal>, Store<ESM4::Tree>, Store<ESM4::Weapon>, Store<ESM4::World>>;
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
|
@ -1363,11 +1363,13 @@ template class MWWorld::TypedDynamicStore<ESM4::Hair>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::HeadPart>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::Ingredient>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::Land>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::LandTexture>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::LevelledCreature>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::LevelledItem>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::LevelledNpc>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::Light>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::MiscItem>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::MovableStatic>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::Npc>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::Outfit>;
|
||||
template class MWWorld::TypedDynamicStore<ESM4::Potion>;
|
||||
|
@ -62,10 +62,12 @@
|
||||
#include <components/esm4/loadingr.hpp>
|
||||
#include <components/esm4/loadland.hpp>
|
||||
#include <components/esm4/loadligh.hpp>
|
||||
#include <components/esm4/loadltex.hpp>
|
||||
#include <components/esm4/loadlvlc.hpp>
|
||||
#include <components/esm4/loadlvli.hpp>
|
||||
#include <components/esm4/loadlvln.hpp>
|
||||
#include <components/esm4/loadmisc.hpp>
|
||||
#include <components/esm4/loadmstt.hpp>
|
||||
#include <components/esm4/loadnpc.hpp>
|
||||
#include <components/esm4/loadotft.hpp>
|
||||
#include <components/esm4/loadrace.hpp>
|
||||
|
@ -1881,6 +1881,9 @@
|
||||
--- Functions for @{#ESM4Miscellaneous} objects
|
||||
-- @field [parent=#types] #ESM4Miscellaneous ESM4Miscellaneous
|
||||
|
||||
--- Functions for @{#ESM4MovableStatic} objects
|
||||
-- @field [parent=#types] #ESM4MovableStatic ESM4MovableStatic
|
||||
|
||||
--- Functions for @{#ESM4Potion} objects
|
||||
-- @field [parent=#types] #ESM4Potion ESM4Potion
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user