mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-08 03:41:11 -04:00
Fix more things
This commit is contained in:
parent
a7f614dd54
commit
c5684a4204
@ -6,20 +6,6 @@
|
|||||||
#include <components/lua/luastate.hpp>
|
#include <components/lua/luastate.hpp>
|
||||||
#include <components/misc/color.hpp>
|
#include <components/misc/color.hpp>
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
struct RegionSoundRef
|
|
||||||
{
|
|
||||||
ESM::RefId mSoundId;
|
|
||||||
uint8_t mChance;
|
|
||||||
|
|
||||||
RegionSoundRef(const ESM::Region::SoundRef& ref)
|
|
||||||
: mSoundId(ref.mSound)
|
|
||||||
, mChance(ref.mChance)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace sol
|
namespace sol
|
||||||
{
|
{
|
||||||
@ -53,9 +39,6 @@ namespace MWLua
|
|||||||
= sol::readonly_property([](const ESM::Region::SoundRef& ref) { return ref.mSound.serializeText(); });
|
= sol::readonly_property([](const ESM::Region::SoundRef& ref) { return ref.mSound.serializeText(); });
|
||||||
|
|
||||||
soundRefT["chance"] = sol::readonly_property([](const ESM::Region::SoundRef& ref) { return ref.mChance; });
|
soundRefT["chance"] = sol::readonly_property([](const ESM::Region::SoundRef& ref) { return ref.mChance; });
|
||||||
soundRefT["sound"] = sol::readonly_property([](const ESM::Region::SoundRef& ref) -> const ESM::Sound* {
|
|
||||||
return MWBase::Environment::get().getESMStore()->get<ESM::Sound>().find(ref.mSound);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Region record
|
// Region record
|
||||||
auto regionT = lua.new_usertype<ESM::Region>("ESM3_Region");
|
auto regionT = lua.new_usertype<ESM::Region>("ESM3_Region");
|
||||||
|
@ -1186,7 +1186,7 @@
|
|||||||
-- Region sound reference
|
-- Region sound reference
|
||||||
-- @type RegionSoundRef
|
-- @type RegionSoundRef
|
||||||
-- @field #string soundId Sound record ID
|
-- @field #string soundId Sound record ID
|
||||||
-- @field #number chance Probability (0–100) that this sound plays periodically in the region
|
-- @field #number chance Probability that this sound plays periodically in the region
|
||||||
-- @field #Sound sound The full sound record referenced by `soundId`, or `nil` if not found
|
-- @field #Sound sound The full sound record referenced by `soundId`, or `nil` if not found
|
||||||
|
|
||||||
--- @{#Factions}: Factions
|
--- @{#Factions}: Factions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user