1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 12:20:41 +00:00

ESM::Dialogue Lua bindings: filterActorGender returns string

This commit is contained in:
trav5 2024-05-01 13:05:35 +02:00
parent 9001ed1e2f
commit 0e03b9bd32
2 changed files with 4 additions and 4 deletions

View File

@ -320,12 +320,12 @@ namespace
return rec.mData.mDisposition;
});
recordInfoBindingsClass["filterActorGender"]
= sol::readonly_property([](const ESM::DialInfo& rec) -> sol::optional<int> {
= sol::readonly_property([](const ESM::DialInfo& rec) -> sol::optional<std::string_view> {
if (rec.mData.mType == ESM::Dialogue::Type::Journal || rec.mData.mGender == -1)
{
return sol::nullopt;
}
return rec.mData.mGender;
return sol::optional<std::string_view>(rec.mData.mGender == 0 ? "male" : "female");
});
recordInfoBindingsClass["filterPlayerFaction"]
= sol::readonly_property([](const ESM::DialInfo& rec) -> sol::optional<std::string> {

View File

@ -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.