diff --git a/apps/openmw/mwlua/dialoguebindings.cpp b/apps/openmw/mwlua/dialoguebindings.cpp index 42a1a0b4b0..e126bf0e82 100644 --- a/apps/openmw/mwlua/dialoguebindings.cpp +++ b/apps/openmw/mwlua/dialoguebindings.cpp @@ -320,12 +320,12 @@ namespace return rec.mData.mDisposition; }); recordInfoBindingsClass["filterActorGender"] - = sol::readonly_property([](const ESM::DialInfo& rec) -> sol::optional { + = sol::readonly_property([](const ESM::DialInfo& rec) -> sol::optional { if (rec.mData.mType == ESM::Dialogue::Type::Journal || rec.mData.mGender == -1) { return sol::nullopt; } - return rec.mData.mGender; + return sol::optional(rec.mData.mGender == 0 ? "male" : "female"); }); recordInfoBindingsClass["filterPlayerFaction"] = sol::readonly_property([](const ESM::DialInfo& rec) -> sol::optional { diff --git a/files/lua_api/openmw/core.lua b/files/lua_api/openmw/core.lua index 5fc820dedf..1d28125cd4 100644 --- a/files/lua_api/openmw/core.lua +++ b/files/lua_api/openmw/core.lua @@ -1087,9 +1087,9 @@ -- @field [parent=#DialogueRecordInfo] #number filterActorDisposition --- --- Speaker gender allowing for this info entry to appear: 1 if female, 0 if male. +-- Speaker gender allowing for this info entry to appear: "male" or "female". -- Always nil for journal records. Otherwise the nil value represents no conditions, i.e. no filtering applied using these criteria. --- @field [parent=#DialogueRecordInfo] #number filterActorGender +-- @field [parent=#DialogueRecordInfo] #string filterActorGender --- -- Faction of which the player must be a member for this info entry to appear.