From 937aaccec4cc9efb9a70d6a6cb32dad4db9ac813 Mon Sep 17 00:00:00 2001
From: Athanasius <github@miggy.org>
Date: Thu, 10 Jun 2021 14:20:27 +0100
Subject: [PATCH] ShipLockerJSON: Ensure initialised, and document it.

---
 PLUGINS.md | 6 ++++++
 monitor.py | 1 +
 2 files changed, 7 insertions(+)

diff --git a/PLUGINS.md b/PLUGINS.md
index a5f39edd..e7bab342 100644
--- a/PLUGINS.md
+++ b/PLUGINS.md
@@ -603,6 +603,7 @@ 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.                                                                   |
 | `BackpackJSON`       |           `dict`            | Content of Backpack.json as of last read.                                                                       |
+| `ShipLockerJSON`     |           `dict`            | Content of ShipLocker.json as of last read.                                                                      |
 | `SuitCurrent`        |           `dict`            | CAPI-returned data of currently worn suit.  NB: May be `None` if no data.                                       |
 | `Suits`              |          `dict`[1]          | CAPI-returned data of owned suits.  NB: May be `None` if no data.                                               |
 | `SuitLoadoutCurrent` |           `dict`            | CAPI-returned data of current Suit Loadout.  NB: May be `None` if no data.                                      |
@@ -672,6 +673,11 @@ New in version 5.1.0:
 
 `state` entries added for Taxi, Dropship, Body and BodyType.
 
+New in version 5.1.1:
+
+`state` now has a `ShipLockerJSON` member containing the un-changed, loaded,
+JSON from the `ShipLockerJSON.json` file.
+
 ##### Synthetic Events
 
 A special "StartUp" entry is sent if EDMC is started while the game is already
diff --git a/monitor.py b/monitor.py
index 278ba01e..c69b4996 100644
--- a/monitor.py
+++ b/monitor.py
@@ -157,6 +157,7 @@ class EDLogs(FileSystemEventHandler):  # type: ignore # See below
                 'Data':           defaultdict(int),  # Backpack Data
             },
             'BackpackJSON':       None,  # Raw JSON from `Backpack.json` file, if available
+            'ShipLockerJSON':     None,  # Raw JSON from the `ShipLocker.json` file, if available
             'SuitCurrent':        None,
             'Suits':              {},
             'SuitLoadoutCurrent': None,