Archipelago icon indicating copy to clipboard operation
Archipelago copied to clipboard

Core: have webhost slot name links go through the launcher

Open alwaysintreble opened this issue 1 year ago • 2 comments

What is this fixing or adding?

Changes the slot name links on the website room pages to go through launcher instead of straight to common client. it then tries to find the matching valid component and will call that component if it can, falling back on common client with the uri as an arg.

How was this tested?

https://discord.com/channels/731205301247803413/731214280439103580/1201703250789929031

If this makes graphical changes, please attach screenshots.

Screenshot_341

alwaysintreble avatar Jan 30 '24 01:01 alwaysintreble

worth mentioning separate, but the reasoning for both game_name and supports_uri is that we need the game_name to find the component from the uri, but we might also potentially need it for component caching. if we use game_name for caching, it will be required for all worlds, so supports_uri is to differentiate between those that don't want/can't handle the uri. if we ultimately don't end up wanting to use game_name for caching then that bool can possibly be removed, but i think that might introduce bugs from newer devs just assuming it's required anyways.

alwaysintreble avatar Jan 30 '24 02:01 alwaysintreble

with minor changes to my apworld (Minit):

  • to support args in the registered component func
  • and setting the new game_name and supports_uri component values

i was able to successfully open my CommonClient extension in both passing the relevant url into commandline parameters (i.e. python launcher.py [url] and archipelagolauncher.exe "[url]") and by clicking on the relevant link in the updated webhost.

And can confirm that when my .apworld was not configured correctly and/or missing that it defaulted back to the text client as expected

I also confirmed that the new links still open up the text client if the version of AP installed does not contain these updates

qwint avatar Feb 07 '24 06:02 qwint