Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save command will use JS.saveGame online #1372

Closed

Conversation

KVonGit
Copy link
Collaborator

@KVonGit KVonGit commented Jan 15, 2025

When saving progress online, the text from #divOutput is not retained when calling the request script.

In 5.8, we changed it to use the game object attribute set by JS.whereAmi(), which ended up being unused (due to issues when run from the init script). This script initially included a call to whereAmI if the attribute was not set, which was also problematic, and it devolved into its current state -- which does not work on its own.

This will not use JS to check the platform and will still use JS to save when online.

When saving progress online, the text from `#divOutput` is not retained when using `request`.

In 5.8, we changed it to use the game object attribute set by `JS.whereAmi()`, which ended up being unused (due to issues when run from the init script). This script initially included a call to whereAmI if the attribute was not set, which was also problematic, and it devolved into its current state -- which does not work on its own.

This will not use JS to check the platform and will still use JS to save when online.
Copy link
Contributor

@alexwarren alexwarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we should have separate code for desktop and web within an ASLX file. Shouldn't RequestSave do the right thing instead?

else {
JS.saveGame ()
}
if (IsDesktop()){}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The open and close braces here looks like an error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The open and close braces here looks like an error?

This is proof that I should switch back to Notepad++. I like VS Code, but I apparently need to "practice" with it before using it for important things.

I just fixed this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we should have separate code for desktop and web within an ASLX file. Shouldn't RequestSave do the right thing instead?

I agree.

I looked at that code a few times before doing it this way, and I don't know what that C# code is doing. If you can make RequestSave handle it, that sounds much better than this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an Issue for this one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10-4

#1200

@KVonGit KVonGit closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants