1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 08:40:34 +03:00

208 Commits

Author SHA1 Message Date
Athanasius
26b12f5b14
plugins/inara, plug.py: Minor typing fixes 2022-12-23 14:47:18 +00:00
Athanasius
868c1d8e57
docs: Fix up references to setup.py to be to Build-exe-and-msi.py 2022-12-20 16:51:58 +00:00
Athanasius
db4f59dd16
Inara: Remove the "update 14 date passed?" check
- We're now past there and no-one should expect that messing with their clock
  will bypass this check.
2022-12-01 17:43:31 +00:00
Athanasius
4a8b5ed4b6
Merge pull request #1735 from EDCD/fix/1732/inara-do-not-send-empty-required
Inara: Drop various combat messages if empty opponentName
2022-12-01 16:41:32 +00:00
Athanasius
26413177a6
Inara: Also check opponentName on EscapeInterdiction
And sprinkly comments around giving a reason for the checks.
2022-12-01 13:45:10 +00:00
Athanasius
aac660fb05
Inara: Also catch empty opponentName for Interdict*ion* 2022-12-01 13:37:56 +00:00
Athanasius
2bbda30097
Inara: Drop addCommanderCombatInterdicted if empty opponentName
Addresses #1732 specifically.

At some point #1433 needs fully addressing (review all Inara API code for
compliance with docs).
2022-12-01 13:33:26 +00:00
Athanasius
e86110a3da
inara: Only warn for 'Legacy' if data would have been sent
* Specifically, only warn if the user option to send to Inara is active.
2022-11-30 12:07:48 +00:00
Athanasius
8a58220a66
inara: Send only Live galaxy data after Update 14
* Adds `monitor.is_live_galaxy()` for general use.
* Assumes Update 14 starts after 2022-11-29T09:00:00+00:00.  That's the
  currently schedule day, and recently the servers have been down by the time.
  Likelihood of them coming back *up* quickly seems slim to none.
* If we couldn't parse the `gameversion` from Journal using
  `semantic_version.Version.coerce()` this will fail, and assume we're on
  the Legacy galaxy.
2022-11-27 12:47:19 +00:00
Athanasius
5fa9bcd48e
inara: Wrap the <var> := <dict get> in () so <var> isn't a bool
Because, yes, 'is not' binds more tightly than ':='.
2022-08-13 18:34:28 +01:00
Athanasius
7b47dab543
inara: ApproachSettlement: Only set marketID if present in event
At least 'Ancient Ruins' generate an `ApproachSettlement` event without a
`MarketID` in the event.  Not even a key with `null` value.
2022-08-12 13:57:31 +01:00
Athanasius
dd6c6fbc36
Inara: Do not update credits from CAPI data
CAPI only has the Cmdr wallet value (and loan if applicable), without anything
for 'total assets'.  If we send Inara setCommanderCredits without
`commanderAssets` then Inara makes a bad judgement on it and sets an
incorrect total assets value.

Also:

> Do NOT set credits/assets unless you are absolutely sure they are correct. The journals currently doesn't contain crew wage cuts, so credit gains are very probably off for most of the players. Also, please, do not send each minor credits change, as it will spam player's credits log with unusable data and they won't be most likely very happy about it. It may be good to set credits just on the session start, session end and on the big changes or in hourly intervals.

So, let's just not.
2022-02-11 12:20:06 +00:00
Athanasius
30e9abb870
Inara: Change the comment for why we're using Progress, not Ranks 2022-02-08 13:34:03 +00:00
Athanasius
22f90e23aa
Inara: Trigger off 'Progress' for sending setCommanderRankPilot
Doing so from 'Rank' means the 'Progress' event hadn't happened yet, so of
course we only ever sent all zeroes for progress.

NB: Journal-v32 doc makes *no guarantee* about the order of the events.
  Is it worth trying to be paranoid about that ?  For a 100% new player
  everything would be "all zeroes", so we would likely need to tweak things
  to store `None` as default values, and check for such.
2022-02-08 13:31:00 +00:00
Athanasius
ac7cfb9b14
core plugins: Add big obvious comment about imports and windows installer 2022-02-01 14:45:30 +00:00
Athanasius
adb8055f08
Inara: Be paranoid in case of -ve credits balance 2022-01-31 15:22:36 +00:00
Athanasius
02dd800c57
Inara: Change the way we determine if a credits delta is interesting
Now based on the *minimum* of a fractional or absolute change.  See
<https://github.com/EDCD/EDMarketConnector/issues/1255> for discussion.
2022-01-31 14:50:12 +00:00
Athanasius
a5317e984f
Merge pull request #1412 from EDCD/fix/1378/inara-sync-ranks-onfoot
Inara: send setCommanderRankPilot message when on-foot
2022-01-26 16:43:17 +00:00
Athanasius
0c938bddfc
Inara: API stated to not support compression 2022-01-25 17:43:04 +00:00
Athanasius
28cbd6e0ea
Inara: queue 'Rank'/'setCommanderRankPilot' as soon as seen
This means we *will* send a message when logging in on foot, rather than
waiting for a `Cargo` event that never arrives.
2022-01-25 15:27:35 +00:00
Athanasius
ded86c2ff5
inara: Rename to current_credentials to avoid 'creds' ambiguity
Every time I see `current_creds` my first though is "creds means
credits".
2022-01-25 15:00:33 +00:00
Athanasius
c4f734734e
inara: snake_case lastcredits variable 2022-01-25 14:59:53 +00:00
Athanasius
7ac248be7a
inara: Utilise Statistics Current_Wealth for commanderAssets
Inara itself seems to be doing this if it has access to CAPI-sourced
Journals.  If we don't send commanderAssets as part of
setCommanderCredits then it does ... something else ... and ends up with
your total assets value bouncing between what EDMC is causing and what
it sees from the CAPI-sourced journals.

