1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 01:00:42 +03:00

316 Commits

Author SHA1 Message Date
A_D
2f684a91e3
removed monitor.planet use 2021-06-02 11:57:28 +02:00
A_D
a7a9de77d7
Added rudimentry taxi status tracking 2021-05-31 12:58:20 +02:00
A_D
6a1a2673ec
Update MicroResource tracking for 4.0.0.200
This updates our TransferMicroResources handler with the changes from
v4.0.0.200, and BackPack handler to also handle Backpack as the event
name.

Additionally Fixed various events
  (CollectItems, DropItems, TransferMicroResources)
  doubling up BackpackChange work, thus causing offset counts.

Fixes #1115
2021-05-27 12:51:43 +02:00
Athanasius
a3598a1c40 Suits: The symbol -> name code is a WORKAROUND 2021-05-27 11:31:06 +01:00
Athanasius
d982fc44af
Merge pull request #1112 from EDCD/fix/1111/engineerprogress-with-one-engineer
EngineerProgress: Progress can be for a single engineer, no array
2021-05-27 11:26:19 +01:00
Athanasius
6f100a3ebf EngineerProgress: Duh, we already checked for the array, this is the array-less form
This was never properly edited after copy/paste from the "we have an
array" form.
2021-05-26 16:17:20 +01:00
Athanasius
af5ffabd30 EngineerProgress: Cope with no Rank/RankProgress in 'single engineer' form
Yes, this isn't DRY, if we do the check a third time I'll pull it out
into a helper function.
2021-05-26 16:10:36 +01:00
Athanasius
c3b87df1b0 EngineerProgress: Progress can be for a single engineer, no array
This tweak means we'll look in the event itself instead, but still won't
cope with missing expected keys.  That's up next....
2021-05-26 16:07:34 +01:00
Athanasius
20f373a37d Suits: Localise out suit symbol name -> display name (stage1) lookup
We'll need to localise the following 'shortname' lookup as well.
2021-05-25 18:27:10 +01:00
Athanasius
bac718aeff Store Fileheader language, gameversion and build in monitor.state 2021-05-25 17:56:11 +01:00
Athanasius
e9e5352e37 Suits: Set edmcName in BuySuit handling 2021-05-25 16:30:23 +01:00
Athanasius
43a7974da5 Suits: Make suit name regex's case-insensitive (and tweak a comment) 2021-05-25 16:05:34 +01:00
Athanasius
dba3fba8e3 Suits: Fully implement mapping to sane (English only for now) names 2021-05-25 15:24:21 +01:00
Athanasius
f85213b318 Suits: Initial stab at grabbing a usable name out of a $symbol; version 2021-05-25 14:52:43 +01:00
Athanasius
48c852ec1d Suits: Code scaffolding for sanitising suit names 2021-05-25 14:45:18 +01:00
Athanasius
68a0e6c7af Test for if suit is None rather than a boolean test.
This matches the explicit default in the .get()
2021-05-25 14:31:27 +01:00
Athanasius
00469384b4 Suits: Keep using CAPI-source Suit name if we have it.
* We were referring to *suit* 'slot id', when that's only for the
  loadouts.  For suits we have a full id, from Frontier, that we use.
* Comment that creating a suit loadout does *not* automatically equip
  it.

Now, **if we have CAPI data** we will use the CAPI-sourced localised
name for the suit display.  Where we don't (yet) have CAPI data we still
use the badly localised journal name for the suit.
2021-05-25 14:26:01 +01:00
Athanasius
da94b729bd Suits: Log if we try to set unknown suit/loadout 2021-05-21 12:31:08 +01:00
Athanasius
7e064374d2 Suits: Refactor suit/loadout set-current away from store
This way we can have common code for SuitLoadout, SwitchSuitLoadout and
CreateSuitLoadout, with the first two then calling the new
`self.suit_and_loadout_setcurrent()` to set the seen data as also the
currently in use suit/loadout.
2021-05-21 12:27:16 +01:00
Athanasius
43d261f290 CreateSuitLoadout: 4.0.0.101 example comment 2021-05-21 12:14:18 +01:00
Athanasius
f923ef64ca Suits: Refactor 'SuitLoadout' to also be used in 'SwitchSuitLoadout' 2021-05-21 12:08:22 +01:00
Athanasius
3a92ff9f96 SwitchSuitLoadout: Example from 4.0.0.101 added in comments 2021-05-21 11:42:59 +01:00
Athanasius
5e0bcb29a9
Merge pull request #1084 from EDCD/fix/1078/odyssey-partial-engineerprogress-event
EngineerProgress: Extra validation paranoia
2021-05-21 11:01:26 +01:00
Athanasius
bd56948f7d
Merge pull request #1086 from EDCD/enhancement/1083/edsm-backpack
Fix BackPack event support to actually work.
2021-05-21 11:00:07 +01:00
A_D
be100d97de
Update credits on SuitUpdate
Closes #1079
2021-05-21 08:24:00 +02:00
Athanasius
143a205fb9 Backpack: event name is CamelCase, stored in monitor.state, doc
* Surprise!  The new event is `BackPack`, not `Backpack`, although the
  filename *is* `Backpack.json`.
* Store the loaded JSON dict in `monitor.state['BackpackJSON']`.  That
  `p` is lower case to match with the filename, not the event name.
