1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 07:47:14 +03:00

438 Commits

Author SHA1 Message Date
Athanasius
937aaccec4 ShipLockerJSON: Ensure initialised, and document it. 2021-06-10 14:20:27 +01:00
Athanasius
7051aba656 ShipLocker/Backpack: Use one event for the now-pass'ed ones.
Also, just dropped `TransferMicroResources` entirely as it's no longer
present (and would be irrelevant).
2021-06-10 14:08:57 +01:00
Athanasius
a7722f70fe No need for [] if it's a generator inside all() anyway. 2021-06-10 14:04:38 +01:00
Athanasius
3ea0bcce5e BackPack: No need to worry about Resurrect. 2021-06-10 12:44:46 +01:00
Athanasius
ae18071f13 Backpack: Factor out the "make it empty" code. 2021-06-10 12:39:53 +01:00
Athanasius
8b6c0e50ac Backpack: Zero out when we Embark, as it's all then in ShipLocker 2021-06-10 12:37:59 +01:00
Athanasius
09c81a21f6 ShipLocker: do *NOT* zero out BackPack when handling this event
Just need to ensure we do on Embark (or Death? but likely fresh events
then anyway?).

Certainly if Journal event order is ever Backpack *then* ShipLocker this
would erroneously zero out the backpack.
2021-06-10 12:34:30 +01:00
Athanasius
b02729ebdc Backpack/ShipLocker: TransferMicroResources is gone as of 4.0.0.400 2021-06-10 12:32:40 +01:00
Athanasius
f942e76313 monitor: BackPackMaterials shouldn't be a thing any more 2021-06-10 12:28:37 +01:00
Athanasius
c2d75e7f1d Credits: UpgradeWeapon should now include a credits cost.
Need to see 4.0.0.400 event for this and UpgradeSuit to be sure they
don't also cite materials costs.  But the hope is there'd be a new
empty/file `ShipLocker` event anyway.
2021-06-10 12:24:13 +01:00
Athanasius
59b410341c ShipLocker: Can now ignore SellMicroResources for inventory purposes
`ShipLocker` empty/file event has full new inventory.
2021-06-10 12:22:56 +01:00
Athanasius
db43442504 ShipLocker: Ignore TradeMicroResources for inventory purposes
We get `ShipLocker`/file with full new inventory.
2021-06-10 12:21:40 +01:00
Athanasius
c3a46a8415 ShipLocker: 4.0.0.400 - can ignore BuyMicroResources for inventory purposes
As the new `ShipLocker` is present in 'empty' form, with full new
inventory in the file.
2021-06-10 12:19:35 +01:00
Athanasius
f852a185e4 Backpack: 4.0.0.400 - Can still ignore this for inventory purposes 2021-06-10 12:18:00 +01:00
Athanasius
8f05282d63 Backpack: 4.0.0.400 - can still ignore CollectItems 2021-06-10 12:17:15 +01:00
Athanasius
2b1ca8031c Backpack: Still don't need to worry about UseConsumable in 4.0.0.400 2021-06-10 12:16:14 +01:00
Athanasius
7934754482 ShipLocker: New event that replaces ShipLockerMaterials
On startup, embark, disembark this is a full event, otherwise it signals
writing of new ShipLocker.json file.
2021-06-10 12:12:02 +01:00
Athanasius
52dffc5c53
Merge pull request #1139 from A-UNDERSCORE-D/fix/1138-empty-backpack-json
Fixed erroring on empty backpack.json
2021-06-07 10:50:06 +01:00
A_D
caf594752f
Made use of guard clauses where possible 2021-06-04 16:26:07 +02:00
A_D
f9efe0e5a9
Fixed erroring on empty backpack.json
closes EDCD/EDMarketConnector#1138
2021-06-04 12:19:10 +02:00
A_D
6a02b6efc7
Fixed taxi log 2021-06-02 13:00:49 +02:00
A_D
71afdf0bdb
Added missing BodyType init 2021-06-02 11:58:33 +02:00
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