Commit Graph
77 Commits
Author SHA1 Message Date
A_D d4299c224f dont force a send on exit
just try and send if we can
2020-07-27 15:12:32 +02:00
A_D bb817eee3b removed outdated comment 2020-07-27 15:08:47 +02:00
A_D 340f8928b3 switched to using config for last update time 2020-07-27 15:08:47 +02:00
A_D 34760683e5 added some debug logging 2020-07-27 15:08:46 +02:00
A_D 72498b3bbc Switched to using a timer for inara updates
This adds a new thread that will run in a loop sending inara events once
ever 30 seconds. The old method of sending once for "special" events has
been removed.
2020-07-27 15:08:46 +02:00
Athanasius d7c2372417 Flake8 cleanup round #2 2020-07-27 10:14:16 +01:00
Athanasius f9a23cc831 Clean up flake8 output for this branch 2020-07-27 09:37:10 +01:00
Athanasius 2e58d106bd logging.getLogger(appname) instead of import from EDMarketConnector
Using:

from EDMarketConnector import logger

causes issues if EDMarketConnector is already importing 'this' file.

So just get a logger using logger.getLogger(appname) instead.
`from config import appname` if needs be.
2020-07-27 06:57:52 +01:00
Athanasius 8e1f3b8a90 plugins/inara: Fix typo on except: 2020-07-27 06:57:52 +01:00
Athanasius 7d060aa325 plugins/inara: Convert to proper logging 2020-07-27 06:57:52 +01:00
Athanasius b6f6365566 plugins/edsm: Fix missing line of code
Bad paste or something, who knows ?
2020-07-21 18:25:03 +01:00
Athanasius 01d4c12027 plugins/inara: population recording fix, and misc cleanups 2020-07-21 17:29:03 +01:00
Athanasius e2c74ed11d plugins/inara: Removed commented out inara_notify_location() code 2020-07-21 17:29:03 +01:00
Athanasius f7896f3b6a plugins/inara: Track more system/station info, fix URLs
* Track all of: this.system_address, this.system_population,
 this.system_marketid
* Use this.system_address if set (only from journal) for no-dupes Inara
 system URL.
* Added the "'x' if undocked and show system info" functionality from
  EDDB plugin.
* This version will set target station name/link if you request docking
 with it, whether that succeeds or not.  Cleared not only on Undock, but
 also FSDJump and SupercruiseEntry (in case you never actually docked).
* No longer bothering setting system and station URLs from Inara API
 response as we have working ones anyway.  So even those without Inara
 API Key set get the functionality now.
2020-07-21 17:29:03 +01:00
Athanasius bb28a4fa2f plugins/inara.py: Add two TODOs
* Artie added a 'by-systemaddress' system lookup, use it.
* This means we probably no longer need to update URLs in the
 inara_notify_location() function.
2020-07-21 17:29:03 +01:00
Athanasius 4da1ae331d plugins/inara.py: Track system and station in cmdr_data, and update links
NB: Still need to ensure journal_entry() updates them and links
properly.
2020-07-21 17:29:03 +01:00
Athanasius 63f5db3785 plugins/inara.py makes no use of import companion
So remove it.
2020-07-12 19:24:16 +01:00
A_D f43141202b Removed debug print 2020-07-11 20:55:18 +02:00
A_D 061fbddb2d Fixed wording of comment on last_update_time 2020-07-11 20:53:48 +02:00
A_D 9b82464f88 Fixed updating inara cargo only on major events
This works by checking on _any_ event the status of the cargo vs the
current stored version. If the live cargo differs from the updated
cargo, _and_ we have not sent any update in the past 45 seconds (as this
would have contained the cargo anyway), we queue an actual send to the
API.

This unfortunately isn't checked only when docked, but on the plus side
miners will be happy to have their cargo updated relatively often.

