1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-03 00:41:32 +03:00

PLUGINS.md: Document dual-type of Suits, and helper functions.

This commit is contained in:
Athanasius 2021-04-19 12:30:24 +01:00
parent 6f6ace9856
commit eb04673751

View File

@ -537,10 +537,17 @@ Content of `state` (updated to the current journal entry):
| `Data` | `dict` | 'Data' MicroResources in Odyssey, `int` count each. |
| `BackPack` | `dict` | `dict` of Odyssey MicroResources in backpack. |
| `SuitCurrent` | `dict` | CAPI-returned data of currently worn suit. NB: May be `None` if no data. |
| `Suits` | `dict` | CAPI-returned data of owned suits. NB: May be `None` if no data. |
| `Suits` | `dict` or `list`[1] | CAPI-returned data of owned suits. NB: Type depends on if array is sparse or not. May be `None` if no data. |
| `SuitLoadoutCurrent` | `dict` | CAPI-returned data of current Suit Loadout. NB: May be `None` if no data. |
| `SuitLoadouts` | `dict` | CAPI-returned data of all Suit Loadouts. NB: May be `None` if no data. |
[1] - With `Suits` there's a caveat depending on all the slots from 0 are
contiguously used or not. If they are then the type is `list` and
indexing is purely numeric. If not then it's a `dict` and you need to index it
with a string. There is `companion.index_possibly_sparse_list()` to aid
with this, or if you wish to iterate over it use `companion.listify()` to
fill in any gaps and have a `list` to operate on.
New in version 4.1.6:
`CargoJSON` contains the raw data from the last read of `Cargo.json` passed