diff --git a/PLUGINS.md b/PLUGINS.md index 5cabd8b6..9cc2c3f3 100644 --- a/PLUGINS.md +++ b/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 diff --git a/monitor.py b/monitor.py index 1770195c..15cd72c4 100644 --- a/monitor.py +++ b/monitor.py @@ -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.