Merge branch 'you-were-supposed-to-tell-me-about-this' into 'master'

CLEANUP: Document addTopic

See merge request OpenMW/openmw!4923
This commit is contained in:
Alexei Kotov 2025-09-15 22:54:43 +03:00
commit 2ea14570c8

View File

@ -1224,6 +1224,16 @@
-- @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 it can be used in dialogue with actors who can talk about that topic.
-- @function [parent=#PLAYER] addTopic
-- @param openmw.core#GameObject player
-- @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.