mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Merge branch 'enderal' into 'master'
Load Enderal See merge request OpenMW/openmw!3241
This commit is contained in:
commit
5496608890
@ -97,6 +97,11 @@ namespace EsmTool
|
||||
return stream << " ?";
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& stream, const std::monostate&)
|
||||
{
|
||||
return stream << "[none]";
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& stream, const WriteData<ESM4::GameSetting::Data>& write)
|
||||
{
|
||||
std::visit([&](const auto& v) { stream << v; }, write.mValue);
|
||||
|
@ -13,7 +13,10 @@ namespace ESM4
|
||||
GameSetting::Data readData(FormId formId, std::string_view editorId, Reader& reader)
|
||||
{
|
||||
if (editorId.empty())
|
||||
throw std::runtime_error("Unknown ESM4 GMST (" + formId.toString() + ") data type: editor id is empty");
|
||||
{
|
||||
reader.skipSubRecordData();
|
||||
return std::monostate{};
|
||||
}
|
||||
const char type = editorId[0];
|
||||
switch (type)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace ESM4
|
||||
|
||||
struct GameSetting
|
||||
{
|
||||
using Data = std::variant<bool, float, std::int32_t, std::string>;
|
||||
using Data = std::variant<std::monostate, bool, float, std::int32_t, std::string>;
|
||||
|
||||
FormId mFormId; // from the header
|
||||
std::uint32_t mFlags; // from the header, see enum type RecordFlag for details
|
||||
|
@ -76,7 +76,12 @@ void ESM4::IdleMarker::load(ESM4::Reader& reader)
|
||||
reader.getFormId(value);
|
||||
break;
|
||||
}
|
||||
case ESM4::SUB_MODL:
|
||||
reader.getZString(mModel);
|
||||
break;
|
||||
case ESM4::SUB_OBND: // object bounds
|
||||
case ESM4::SUB_MODT:
|
||||
case ESM4::SUB_MODS:
|
||||
reader.skipSubRecordData();
|
||||
break;
|
||||
default:
|
||||
|
@ -102,6 +102,12 @@ void ESM4::Light::load(ESM4::Reader& reader)
|
||||
case ESM4::SUB_MODT:
|
||||
case ESM4::SUB_OBND:
|
||||
case ESM4::SUB_VMAD: // Dragonborn only?
|
||||
case ESM4::SUB_DEST: // Destruction data start
|
||||
case ESM4::SUB_DSTD:
|
||||
case ESM4::SUB_DMDL:
|
||||
case ESM4::SUB_DMDT:
|
||||
case ESM4::SUB_DMDS:
|
||||
case ESM4::SUB_DSTF: // Destruction data end
|
||||
reader.skipSubRecordData();
|
||||
break;
|
||||
default:
|
||||
|
@ -78,6 +78,12 @@ void ESM4::MiscItem::load(ESM4::Reader& reader)
|
||||
case ESM4::SUB_OBND:
|
||||
case ESM4::SUB_VMAD:
|
||||
case ESM4::SUB_RNAM: // FONV
|
||||
case ESM4::SUB_DEST: // Destruction data start
|
||||
case ESM4::SUB_DSTD:
|
||||
case ESM4::SUB_DMDL:
|
||||
case ESM4::SUB_DMDT:
|
||||
case ESM4::SUB_DMDS:
|
||||
case ESM4::SUB_DSTF: // Destruction data end
|
||||
reader.skipSubRecordData();
|
||||
break;
|
||||
default:
|
||||
|
@ -58,6 +58,12 @@ void ESM4::Scroll::load(ESM4::Reader& reader)
|
||||
case ESM4::SUB_MODL:
|
||||
reader.getZString(mModel);
|
||||
break;
|
||||
case ESM4::SUB_YNAM:
|
||||
reader.getFormId(mPickUpSound);
|
||||
break;
|
||||
case ESM4::SUB_ZNAM:
|
||||
reader.getFormId(mDropSound);
|
||||
break;
|
||||
// case ESM4::SUB_MODB: reader.get(mBoundRadius); break;
|
||||
case ESM4::SUB_OBND:
|
||||
case ESM4::SUB_CTDA:
|
||||
|
@ -53,6 +53,9 @@ namespace ESM4
|
||||
std::string mModel;
|
||||
std::string mText;
|
||||
|
||||
FormId mPickUpSound;
|
||||
FormId mDropSound;
|
||||
|
||||
Data mData;
|
||||
|
||||
void load(ESM4::Reader& reader);
|
||||
|
@ -70,6 +70,8 @@ void ESM4::TalkingActivator::load(ESM4::Reader& reader)
|
||||
case ESM4::SUB_PNAM:
|
||||
case ESM4::SUB_MODT: // texture file hash?
|
||||
case ESM4::SUB_OBND:
|
||||
case ESM4::SUB_VMAD:
|
||||
case ESM4::SUB_MODS:
|
||||
reader.skipSubRecordData();
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user