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:
parent
9001ed1e2f
commit
0e03b9bd32
@ -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> {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user