blockout22 / OverwatchVisualScripting

Write Overwatch Scripts using node based scripting
MIT License
15 stars 1 forks source link

Auto Save | Request #10

Open Neuffexx opened 3 months ago

Neuffexx commented 3 months ago

Based on the Crash recently I realized there is no auto save, would be awesome if you could add something. Doesnt need to be customizable or anything with settings. Just like every 5min would be fine.

blockout22 commented 3 months ago

I've added auto saving, if you haven't saved within the last 5 minutes it will save for you

also if it happens to crash or you can't load your file you can try one of the previous backup files which saved upto 10 backups

Neuffexx commented 3 months ago

Thanks will give that a try, could you tell me where the file location is for this? I assume in AppData but under what folder.

Maybe adding a button to the File menu (or a new item to the menubar), that opens windows explorer at the save location? For either project/auto or backup saves.

blockout22 commented 3 months ago

they save in the same directory as your jar file, the folder is called "Scripts"

Neuffexx commented 3 months ago

Alright, and how exactly do I open it? Rename the file? Because the import function says its not functional yet. And the File->Open menu only reads the script file (I assume), as it doesnt present me more than 1 option, such as:

blockout22 commented 3 months ago

normally you won't need to open it but if you want to use one of the backups you just need to rename it to script.json the backups are in date order year+month+day+hour+minute+secondbackup.json

just remember to close the script before changing any files outside the editor

Neuffexx commented 3 months ago

Yeah thats fine no worries, now that I saw that its in the same folder its really not needed. Would be cool though if the latest backup/autosave was shown as well when you click the project. Otherwise its really not an issue.