From ff865e8841ab4f327153d9d75475b04fdb1fc9c3 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Sun, 14 Sep 2025 14:38:05 -0500 Subject: [PATCH] CLEANUP: Document addTopic --- files/lua_api/openmw/types.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/lua_api/openmw/types.lua b/files/lua_api/openmw/types.lua index add678a37f..8be13dee60 100644 --- a/files/lua_api/openmw/types.lua +++ b/files/lua_api/openmw/types.lua @@ -1224,6 +1224,14 @@ -- @usage -- Start a new quest, add it to the player's quest list but don't add any journal entries -- types.Player.quests(player)["ms_fargothring"].stage = 0 +-- Adds a topic to the list of ones known by the player, so that is can be used in dialogues +-- @function [parent=#PLAYER] addTopic +-- @param string topicId +-- @usage -- Add topic to the list of known ones, in a player script +-- self.type.addTopic(self, "Some Work") +-- @usage -- Give all players in the current world a specific topic, in a global script +-- for _, player in ipairs(world.players) do player.type.addTopic(player, "Some Unrelated Work") end + --- -- Returns @{#PlayerJournal}, which contains the read-only access to journal text data accumulated by the player. -- Not the same as @{openmw_core#Dialogue.journal} which holds raw game records: with placeholders for dynamic variables and no player-specific info.