Commit Graph

94 Commits

Author SHA1 Message Date
CaitSith2 66894dbd86 Add further safeties to sending of location checks.
This safety is able to be turned off, but has to be done so on EVERY connection explicitly.
2020-10-27 16:24:21 -07:00
CaitSith2 5c403086d9 Get server side missing list on connect.
This initial missing list does NOT report all of its missing locations into the console.  It is however used for a couple of things.
* Client now uses this to determine if it should send the location check to the server. No point in doing so if the server isn't going to register it anyways.
* Allows an easy view of previously visited locations in the case of a save wipe.
2020-10-27 12:08:35 -07:00
CaitSith2 83db79815a Make multiclient/multiserver/tracker keydropshuffle aware 2020-10-27 00:53:32 -07:00
Fabian Dill 70752d332f Delay consecutive reconnects 2020-09-01 21:45:01 +02:00
Fabian Dill d92c461ad3 open webui only after asking for repatching in text console, as it can otherwise be easily missed. 2020-08-11 21:59:43 +02:00
Fabian Dill 9445527249 Multiclient: use new romname for persistent storage 2020-07-17 15:50:00 +02:00
Fabian Dill d9e7248ebc fix multiclient trying to webhost on the same port it determined as web_ui socket 2020-07-15 23:10:08 +02:00
Fabian Dill 2338d25b39 expand rom auto_start to be customizable 2020-07-15 17:19:16 +02:00
Fabian Dill c5ece240c4 MultiClient: fix authenticating against older server 2020-07-14 16:19:04 +02:00
Fabian Dill ea9e103cb0 update rom name handling 2020-07-14 04:48:56 +02:00
Fabian Dill 38fe292acb allow aliases in tracker and prevent them from causing html/js/database "stuff"
Though technically they can still do unicode "stuff"
2020-06-24 13:29:40 +02:00
caitsith2 f6a7acad19 Send game finished state on connect 2020-06-23 06:03:21 -07:00
Fabian Dill 7353b489ce add available hint points to UI 2020-06-15 06:30:51 +02:00
Chris e11f33b589 Update WebUI to display server, check, and hint info. CURRENT HINT POINTS DO NOT WORK YET 2020-06-14 18:04:03 -04:00
Fabian Dill 9d067b6f00 improve gui 2020-06-10 19:57:01 +02:00
Fabian Dill 8a0bae0252
Merge pull request #103 from Berserker66/patch_changes
Allow patch.py to mass adjust roms. (It asks on first slot, and if yes is said, applies to ALL patches.)
Allow patch.py store target server address for patch.
2020-06-08 18:22:53 +02:00
Fabian Dill 9612e27531 correct webuidata log to debug level 2020-06-08 18:21:04 +02:00
Fabian Dill f9a29d3140 fix disable web ui 2020-06-07 23:14:07 +02:00
caitsith2 91cb0630fa changes
* Allow patch.py to mass adjust roms
* Allow patch.py store target server address for patch.
2020-06-07 12:04:33 -07:00
Chris 7d42137782 Fix bug preventing manual snes reconnect. Update WebUI to automatically connect if only one SNES device is detected. 2020-06-06 19:58:10 -04:00
Fabian Dill fbd00136e7 remove leftover log 2020-06-06 23:46:51 +02:00
Fabian Dill d3df96fcc5 move some client functions into their own functions
also break some stuff while I'm at it, so don't use this yet.
2020-06-06 23:46:28 +02:00
Fabian Dill 829c9c2045 restore python 3.7 client compat 2020-06-06 22:54:09 +02:00
Fabian Dill d25973989a Make clients identify themselves against server
prep for potential later async auth system. Wanted to get this into the 2.3 client update.
2020-06-04 21:27:29 +02:00
Fabian Dill dac3c0ca29 Make clients identify themselves against server
prep for potential later async auth system. Wanted to get this into the 2.3 client update.
2020-06-04 21:19:57 +02:00
Fabian Dill 59a26e071c clean up 2020-06-04 21:12:05 +02:00
Fabian Dill 38cbcc662f
WebUI (#100)
* Object-Oriented base changes for web-ui prep

* remove debug raise

* optimize broadcast to serialize once

* Implement WebUI socket, static assets, and classes

- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server

* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served

* Update MultiServer status when a user disconnects / reconnects

* Implement colored item and hint checks, improve GUI readability

* Fix improper formatting on received items

* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects

* Minor text change for itemFound

* Fixed a very wrong comment

* Fixed client commands not working, fixed un-helpful error messages appearing in GUI

* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in

* Convert WebUI to React /w Redux. WebSocket communications not yet operational.

* WebUI fully converted to React / Redux.

- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active

* Restore some features lost in WebUI

- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue

* Fix a grammatical UI big causing player names to show only an apostrophe when possessive

* Add support for multiple SNES Devices, and switching between them

* freeze support for client

* make sure flask works when frozen

* UI Improvements

- Hint messages now actually show a found status via ✔ and  emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget

* Received items now marked as relevant

* Include production build for deployment

* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.

* include webUi folder in setup.py

* Bugfixes for Monitor

- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key

* Prevent eslint from yelling at me about stupid things

* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose

* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output

* Update WebUI to v2.2.1

- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior

* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint

- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"

* Update WebUI color palette (this cost me $50)

* allow text console input alongside web-ui

* remove Flask
a bit overkill for what we're doing

* remove jinja2

* Update WebUI to work with new hosting mechanism

* with flask gone, we no longer need subprocess shenanigans

* If multiple web ui clients try to run, at least present a working console

* Update MultiClient and WebUI to handle multiple clients simultaneously.

- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to

- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.

- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab

* Use proper name for WebUI

* move webui into /data with other data files

* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.

* fix direct server start

* re-add connection timer

* fix indentation

Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
CaitSith2 e4c68fde60
Don't clear locally visited locations if rom is same as previous on /snes after /snes_close (#98) 2020-06-02 16:38:23 +02:00
Fabian Dill 117624d611 fix /snes <snes_interface> if interface contains spaces (which it shouldn't, but meh) 2020-05-31 14:55:37 +02:00
Fabian Dill 0cb80eadf1 add more room info 2020-05-30 11:36:59 +02:00
Fabian Dill df79e570bb shorten hint text a bit, now that it got longer 2020-05-18 23:24:41 +02:00
Fabian Dill 947362aaa6 improve colors #2 2020-05-18 23:09:51 +02:00
Fabian Dill 2c8d127550 improve colors 2020-05-18 10:02:28 +02:00
Fabian Dill b2e20be077 Hints now contain ER info 2020-05-18 05:40:36 +02:00
caitsith2 cc77b48146 Changes
* Cache server address for loaded rom, as well as default fallback.
* server address is only cached upon successful connection and authentication to the server.
2020-04-30 18:02:25 -07:00
Fabian Dill 47784d2632 name client tasks
and then realize that PyCharm's ConcurrencyDiagram is currently broken and doesn't show the names
2020-04-30 04:09:19 +02:00
Fabian Dill 56e57de574 store last used adjuster settings and use them for patching
might use them as gui defaults later
2020-04-26 15:14:30 +02:00
Fabian Dill 49770159fb small adjustments for game finished 2020-04-25 13:50:32 +02:00
caitsith2 b3c7789596 Changes
* Game end detection - Detect if the player finished their game, and announce it accordingly.
* Add a client side /slow_mode option. (allows to delay receiving items when a massive amount of them come in, like from a forfeit.)
2020-04-24 20:07:28 -07:00
Fabian Dill 37b79294be remember the last server address and ask to use it. 2020-04-25 04:10:30 +02:00
Fabian Dill 5d33b4b164 introduce persistent data storage, which for now just caches rom -> server pairs 2020-04-24 05:29:02 +02:00
Fabian Dill 7582767401 aliases 2020-04-23 06:16:54 +02:00
Fabian Dill 8ea342abe5 Add result flag to commands 2020-04-21 06:26:51 +02:00
Fabian Dill 3165c440e3 and forgot one instance of version 2020-04-20 19:50:13 +02:00
Fabian Dill 5a57519c32 Add count to missing command
Add a server's missing command
Fix password wasn't able to remove a set password
2020-04-20 11:47:50 +02:00
Fabian Dill b676d4131f loudly fail on connection errors. 2020-04-19 13:44:22 +02:00
Fabian Dill 48e304a091 0 is not None 2020-04-19 13:41:01 +02:00
Fabian Dill 659bc0e177 no longer eat multiple spaces in commands 2020-04-19 03:24:27 +02:00
CaitSith2 6b47a69966
Actually close SNES connection on invalid rom. (#69)
This nicely makes it also attempt to reconnect in 5 seconds alongside the client to server.
2020-04-17 00:23:08 +02:00
Fabian Dill 11df6e5e7a Merge branch 'master' into owg_test 2020-04-15 21:27:41 +02:00