aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-06 18:45:00 +0700
committerEverythingWindows <[email protected]>2022-11-06 18:45:00 +0700
commit1ca1bed37df7422ab7049f44bf864494747abd51 (patch)
treee5ee3ca8163b7f4c191cc1e9ae4a909037a24888 /ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb
parent2a3e5ec4d537770bb3d310bfb9bda12c0615aedd (diff)
downloadshiftos-therevival-old-1ca1bed37df7422ab7049f44bf864494747abd51.tar.gz
shiftos-therevival-old-1ca1bed37df7422ab7049f44bf864494747abd51.tar.bz2
shiftos-therevival-old-1ca1bed37df7422ab7049f44bf864494747abd51.zip
0.2.3 final code0.2.3
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb')
-rw-r--r--ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb18
1 files changed, 17 insertions, 1 deletions
diff --git a/ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb b/ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb
index 3a41005..d08cf00 100644
--- a/ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb
+++ b/ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb
@@ -1,4 +1,6 @@
-Module SaveLoadSystem
+Imports System.IO
+
+Module SaveLoadSystem
Public Sub NewGameMode()
Strings.ComputerInfo(2) = "0"
@@ -61,4 +63,18 @@
Strings.AvailableFeature(14) = "2"
Strings.AvailableFeature(15) = "2"
End Sub
+
+ Public Sub SaveGame()
+ If Strings.OnceInfo(6) = "story" Then
+ File.WriteAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\ComputerInfo.sos", Strings.ComputerInfo)
+ File.WriteAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\AvailableFeature.sos", Strings.AvailableFeature)
+ End If
+ End Sub
+
+ Public Sub LoadGame()
+ If Strings.OnceInfo(6) = "story" Then
+ Strings.ComputerInfo = File.ReadAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\ComputerInfo.sos")
+ Strings.AvailableFeature = File.ReadAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\AvailableFeature.sos")
+ End If
+ End Sub
End Module