SimTX API v24/Packets/CatalogEntry
Appearance
| Packet ID | 25(0x19)
|
|---|---|
| Direction | Server → client |
| Session | Control (catalog) |
| Body size | Variable |
| Permission | None |
| Answers | CatalogFetch |
CatalogEntry returns the files of one catalog entry requested with CatalogFetch.
Layout[edit | edit source]
| Field | Type | Description |
|---|---|---|
packetId |
u8 |
Always 25.
|
entryId |
i32 |
The requested ID. |
found |
bool |
False if no entry has that ID. The remaining fields are then empty. |
kind |
UTF |
extension or preset; empty if not found.
|
name |
UTF |
Entry name; empty if not found. |
revision |
i32 |
Revision number; 0 if not found. |
fileCount |
i32 |
Number of files, at most 1,000. |
files |
fileCount × { UTF path, UTF content } |
Relative path and full text of each file. |
Usage[edit | edit source]
- For an extension, the files form a package as described in Lua extension manifest. Install it by writing each file to its path below an extension directory.
- For a preset, there is exactly one
.stxpresetfile. - File contents are text. Each is at most 60,000 bytes of UTF-8, which fits the
UTFencoding.