* Document this in PLUGINS.md.

Unless EDSM is telling us to discard this we should now be sending it.
2021-05-20 18:13:51 +01:00
Athanasius
2184afba9b EngineerProgress: Rank/RankProgress is complicated.
And, yes, flake8 checks, validating these events *is* complex.
2021-05-20 15:51:28 +01:00
Athanasius
a82099fe53 EngineerProgress: Don't need f=, just f here. 2021-05-20 15:38:06 +01:00
Athanasius
e650308e3d EngineerProgress: Extra validation paranoia
This is an example of just how icky it gets validating an event by hand.

Technically we need a function, many would probably be lengthier and
more complex than this one, for **every   single   journal   event
  type**.
2021-05-20 15:28:52 +01:00
Athanasius
35a0edde58 Use pass for "no code intended"
`...` is better suited to "under construction, more to come".
2021-05-20 11:28:15 +01:00
Athanasius
0fd2264d53 UseConsumable: Rely on BackpackChange instead, to avoid double-accounting 2021-05-20 11:26:04 +01:00
Athanasius
652fecc3e8 SuitLoadout: Attempt to get all state set correctly.
I think this is now correct, but not yet triggering the unhide of the
'Suit' UI line, will check that next.
2021-05-20 10:51:49 +01:00
Athanasius
eeed2cf7af Initial attempt at SuitLoadout event support
Need to see examples to be sure.
2021-05-18 22:42:27 +01:00
Athanasius
a50ed31450 Add note about maybe not wanting to use UseConsumable to track Backpack
*Hopefully* `BackpackChange` will be 100% reliable in place of this.
Test once live Odyssey is available!
2021-05-18 22:42:27 +01:00
Athanasius
bcbf37599e Odyssey Backpack: Add support for v31 Backpack and BackpackChange
Leaving the, meant to be defunct, `BackPackMaterials` code in for now,
as it's only one extra conditional that will never be stepped into if
the event never happens.

Yes, Frontier now uses 'Backpack' not 'BackPack', but we've already
published our plugin API as using the CamelCase version, so not changing
the monitor.state key.
2021-05-18 22:42:27 +01:00
Athanasius
286060a796 monitor: Add state flag 'Odyssey' for if LoadGame states we're running under Odyssey 2021-05-12 17:54:39 +01:00
Athanasius
aaf1fda1a1 Credits: Be paranoid about all related Journal events
MissionCompleted doesn't contain 'Reward' if you pick an option without
a credits amount (rather than being there but with zero value).

Let's not wait to find out about other exceptions, just utilise
entry.get(<field>, 0) on them all.
2021-05-08 19:25:38 +01:00
Athanasius
f1ca2b8283 Separate 'Docked' processing to own conditional.
A taxi 'Docked' event has much less data than an own-ship one.  Rather
than put tortured conditionals into the
Location/FSDJump/CarrierJump/Docked conditional I've split Docked into
its own.

There should always be one of the other events to set things like
SystemAddress before a 'Docked' event, so limiting the new conditional
to setting/changing only the station-related state variables.
2021-05-05 12:20:24 +01:00
Athanasius
692856bbe1 Disembark: Use the alpha4-new flag to detect if on-station 2021-05-05 11:42:29 +01:00
Athanasius
5f29c866e7 Dropship: Set OnFoot for DropshipDeploy, but ignore BookDropship
See the comment added to BookDropship code for why we're ignoring it.
2021-05-05 11:34:10 +01:00
Athanasius
543e0477c2 Don't assume ModuleRetrieve/Store have a Cost.
The Journal doc says they do, but one report of ModuleRetrieve saying it
doesn't, and ModuleStore does say "Cost (if any)".
2021-05-05 10:01:07 +01:00
Athanasius
f6cb69ebad Embark: Keep monitor.station set when Embarking OnStation. 2021-05-01 13:12:14 +01:00
Athanasius
7c7609f2ee Cargo: Update ship cargo on CargoTransfer event
We missed this when it was brought in with Fleet Carriers in 2020.
2021-05-01 12:15:57 +01:00
Athanasius
812398ee0d Credits: Review and add/tweak code for all Journal events
There are a few where either the v30 Journal doc is wrong/has an
ommision, or we genuinely don't get the required information.
2021-05-01 12:03:45 +01:00
Athanasius
77d96f61c7 Odyssey Credits: Update for book/cancel Taxi/Dropship 2021-05-01 10:50:20 +01:00
Athanasius
d74b886587 Update credits for SellOrganicData 2021-05-01 10:46:25 +01:00
Athanasius
751002bf1a Suits: Guards for if we don't have CAPI data yet
We still need each try/except in case:

1. Journal has you buying a suit, or creating a SuitLoadout.
2. It then has you selling/deleting a different one.
3. But no CAPI data yet, so we don't know about that different one.
2021-05-01 10:42:54 +01:00
Athanasius
81104ca973 Suits: Only debug log if we can't find loadout for DeleteSuitLoadout 2021-05-01 10:31:08 +01:00
Athanasius
0e18666054 Suits: Only process SwitchSuitLoadout if we know about Suits and Loadouts 2021-05-01 10:25:39 +01:00
Athanasius
3ab8b97562 Suits: We might not know about SuitLoadout being switched to 2021-05-01 10:19:10 +01:00