added pledged flag and notes on how to set

This commit is contained in:
Gareth Harper 2024-12-03 15:39:56 +00:00
parent a4475a7177
commit 541fb3000f
3 changed files with 22 additions and 0 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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,