Adjust documentation and bump API revision

This commit is contained in:
Evil Eye 2025-08-14 14:01:15 +02:00
parent 111d6620a6
commit 450f907166
3 changed files with 5 additions and 5 deletions

View File

@ -82,7 +82,7 @@ message(STATUS "Configuring OpenMW...")
set(OPENMW_VERSION_MAJOR 0)
set(OPENMW_VERSION_MINOR 50)
set(OPENMW_VERSION_RELEASE 0)
set(OPENMW_LUA_API_REVISION 91)
set(OPENMW_LUA_API_REVISION 92)
set(OPENMW_POSTPROCESSING_API_REVISION 3)
set(OPENMW_VERSION_COMMITHASH "")

View File

@ -55,7 +55,7 @@ namespace MWLua
const MWWorld::Weather* weather = MWBase::Environment::get().getWorld()->getWeather(i);
res[weather->mId.serializeText()] = rec.mData.mProbabilities[i];
}
return res;
return LuaUtil::makeReadOnly(res);
});
regionT["sounds"] = sol::readonly_property([lua = lua.lua_state()](const ESM::Region& rec) {
sol::table res(lua, sol::create);

View File

@ -1172,13 +1172,13 @@
-- @type RegionRecord
-- @field #string id Region ID
-- @field #string name Region display name
-- @field openmw.util#Color mapColor Map color for this region.
-- @field openmw.util#Color mapColor Editor map color for this region.
-- @field #string sleepList A leveled creature list used when sleeping outdoors in this region
-- @field #list<#RegionSoundRef> sounds A read-only list of ambient sound references for this region.
-- Each reference includes a chance and a resolved link to the full sound record.
-- @field #table weatherProbabilities A table mapping weather ids to their probability (0100), should sum to 100.
-- @field #table weatherProbabilities A table mapping @{#WeatherRecord.recordId}s to their probability (0100), should sum to 100.
-- Valid weather ids include:
-- `"clear"`, `"cloudy"`, `"foggy"`, `"overcast"`, `"rain"`, `"thunder"`, `"ash"`, `"blight"`, `"snow"`, `"blizzard"`
-- `"clear"`, `"cloudy"`, `"foggy"`, `"overcast"`, `"rain"`, `"thunderstorm"`, `"ashstorm"`, `"blight"`, `"snow"`, `"blizzard"`
-- @usage print(region.weatherProbabilities["rain"])
---