Fixes #477. Possibly not quite what they wanted, but its about as close
as this will get
2020-07-11 20:53:47 +02:00
Athanasius 259bb3bbd6 Merge branch 'release-final-python27' into python3 2020-06-21 16:43:02 +01:00
Jonathan Harris c62d110448 Plugin migration 2020-06-21 16:33:13 +01:00
Athanasius 4a7f4cd450 plugins/inara.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius bebc3648b8 plugins/inara.py: No need for encode('utf-8') 2020-06-21 16:23:00 +01:00
Athanasius 90b05d22c5 Now runs without console errors so far as pressing 'Update' is concerned.
There's an error on the console about an iterator when doing so
though.
2020-06-21 16:23:00 +01:00
Bernd Gollesch 38ba48c713 added carrier data to CarrierJump event 2020-06-18 17:46:16 +01:00
Bernd Gollesch 098613ea0a There is now an api event for 'CarrierJump' -> 'addCommanderTravelCarrierJump' 2020-06-18 17:46:06 +01:00
Bernd Gollesch 02649b8c6f there is also a 'Factions' list in the 'CarrierJump' event 2020-06-18 17:44:22 +01:00
Bernd Gollesch b45df6b4fd keep track of location if the carrier you're docked at jumps 2020-06-18 17:44:14 +01:00
VAKazakov 994624d83b changing division by int to float, as suggested 2020-03-05 11:52:34 +03:00
VAKazakov 1984e25e50 Fixing reputation values error
"Inara setCommanderReputationMinorFaction, The reputation value exceeds the valid range"
2020-03-04 22:43:47 +03:00
Jonathan Harris e9a23c67dc Send correct opponentName for Interdicted and Interdiction events
Fixes #459
2019-10-02 18:50:06 +01:00
Jonathan Harris d8b5884b05 Notify plugins of Inara ship, system and station IDs
Fixes #425
2019-07-06 15:28:48 +01:00
Jonathan Harris ca0c650955 Add influence and reputation gain to setCommanderMissionCompleted 2019-02-16 17:52:36 +00:00
Jonathan Harris 126158bf15 Don't send Engineers at startup prior to 3.3 2018-11-18 01:52:06 +00:00
Jonathan Harris 31f0139271 More Inara 3.3 support
Add commanderFrontierID to header.
Send "setCommanderReputationMinorFaction" events.
Send "addCommanderFriend" and "delCommanderFriend" events.
Use array forms of "setCommanderRankPilot", "SetCommanderRankEngineer and
"SetCommanderReputationMajorFaction" events.
2018-11-16 00:13:52 +00:00
Jonathan Harris fc44003161 Track Engineer progress 2018-11-03 10:37:01 +00:00
Jonathan Harris 2f7ffc6c31 Rationalise startup handling 2018-11-03 10:36:38 +00:00
Jonathan Harris ca9b3ac241 Fix for non-numeric mod values
Fixes #330
2018-06-15 16:48:01 -05:00
Jonathan Harris 5d1da83b45 Get timestamp for setCommanderCredits from cAPI server 2018-05-29 23:37:03 +01:00
Jonathan Harris 3a3827f168 Make system and station links unclickable if URL not available 2018-04-04 19:34:35 +01:00
Jonathan Harris 7bdf0bf9c8 Fix for setting system and station urls 2018-04-03 15:09:04 +01:00
Jonathan Harris 0eaa61bdd9 Make system and station info websites configurable 2018-04-03 01:03:07 +01:00
Jonathan Harris 25d9602550 Send credits and statistics at game start only
otherwise might be out of date.
Statistics event may arrive before or after Docked event.
2018-03-11 22:49:52 +00:00
Jonathan Harris c8f6eff6a3 Fix for addCommanderShip on ShipyardNew event 2018-03-05 23:47:24 +00:00
Jonathan Harris fdd770fe64 Don't attempt to set user's ship if in Fighter or SRV 2018-03-04 18:01:19 +00:00
Jonathan Harris d2122108c7 Fix setCommanderShipLoadout event 2018-02-28 19:31:01 +00:00
Jonathan Harris 8b53b25a86 Handle pointless change to the ShipyardNew event 2018-02-27 23:05:34 +00:00
Jonathan Harris 3a00166621 Send credits at startup 2018-02-18 02:56:23 +00:00
Jonathan Harris 60ddc55d5e Send CommunityGoal TopTier info 2018-02-18 02:43:43 +00:00