So, don't send this from LoadGame any more, instead wait for Statistics,
and if it has the relevant data, also send commanderAssets.
2022-01-20 17:45:23 +00:00
A_D
f62f1ee97b
made types consistent and generic 2021-08-19 20:37:39 +02:00
A_D
98e8179c3e
Dont ignore first killswitch checks changes 2021-08-19 20:35:50 +02:00
A_D
e79975bea8
Cleaned up import 2021-08-19 20:35:50 +02:00
A_D
8c0457bf47
updated inara to work with new killswitches 2021-08-19 20:35:49 +02:00
A_D
4c9896569b
added inara support for new delete_fields directive 2021-08-19 20:35:48 +02:00
a8a4abfe90
inara.py: trace with logger.trace_if only 2021-08-13 18:06:38 +03:00
e82abc8f03
inara.py: move conf_module import to satisfy isort 2021-08-12 19:36:27 +03:00
043fd4d826
inara.py: put inara events trace logging under inara-events trace_on option 2021-08-12 16:01:31 +03:00
A_D
6a296d4920
fixed inara per-event killswitch doing nothing 2021-07-03 15:48:25 +02:00
A_D
6c140abe97
Fixed import ordering 2021-06-18 23:36:45 +02:00
A_D
fe0e752c9b
Added support for arbitrary plugins for POST debug
This works by replacing --eddn-local with --debug-sender, and making the
webserver more generic. support has been added to EDSM, EDDN, and INARA.
2021-06-18 23:36:42 +02:00
Athanasius
a0b310f72e Translations: Amalgamate some LANG comments & en.template updated 2021-06-13 15:49:09 +01:00
A_D
40e9e0e268 added missing entries to inara 2021-06-10 20:29:11 +01:00
Athanasius
107c44a2a9 Inara: Fix the all() generator for ShipLocker check 2021-06-10 14:36:50 +01:00
Athanasius
a7722f70fe No need for [] if it's a generator inside all() anyway. 2021-06-10 14:04:38 +01:00
Athanasius
9fa02b51c3 Inara: Update to use ShipLocker, possibly from file. 2021-06-10 12:52:15 +01:00
Athanasius
4fa0521438 other core plugins: LANG comment pass 2021-06-07 15:43:32 +01:00
Athanasius
1d3ee4d6a9 Inara: Fix case on Inara 'marketID' key 2021-06-04 18:58:41 +01:00
Athanasius
7a69ca5e6b Inara: Remove useless/wrong setCommanderTravelLocation from SupercruiseEntry
This is old code, pre-dating the move to EDCD.  We could only possibly
set the system name and address from this, and would always have already
set this from login Location event, or any jump-in event.
2021-06-04 18:57:05 +01:00
Athanasius
f6777f0237 Inara: Only ApproachSettlement if we have system & fix key case
* If you're near a settlement on login you get an ApproachSettlement
  before `monitor` has system set to pass into `journal_entry()`.
* We had a case-type of an Inara API key, so it wasn't setting the
  BodyName.
* TRACE level logging of what we actually send to Inara.
2021-06-04 18:45:43 +01:00
Athanasius
fa0a7c48a2 Inara: setCommanderTravelLocation for SupercruiseExit and ApproachSettlement 2021-06-04 17:47:32 +01:00
Athanasius
07065b0bf3 inara: Comment out generic setCommanderTravelLocation event
This interferes with more specific such events, i.e. from Journal
`Location` event, if sent in the same batch.
2021-06-04 17:35:37 +01:00
A_D
88193cb30f
be sure to include body with lat/long 2021-06-04 17:56:31 +02:00
A_D
607729b77b
added setCommanderTravelLocation from Location event 2021-06-04 00:15:57 +02:00
A_D
8a94a57e78
Removed debug warnings and bool 2021-06-02 21:46:52 +02:00
A_D
86de3769d2
Fixed nonplural var containing plural names 2021-06-02 13:15:57 +02:00
A_D
2a68b81170
Fixed broken suitMods field 2021-06-02 12:32:32 +02:00