Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/doc/lua/player.md
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-06-03 09:31:18 +1000
committerGitHub <noreply@github.com>2025-06-03 09:31:18 +1000
commitd575ca382bc9803f4d8711a11043897449cf3146 (patch)
treea7895951f4687093952f7a30f0bbdc92818947a9 /doc/lua/player.md
parent4048e211c50af86dc278f13b1b2eb2a9ec00b7bf (diff)
parent844f76fd55eaa932b6654218d46d0dffdc6db413 (diff)
Merge pull request #257 from Emmaker/main
Add codex binds to player table [skip ci]
Diffstat (limited to 'doc/lua/player.md')
-rw-r--r--doc/lua/player.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/lua/player.md b/doc/lua/player.md
index fd8ebd4..f5908ee 100644
--- a/doc/lua/player.md
+++ b/doc/lua/player.md
@@ -527,3 +527,39 @@ Returns uuid, type, and orbits for all system objects in the specified system;
#### `List<String>` player.collectables(`String` collectionName)
Returns a list of names of the collectables the player has unlocked in the specified collection.
+
+---
+
+#### `bool` player.isCodexKnown(`String` codexId)
+
+Returns `true` if the player knows the specified codexId, and `false` otherwise.
+
+---
+
+#### `bool` player.isCodexRead(`String` codexId)
+
+Returns `true` if the player has read the specified codexId, and `false` otherwise.
+
+---
+
+#### `bool` player.markCodexRead(`String` codexId)
+
+Marks the specified codexId as read by the player. Returns `true` if the codex is known by the player and was marked as unread and `false` otherwise.
+
+---
+
+#### `bool` player.markCodexUnread(`String` codexId)
+
+Marks the specified codexId as not read by the player. Returns `true` if the codex is known by the player and was marked as read and `false` otherwise.
+
+---
+
+#### `void` player.learnCodex(`String` codexId, [`bool` markRead])
+
+Make the player learn the specified codexId. If markRead is `true`, then the codex will be marked as read by default.
+
+---
+
+#### `Json` player.getCodexes()
+
+Returns a JSON object where the keys are the codex ID, and the values are if the codex is marked as read. \ No newline at end of file