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

426 Commits

Author SHA1 Message Date
A_D
a40cebc749 Added whitespace around scope changes
Helps with reading code later
2020-07-26 23:08:47 +01:00
A_D
ce7c6d4333 removed unused variable 2020-07-26 23:08:47 +01:00
A_D
a9f4f5d507 made all regexps raw strings
ensures no weirdness from escapes
2020-07-26 23:08:47 +01:00
A_D
ba67db3f13 removed unused imports 2020-07-26 23:08:47 +01:00
Athanasius
0135c73f6f Merge branch 'fix/614-ship-name-underscore' into release-4.0.3-rc3 2020-07-23 14:43:15 +01:00
Athanasius
f9de137105 Add import of os.path.expanduser 2020-07-23 14:40:53 +01:00
A_D
aa95573f3d Fix ~ not being expanded on linux 2020-07-23 14:35:57 +01:00
Athanasius
58ad7156b4 monitor.py: Add comment about why this new check is there 2020-07-22 14:48:34 +01:00
Athanasius
ab5e94a7c8 monitor.py: Don't record '' or ' ' as ShipName
Doing so causes the ShipType to not be used in the UI, so you get a
'link' with just a space for the text.

Any user who purposefully sets their ship's name to a single space
can live with seeing the model name instead.  Yes, I checked, the game
allows it.
2020-07-22 14:43:45 +01:00
Athanasius
2bd6e4cb1c PLUGINS.md: Flesh out plugin API docs
* Note in monitor.py to update the docs if anything changed about the
 'state' dictionary.
* Expand on arguments to all plugin call-ins.
* Particularly what the 'state' diction passed to journal_entry()
 contains.
* The contents of the `data` dictionary passed to `cmdr_data()`.
2020-07-12 18:10:16 +01:00
Athanasius
942cbbfcfc Use a strict regex for matching Journal*.log files
A user accidentally copied a Journal file into the same directory, resulting in
a "Journal.<datetime>.<serial> - Copy.log" file.  EDMC 3.99.0.0 then picked this
up and re-sent events to EDDN, EDSM, Inara.

So, let's be strict about the filenames we consider to be valid, live, Journal
files.

 * Journal files have one basic form: Journal.YYMMDDHHMMSS.XX.log
 * In addition the word 'Beta' can be inserted just after 'Journal'

So regex '^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$' matches both and nothing
else.

Test: The "copy to same directory" that originally triggered this.  EDMC no
      longer 'sees' the copy.
Test: Copied a Journal file out, renamed it to later date/time, copied that
      back in.  EDMC saw it correctly as a new file.

NB: Didn't test the "no emitter" version at monitor.py:251, but no reason to
    think it won't also work.

closes #546
2020-07-02 17:54:04 +01:00
Athanasius
0541e404ec Track system population in monitor, and use in eddb
EDDB station link now triggers off this.system_population, which is
received via monitor passing 'Population' through in Startup, Location,
FSDJump and CarrierJump events.

  One fewer use cases for systems.p (populated status in this case).
2020-07-01 15:51:14 +01:00
Athanasius
1a11202aea Implement tracking station MarketID, and use in eddb plugin
* Adds monitor.station_marketid, tracked at the same points as
   monitor.station (name).
 * Changes EDDB plugin to also track its own this.station_marketid so
   that it can be used in /market-id/ EDDB URL.
   This removes a use case for stations.p file.
2020-07-01 15:51:14 +01:00
Athanasius
259bb3bbd6 Merge branch 'release-final-python27' into python3 2020-06-21 16:43:02 +01:00
Athanasius
cc30f8e913 monitor.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
0f38e3e824 Removes un-necessary encode('utf-8') 2020-06-21 16:23:00 +01:00
Athanasius
d0ae621387 Running EDMarketConnector.py 'works'.
First pass utilising 'futurize' to do most of the work.

  There's an issue with ur'\"' in l10n.py which I'm not sure how to
properly fix.

  This now has errors when hitting the 'Update' button.
