It's just good UX to have a chance of correcting a missclick that does something drastic. That's either an undo button or a confirmation dialog.
Deleting is pretty hard to undo so a confirmation dialog is your best bet.
			
			
									
									
						Friday facts #95 - 0.12 Release today
- 
				ratchetfreak
- Filter Inserter 
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Friday facts #95 - 0.12 Release today
Done in 0.12.1.cube wrote:Good point, I'll add it to our list.Cooolaid wrote:One thing I would like for the creator of Factorio Game to do is.
Place a confirmation popup when deleting a Saved World.
Pressing Delete Save instantly deletes it, but if you mistakenly misclicked on the wrong Saved World, you're basically screwed.
It just happened to me. There should be a confirmation popup when deleting a Saved World.
Re: Friday facts #95 - 0.12 Release today
nice rant, wanted to shout at you in the middle that you should thank the windows devs for putting a conformation prompt as a last resort to save you from your mistakes (these prompts, as well as the recycle bin are a result of years of feedback from the community - yes even windows has one), you saved the day in the end - I second the deletion of a save actually moving a save to the recycle bin, although a confirmation prompt there is a better choice and I think easier to program. lets see what the #devs decideScoobTheNoob wrote:Ref# Saves,
Rant begins..
it is already bad enough that Windows asks if I want to shut down, open a file from the internet, delete file, save file, in fact do anything that involves productivity.
In fact it asks me if I am sure, to which I think no I am not sure that is why I performed the often complex set of arguments and requests to get this message, ie, clicked on start then selected shutdown, located the file and then pressed delete..
I was sure enough to parse those instructions, there is a good chance Windows NT kernel that I did in fact have a degree of certainty that this was indeed the action I desired, asking me at this late stage in the operation is not going to shift my decision making process.
So no I do not want yet another program asking me if I am sure I want to do something.
So here is my solution, disable the option to manually delete a file within game, and instead players can manually put the save files into recycle bin, or .... as most distros and Windows have a recycle bin, simply commit the delete of file to the trash can, this way when a player like herp derpinstein derps and deletes his 5000 hour gaming time map he or she does not whinge about it, and simply restores from the trash can...

Edit: There you go, by the time I got to answering to you, #devs already made a confirmation popup that will be there in 0.12.1
guys - if you feel we don't say it enough, here it is - THANK YOU FOR MAKING THIS GAME AND FOR LISTENING TO US

					Last edited by jockeril on Wed Jul 22, 2015 9:48 pm, edited 1 time in total.
									
			
									
						- Darthlawsuit
- Fast Inserter 
- Posts: 247
- Joined: Thu Feb 28, 2013 7:32 pm
- Contact:
Re: Friday facts #95 - 0.12 Release today
Just like to say that your .12 multiplayer is about as stable as many 1.0 releases of games I have played. Your definitely on the right track. Also multiplayer is really fun it really goes well with this game.
			
			
									
									
						Re: Friday facts #95 - 0.12 Release today
3 Friends of mine and myself played 5 hours straight and had not a single crash, desync whatever. Just a bit of lag, but that is due to the crappy internet connection from one of us, so yeah! 
As far as I remember, this is the most stable .0 release I have ever whitnessed. Cheers!
			
			
									
									
As far as I remember, this is the most stable .0 release I have ever whitnessed. Cheers!
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector
						With this, you are able to use the pollution levels in your circuit network: Pollution detector
- 
				ScoobTheNoob
- Burner Inserter 
- Posts: 13
- Joined: Sat Jun 20, 2015 7:21 pm
- Contact:
Re: Friday facts #95 - 0.12 Release today
Yes, praise indeed to the Factorio devs,jockeril wrote:nice rant, wanted to shout at you in the middle that you should thank the windows devs for putting a conformation prompt as a last resort to save you from your mistakes (these prompts, as well as the recycle bin are a result of years of feedback from the community - yes even windows has one), you saved the day in the end - I second the deletion of a save actually moving a save to the recycle bin, although a confirmation prompt there is a better choice and I think easier to program. lets see what the #devs decideScoobTheNoob wrote:Ref# Saves,
Rant begins..
it is already bad enough that Windows asks if I want to shut down, open a file from the internet, delete file, save file, in fact do anything that involves productivity.
In fact it asks me if I am sure, to which I think no I am not sure that is why I performed the often complex set of arguments and requests to get this message, ie, clicked on start then selected shutdown, located the file and then pressed delete..
I was sure enough to parse those instructions, there is a good chance Windows NT kernel that I did in fact have a degree of certainty that this was indeed the action I desired, asking me at this late stage in the operation is not going to shift my decision making process.
So no I do not want yet another program asking me if I am sure I want to do something.
So here is my solution, disable the option to manually delete a file within game, and instead players can manually put the save files into recycle bin, or .... as most distros and Windows have a recycle bin, simply commit the delete of file to the trash can, this way when a player like herp derpinstein derps and deletes his 5000 hour gaming time map he or she does not whinge about it, and simply restores from the trash can...
Edit: There you go, by the time I got to answering to you, #devs already made a confirmation popup that will be there in 0.12.1
guys - if you feel we don't say it enough, here it is - THANK YOU FOR MAKING THIS GAME AND FOR LISTENING TO US
 
 But it is so simple to commit a file to the trash can... I mean really really simple, last time I checked it was one extra argument.
