Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pledged flag and notes on how to set #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/Developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions schemas/journal-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions schemas/journal-v1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Whether the sending Cmdr is pledged to a Power" would be more accurate here.

},
"StarSystem": {
"type" : "string",
"minLength" : 1,
Expand Down