1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 18:09:40 +00:00

Interpret ESM::Light::mSound as identifier not a path

This commit is contained in:
elsid 2023-03-24 12:50:49 +01:00
parent 5446906b30
commit 017f3d5484
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -41,9 +41,8 @@ namespace MWLua
record["icon"] = sol::readonly_property([vfs](const ESM::Light& rec) -> std::string {
return Misc::ResourceHelpers::correctIconPath(rec.mIcon, vfs);
});
record["sound"] = sol::readonly_property([vfs](const ESM::Light& rec) -> std::string {
return Misc::ResourceHelpers::correctSoundPath(rec.mSound.getRefIdString(), vfs);
});
record["sound"]
= sol::readonly_property([](const ESM::Light& rec) -> std::string { return rec.mSound.getRefIdString(); });
record["mwscript"]
= sol::readonly_property([](const ESM::Light& rec) -> std::string { return rec.mScript.getRefIdString(); });
record["weight"] = sol::readonly_property([](const ESM::Light& rec) -> float { return rec.mData.mWeight; });