-
Notifications
You must be signed in to change notification settings - Fork 13
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 with extension #142
Save with extension #142
Conversation
This is very nice and I actually ran into this a few times so thanks a lot! |
Signed-off-by: Audrow Nash <[email protected]>
Signed-off-by: Audrow Nash <[email protected]>
e30b4f1
to
76c1fe8
Compare
Signed-off-by: Audrow Nash <[email protected]>
I don't think I modified this. Signed-off-by: Audrow Nash <[email protected]>
Yup, this should be working now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that because of the way save events are sent there is a bit of a disconnect between the name of the file that is saved and the DefaultFile
component (to be honest it also exists without this PR but this makes it more noticeable). I would expect the behavior of saving to be similar to how a classic editor would be, so that once the project is saved the project's default file is set to the newly saved path. It currently will print the conversion warning every time a .building.yaml
project is saved until the project is closed and the .site.ron
file is opened.
I wonder if we should update the DefaultFile
component of the Site
that is being saved to reflect the latest file that it was saved to, so that every subsequent Ctrl-S / Save
will save to the last file that was specified (or in this case autocalculated).
What do you think?
That seems like a good idea to me. |
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
I've push some changes that address the Changing ...which led me to uncover a panic hazard which can happen if the Anyway I think this PR is ready to go now, after those unexpected complications 👍 |
Currently, when one saves a world, no extension is added unless the user types it out. Then when one goes to load a world, the extension must match a small list of extensions for it to be loaded.
Rather than have everyone go through the code, I figured to add the extension, if the user didn't type it out, so that the file can then be loaded easily.