nomns / nparse

Nomns' Parser for Project1999
GNU General Public License v3.0
43 stars 23 forks source link

Signals and Slots rework for location service refactor #74

Closed token419 closed 2 months ago

token419 commented 2 months ago

Refactored the location_service to use QWebsocket - removed global signals - added signals to existing apps

This makes the app shutdown immediately instead of being on a sleep loop if the sharing service thread was not started. This also removes the global signals that were in place for location sharing and moves them to a _signals dict off the main QApplication. I also moved the location sharing to a _services off the main QApplication as well so we can access them easier with QApplication.instance()

Pretty big pull, but check over the changes and let me know.

In location_service.py in the share_location function there is a commented out block for sending a fake location with a loc, i was using this in combination with commenting out the websocket.open() command to verify adding players/waypoints works, and on a live connection you can see them get cleaned up. Mostly useful for my testing while working on it, but we can remove it if we merge this in.