From 1ca1bed37df7422ab7049f44bf864494747abd51 Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Sun, 6 Nov 2022 18:45:00 +0700 Subject: 0.2.3 final code --- ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'ShiftOS-TheRevival/MainForms/SaveLoadSystem.vb') 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 -- cgit v1.2.3