From 541fb3000fd80e36c1d704bf2db98f0a07663331 Mon Sep 17 00:00:00 2001 From: Gareth Harper Date: Tue, 3 Dec 2024 15:39:56 +0000 Subject: [PATCH] added pledged flag and notes on how to set --- docs/Developers.md | 14 ++++++++++++++ schemas/journal-README.md | 4 ++++ schemas/journal-v1.0.json | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/docs/Developers.md b/docs/Developers.md index 9a35316..3926930 100644 --- a/docs/Developers.md +++ b/docs/Developers.md @@ -460,6 +460,20 @@ and use any mismatch with respect to what they already know to make a decision whether to trust the augmented data. Flagging it for manual review is probably wise. +#### `pledged` flag + +Where the schema allows for it, the `pledged` key should be added with an +appropriate boolean value. `null` is not allowed in the values, if you +cannot determine a true/false value do not include that key at all. + +In order to determine the value + +1. Initially you should have the value unset +2. Whenever you encounter a `LoadGame` event you should unset the value +3. Whenever you encounter a `PowerPlay` event you should set the value to `true` +4. Whenever you encounter a `PowerPlayLeave` event you should set the value to `false` +5. Whenever you encounter a `PowerPlayJoin` event you should set the value to `true` + ### Server responses There are three possible sources of HTTP responses when sending an upload to EDDN. diff --git a/schemas/journal-README.md b/schemas/journal-README.md index a59865b..97f28bf 100644 --- a/schemas/journal-README.md +++ b/schemas/journal-README.md @@ -79,6 +79,10 @@ You **MUST** add this key/value pair, using the value from the `LoadGame` event. Note caveats in [docs/Developers.md](../docs/Developers.md). +#### pledged flag +You should add this key/value pair, using the value determined via the notes +in [docs/Developers.md](../docs/Developers.md). + #### StarSystem If not already present, you MUST add a `StarSystem` string containing the name of the system from the last `FSDJump`, `CarrierJump`, or `Location` event. diff --git a/schemas/journal-v1.0.json b/schemas/journal-v1.0.json index eb7737b..03e3bf6 100644 --- a/schemas/journal-v1.0.json +++ b/schemas/journal-v1.0.json @@ -58,6 +58,10 @@ "type" : "boolean", "description" : "Whether the sending Cmdr has an Odyssey expansion." }, + "pledged": { + "type" : "boolean", + "description" : "Whether the sending Cmdr is pledged to a superpower." + }, "StarSystem": { "type" : "string", "minLength" : 1,