using System.Runtime.InteropServices;
Code: Select all
public class FileOperationAPIWrapper
    {
        /// <summary>
        /// Possible flags for the SHFileOperation method.
        /// </summary>
        [Flags]
        public enum FileOperationFlags : ushort
        {
            /// <summary>
            /// Do not show a dialog during the process
            /// </summary>
            FOF_SILENT = 0x0004,
            /// <summary>
            /// Do not ask the user to confirm selection
            /// </summary>
            FOF_NOCONFIRMATION = 0x0010,
            /// <summary>
            /// Delete the file to the recycle bin.  (Required flag to send a file to the bin
            /// </summary>
            FOF_ALLOWUNDO = 0x0040,
            /// <summary>
            /// Do not show the names of the files or folders that are being recycled.
            /// </summary>
            FOF_SIMPLEPROGRESS = 0x0100,
            /// <summary>
            /// Surpress errors, if any occur during the process.
            /// </summary>
            FOF_NOERRORUI = 0x0400,
            /// <summary>
            /// Warn if files are too big to fit in the recycle bin and will need
            /// to be deleted completely.
            /// </summary>
            FOF_WANTNUKEWARNING = 0x4000,
        }
        /// <summary>
        /// File Operation Function Type for SHFileOperation
        /// </summary>
        public enum FileOperationType : uint
        {
            /// <summary>
            /// Move the objects
            /// </summary>
            FO_MOVE = 0x0001,
            /// <summary>
            /// Copy the objects
            /// </summary>
            FO_COPY = 0x0002,
            /// <summary>
            /// Delete (or recycle) the objects
            /// </summary>
            FO_DELETE = 0x0003,
            /// <summary>
            /// Rename the object(s)
            /// </summary>
            FO_RENAME = 0x0004,
        }
        /// <summary>
        /// SHFILEOPSTRUCT for SHFileOperation from COM
        /// </summary>
        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
        private struct SHFILEOPSTRUCT
        {
            public IntPtr hwnd;
            [MarshalAs(UnmanagedType.U4)]
            public FileOperationType wFunc;
            public string pFrom;
            public string pTo;
            public FileOperationFlags fFlags;
            [MarshalAs(UnmanagedType.Bool)]
            public bool fAnyOperationsAborted;
            public IntPtr hNameMappings;
            public string lpszProgressTitle;
        }
        [DllImport("shell32.dll", CharSet = CharSet.Auto)]
        private static extern int SHFileOperation(ref SHFILEOPSTRUCT FileOp);
        /// <summary>
        /// Send file to recycle bin
        /// </summary>
        /// <param name="path">Location of directory or file to recycle</param>
        /// <param name="flags">FileOperationFlags to add in addition to FOF_ALLOWUNDO</param>
        public static bool Send(string path, FileOperationFlags flags)
        {
            try
            {
                var fs = new SHFILEOPSTRUCT
                                        {
                                            wFunc = FileOperationType.FO_DELETE,
                                            pFrom = path + '\0' + '\0',
                                            fFlags = FileOperationFlags.FOF_ALLOWUNDO | flags
                                        };
                SHFileOperation(ref fs);
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
        /// <summary>
        /// Send file to recycle bin.  Display dialog, display warning if files are too big to fit (FOF_WANTNUKEWARNING)
        /// </summary>
        /// <param name="path">Location of directory or file to recycle</param>
        public static bool Send(string path)
        {
            return Send(path, FileOperationFlags.FOF_NOCONFIRMATION | FileOperationFlags.FOF_WANTNUKEWARNING);
        }
        /// <summary>
        /// Send file silently to recycle bin.  Surpress dialog, surpress errors, delete if too large.
        /// </summary>
        /// <param name="path">Location of directory or file to recycle</param>
        public static bool MoveToRecycleBin(string path)
        {
            return Send(path, FileOperationFlags.FOF_NOCONFIRMATION | FileOperationFlags.FOF_NOERRORUI | FileOperationFlags.FOF_SILENT);
        }
        private static bool deleteFile(string path, FileOperationFlags flags)
        {
            try
            {
                var fs = new SHFILEOPSTRUCT
                                        {
                                            wFunc = FileOperationType.FO_DELETE,
                                            pFrom = path + '\0' + '\0',
                                            fFlags = flags
                                        };
                SHFileOperation(ref fs);
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
        public static bool DeleteCompletelySilent(string path)
        {
            return deleteFile(path,
                              FileOperationFlags.FOF_NOCONFIRMATION | FileOperationFlags.FOF_NOERRORUI |
                              FileOperationFlags.FOF_SILENT);
        }
    }In fact it could be done in a lot less code.
Re: Friday facts #95 - 0.12 Release today
I\m hearing new music. Please tell me you didn remove the old music. Because it was very good 
			
			
									
									
						