2020-06-21 16:23:00 +01:00
Bernd Gollesch
690ef067b0 keep track of system location if fleet carrier jumps while docked 2020-06-18 17:35:35 +01:00
Jonathan Harris
728ef3f599 Add "horizons" flag to outfitting and shipyard messages 2019-01-08 22:54:39 +00:00
Jonathan Harris
d281599dca Tidy 2018-12-28 03:32:35 +00:00
Jonathan Harris
1cdf1737c8 Track Frontier Cmdr ID 2018-11-15 23:06:40 +00:00
Jonathan Harris
a706c7aa29 Only update ship's cargo if 'Vessel' is 'Ship'
From 3.3 beta3
2018-11-15 22:55:00 +00:00
Jonathan Harris
8c3b0b8de3 Handle new Cargo event variant in 3.3 2018-11-03 10:37:01 +00:00
Jonathan Harris
fc44003161 Track Engineer progress 2018-11-03 10:37:01 +00:00
Jonathan Harris
96ffc82ca7 Support accessing Journal on macOS remotely over SMB 2018-10-30 19:33:40 +00:00
Jonathan Harris
a74bf40f8f Don't switch ships when launching a Guardian fighter 2018-10-02 23:28:17 +01:00
Jonathan Harris
04f68b535f Fix stats display
Fixes #312
2018-04-07 09:57:34 +01:00
Jonathan Harris
e342e9d17d Wait for ApproachBody event before setting planetary body
So in effect planetary body is only set for landable planets.
2018-04-02 00:02:39 +01:00
Jonathan Harris
b102b8c5b8 Sanitise ship loadout file names
Fixes #303
2018-03-18 11:48:04 +00:00
Jonathan Harris
6237066af6 Don't wait for Journal thread on exit
since can cause deadlock.
Fixes #295
2018-03-11 19:55:49 +00:00
Jonathan Harris
78dd0c5318 Fix for MissionCompleted MaterialRewards
Fixes #298
2018-03-09 14:38:34 +00:00
Jonathan Harris
a157478f03 Ignore Loadout events for SRV and SLF 2018-03-08 18:35:53 +00:00
Jonathan Harris
055d59c3d6 Don't handle CargoDepot event
Can't track Wing mission cargo accurately so ignore.
This reverts commit 73d7e7a41be0888ea8154c04c7b6386d8eb6f86f.
2018-03-08 10:54:51 +00:00
Jonathan Harris
26415df492 Update TechnologyBroker handling for E:D 3.02 2018-03-05 10:22:54 +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
47e92cf881 Switch "Ship loadout" output format to Loadout event 2018-03-03 04:18:59 +00:00
Jonathan Harris
73d7e7a41b Handle CargoDepot event
from E:D >= 3.01
2018-03-03 00:37:11 +00:00
Jonathan Harris
def5314f17 Handle MaterialTrade, TechnologyBroker and MissionCompleted events
MissionCompleted:MaterialsReward only supported from E:D 3.01.
2018-03-01 19:24:02 +00:00
Jonathan Harris
94e9ff64cc Add SystemAddress to EDDN journal/Scan messages 2018-02-27 22:59:06 +00:00
Jonathan Harris
1de3edc452 MissionCompleted has MaterialsReward property 2018-02-18 02:41:41 +00:00
Jonathan Harris
2552c46d09 Track Reputation and Statistics 2018-02-18 02:41:40 +00:00
Jonathan Harris
88f323d36e Switch EDShipyard import to Loadout event 2018-02-18 02:38:30 +00:00
Jonathan Harris
2aadc17a9d Track ship loadout 2018-02-18 02:38:30 +00:00
Jonathan Harris
d8dd7af2e2 Adjust batching for new startup event order 2018-02-18 02:38:30 +00:00
Jonathan Harris
7b8afa4f4a Fix StartUp event
Bug introduced in 1636148
2018-01-30 23:07:14 +00:00
Jonathan Harris
1636148fe0 Include planetary body in StartUp event 2018-01-30 22:56:47 +00:00
Jonathan Harris
1bc36edbc2 Include location info with StartUp pseudo-event 2018-01-07 18:39:14 +00:00
Jonathan Harris
95f96c1c03 Send "ShutDown" event to plugins on quitting to Main Menu 2017-12-03 17:14:18 +00:00
Jonathan Harris
f65d2623ac Send ShutDown event on game close 2017-11-26 14:25:38 +00:00
Jonathan Harris
f86a3ecb69 Track online friends
Addresses #264
2017-11-20 12:55:05 +00:00