Skip to content

Commit

Permalink
WebHost: Restore game name in description, don't hardcode archipelago.gg
Browse files Browse the repository at this point in the history
 ArchipelagoMW#1820 added the game name to template export, but when ArchipelagoMW#2143 began
overriding the description in Javascript to name the preset it removed
the game name.

Also while I was here I figured we might as well not hardcode
https://archipelago.gg, since it can be useful to know if a YAML was
generated by some other Web Host (for example
http://archipelago.gg:24242 if coming from the beta site)
  • Loading branch information
remyjette committed Jan 9, 2024
1 parent b0638b9 commit 5488929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WebHostLib/static/assets/player-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,15 @@ const exportOptions = () => {
const preset = localStorage.getItem(`${gameName}-preset`);
switch (preset) {
case '__default':
options['description'] = `Generated by https://archipelago.gg with the default preset.`;
options['description'] = `Generated by ${window.location.origin} for ${gameName} with the default preset.`;
break;

case '__custom':
options['description'] = `Generated by https://archipelago.gg.`;
options['description'] = `Generated by ${window.location.origin} for ${gameName}.`;
break;

default:
options['description'] = `Generated by https://archipelago.gg with the ${preset} preset.`;
options['description'] = `Generated by ${window.location.origin} for ${gameName} with the ${preset} preset.`;
}

if (!options.name || options.name.toString().trim().length === 0) {
Expand Down

0 comments on commit 5488929

Please sign in to comment.