From 6975f7385040d49543751b5184dbbcb4d91c2603 Mon Sep 17 00:00:00 2001 From: pfg github Date: Sun, 15 Mar 2015 09:52:07 -0700 Subject: Added Paths module --- ShiftOS/ShiftOSDesktop.vb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ShiftOS/ShiftOSDesktop.vb') diff --git a/ShiftOS/ShiftOSDesktop.vb b/ShiftOS/ShiftOSDesktop.vb index 063cd03..6905ca0 100644 --- a/ShiftOS/ShiftOSDesktop.vb +++ b/ShiftOS/ShiftOSDesktop.vb @@ -15,7 +15,7 @@ Public newgame As Boolean = False Public lastcolourpick As Color = Color.Gray Public programsopen As Integer = 0 - Public ShiftOSPath As String = "C:\ShiftOS\" + Public ShiftOSPath As String = "C:\ShiftOS" Private actualshiftversion As String = "0.0.8" Public ingameversion As String = "0.0.1.0" @@ -1063,15 +1063,15 @@ If boughtdesktopicons = True Then savelines(614) = 11 Else savelines(614) = 10 If boughtadvapplauncher = True Then savelines(615) = 11 Else savelines(615) = 10 IO.File.WriteAllLines(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", savelines) - File_Crypt.EncryptFile(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", "C:/ShiftOS/Shiftum42/SKernal.sft", sSecretKey) + File_Crypt.EncryptFile(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", "C:\ShiftOS\Shiftum42\SKernal.sft", sSecretKey) Try - Dim sw As New IO.StreamWriter(ShiftOSPath & "SoftwareData\DownloadManager\Downloadhistory.lst") + Dim sw As New IO.StreamWriter(Paths.dnldata & "Downloadhistory.lst") sw.Write(downloadmanagerhistory) sw.Close() Catch ex As Exception End Try - Dim objWriter As New System.IO.StreamWriter("C:/ShiftOS/Shiftum42/HDAccess.sft", False) + Dim objWriter As New System.IO.StreamWriter(Paths.savedata & "HDAccess.sft", False) objWriter.Write(actualshiftversion) objWriter.Close() @@ -1090,8 +1090,8 @@ End Sub Private Sub loadgame() - File_Crypt.DecryptFile("C:/ShiftOS/Shiftum42/SKernal.sft", ShiftOSPath + "Shiftum42\Drivers\HDD.dri", sSecretKey) - loadlines = IO.File.ReadAllLines(ShiftOSPath + "Shiftum42\Drivers\HDD.dri") + File_Crypt.DecryptFile(Paths.savedata & "SKernal.sft", Paths.savedata & "Drivers\HDD.dri", sSecretKey) + loadlines = IO.File.ReadAllLines(Paths.savedata & "Drivers\HDD.dri") If loadlines(0) = 11 Then boughttitlebar = True Else boughttitlebar = False If loadlines(1) = 11 Then boughtgray = True Else boughtgray = False @@ -5077,6 +5077,7 @@ hideStart() Else infobox.showinfo("Error", "Could not find app 'Pong'.") + End If End Sub Private Sub KnowledgeInputToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles KnowledgeInputToolStripMenuItem1.Click -- cgit v1.2.3 From b107f2e8fdd56a3131a6f0c19d4d7cb1e4ddaca0 Mon Sep 17 00:00:00 2001 From: rhobar Date: Sun, 15 Mar 2015 17:49:43 +0000 Subject: Game-saving issue fixed. --- ShiftOS/ShiftOSDesktop.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ShiftOS/ShiftOSDesktop.vb') diff --git a/ShiftOS/ShiftOSDesktop.vb b/ShiftOS/ShiftOSDesktop.vb index 6905ca0..cc6cdeb 100644 --- a/ShiftOS/ShiftOSDesktop.vb +++ b/ShiftOS/ShiftOSDesktop.vb @@ -1062,8 +1062,8 @@ SortOutBooleans(WebBrowserCorrupted, 613, False) If boughtdesktopicons = True Then savelines(614) = 11 Else savelines(614) = 10 If boughtadvapplauncher = True Then savelines(615) = 11 Else savelines(615) = 10 - IO.File.WriteAllLines(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", savelines) - File_Crypt.EncryptFile(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", "C:\ShiftOS\Shiftum42\SKernal.sft", sSecretKey) + IO.File.WriteAllLines(ShiftOSPath + "\Shiftum42\Drivers\HDD.dri", savelines) + File_Crypt.EncryptFile(ShiftOSPath + "\Shiftum42\Drivers\HDD.dri", "C:\ShiftOS\Shiftum42\SKernal.sft", sSecretKey) Try Dim sw As New IO.StreamWriter(Paths.dnldata & "Downloadhistory.lst") sw.Write(downloadmanagerhistory) -- cgit v1.2.3 From dda2964b748eafb3ff1105966f8a349069834cc0 Mon Sep 17 00:00:00 2001 From: rhobar Date: Sun, 15 Mar 2015 17:56:53 +0000 Subject: Game-saving issue fixed #2. --- ShiftOS/ShiftOSDesktop.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ShiftOS/ShiftOSDesktop.vb') diff --git a/ShiftOS/ShiftOSDesktop.vb b/ShiftOS/ShiftOSDesktop.vb index cc6cdeb..429055f 100644 --- a/ShiftOS/ShiftOSDesktop.vb +++ b/ShiftOS/ShiftOSDesktop.vb @@ -1062,8 +1062,8 @@ SortOutBooleans(WebBrowserCorrupted, 613, False) If boughtdesktopicons = True Then savelines(614) = 11 Else savelines(614) = 10 If boughtadvapplauncher = True Then savelines(615) = 11 Else savelines(615) = 10 - IO.File.WriteAllLines(ShiftOSPath + "\Shiftum42\Drivers\HDD.dri", savelines) - File_Crypt.EncryptFile(ShiftOSPath + "\Shiftum42\Drivers\HDD.dri", "C:\ShiftOS\Shiftum42\SKernal.sft", sSecretKey) + IO.File.WriteAllLines(Paths.savedata & "Drivers\HDD.dri", savelines) + File_Crypt.EncryptFile(Paths.savedata & "Drivers\HDD.dri", Paths.savedata & "SKernal.sft", sSecretKey) Try Dim sw As New IO.StreamWriter(Paths.dnldata & "Downloadhistory.lst") sw.Write(downloadmanagerhistory) -- cgit v1.2.3