mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
PLUGINS: Document monitor.is_live_galaxy() as sanctioned for use
This commit is contained in:
parent
d576cb6611
commit
650b43cc3c
10
PLUGINS.md
10
PLUGINS.md
@ -110,9 +110,9 @@ from the original files unless specified as allowed in this section.
|
||||
|
||||
`import plug` - For using `plug.show_error()` only.
|
||||
|
||||
Use `monitor.game_running()` as follows in case a plugin needs to know if we
|
||||
think the game is running. *NB: This is a function, and should be called as
|
||||
such. Using the bare word `game_running` will always be `True`.*
|
||||
Use `monitor.game_running()` as follows in case a plugin needs to know if we
|
||||
think the game is running. *NB: This is a function, and should be called as
|
||||
such. Using the bare word `game_running` will always be `True`.*
|
||||
|
||||
```
|
||||
from monitor import monitor
|
||||
@ -121,6 +121,10 @@ if monitor.game_running():
|
||||
...
|
||||
```
|
||||
|
||||
Use `monitor.is_live_galaxy()` to determine if the player is playing in the
|
||||
Live galaxy. Note the implementation details of this. At time of writing it
|
||||
performs a `semantic_version` >= check.
|
||||
|
||||
`import timeout_session` - provides a method called `new_session` that creates
|
||||
a requests.session with a default timeout on all requests. Recommended to
|
||||
reduce noise in HTTP requests
|
||||
|
@ -2507,6 +2507,8 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
"""
|
||||
Indicate if current tracking indicates Live galaxy.
|
||||
|
||||
NB: **MAY** be used by third-party plugins.
|
||||
|
||||
We assume:
|
||||
1) `gameversion` remains something that semantic_verison.Version.coerce() can parse.
|
||||
2) Any Live galaxy client reports a version >= the defined base version.
|
||||
|
Loading…
x
Reference in New Issue
Block a user