2022-11-06 11:45:00 +00:00
|
|
|
|
Imports System.IO
|
|
|
|
|
|
|
|
|
|
Module SaveLoadSystem
|
2022-11-04 01:56:41 +00:00
|
|
|
|
|
2022-11-27 13:58:48 +00:00
|
|
|
|
Public Sub NewGameMode(Chapter As Integer)
|
2022-11-14 06:50:43 +00:00
|
|
|
|
'Sets all features to 2 (Unavailable for Shiftorium) except ShiftOS Key (AvailableFeatures(11))
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS", True)
|
2022-11-20 09:43:01 +00:00
|
|
|
|
Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SysShiftFS", True)
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved", True)
|
|
|
|
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS")
|
2022-11-20 09:43:01 +00:00
|
|
|
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SysShiftFS")
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
|
|
|
|
|
Strings.ComputerInfo(0) = "shiftos"
|
|
|
|
|
Strings.ComputerInfo(1) = "user"
|
2022-11-04 22:36:43 +00:00
|
|
|
|
Strings.ComputerInfo(2) = "0"
|
|
|
|
|
Strings.ComputerInfo(4) = "0"
|
2022-11-27 13:58:48 +00:00
|
|
|
|
Select Case Chapter
|
|
|
|
|
Case 0
|
|
|
|
|
Strings.AvailableFeature(0) = "2"
|
|
|
|
|
Strings.AvailableFeature(1) = "2"
|
|
|
|
|
Strings.AvailableFeature(2) = "2"
|
|
|
|
|
Strings.AvailableFeature(3) = "2"
|
|
|
|
|
Strings.AvailableFeature(4) = "2"
|
|
|
|
|
Strings.AvailableFeature(5) = "2"
|
|
|
|
|
Strings.AvailableFeature(6) = "2"
|
|
|
|
|
Strings.AvailableFeature(7) = "2"
|
|
|
|
|
Strings.AvailableFeature(8) = "2"
|
|
|
|
|
Strings.AvailableFeature(9) = "2"
|
|
|
|
|
Strings.AvailableFeature(10) = "2"
|
|
|
|
|
Strings.AvailableFeature(11) = "0"
|
|
|
|
|
Strings.AvailableFeature(12) = "2"
|
|
|
|
|
Strings.AvailableFeature(13) = "2"
|
|
|
|
|
Strings.AvailableFeature(14) = "2"
|
|
|
|
|
Strings.AvailableFeature(15) = "2"
|
|
|
|
|
'0.2.4 Features
|
|
|
|
|
Strings.AvailableFeature(16) = "2"
|
|
|
|
|
Strings.AvailableFeature(17) = "2"
|
|
|
|
|
Strings.AvailableFeature(18) = "2"
|
|
|
|
|
Strings.AvailableFeature(19) = "2"
|
|
|
|
|
Strings.AvailableFeature(20) = "2"
|
|
|
|
|
Strings.AvailableFeature(21) = "2"
|
|
|
|
|
Strings.AvailableFeature(22) = "2"
|
|
|
|
|
'0.2.5 Features
|
|
|
|
|
Strings.AvailableFeature(23) = "2"
|
|
|
|
|
Strings.AvailableFeature(24) = "2"
|
|
|
|
|
Strings.AvailableFeature(25) = "2"
|
|
|
|
|
Strings.AvailableFeature(26) = "2"
|
|
|
|
|
Strings.AvailableFeature(27) = "2"
|
|
|
|
|
Strings.AvailableFeature(28) = "2"
|
|
|
|
|
Strings.AvailableFeature(29) = "2"
|
|
|
|
|
Strings.AvailableFeature(30) = "2"
|
|
|
|
|
'0.2.6 Features
|
|
|
|
|
Strings.AvailableFeature(31) = "2"
|
|
|
|
|
Strings.AvailableFeature(32) = "2"
|
|
|
|
|
Strings.AvailableFeature(33) = "2"
|
|
|
|
|
'0.2.7 Features
|
|
|
|
|
Strings.AvailableFeature(34) = "2"
|
|
|
|
|
Strings.AvailableFeature(35) = "2"
|
|
|
|
|
Strings.AvailableFeature(36) = "2"
|
|
|
|
|
Strings.AvailableFeature(37) = "2"
|
|
|
|
|
Strings.AvailableFeature(38) = "2"
|
|
|
|
|
Strings.AvailableFeature(39) = "2"
|
|
|
|
|
Strings.AvailableFeature(40) = "2"
|
|
|
|
|
Strings.AvailableFeature(41) = "2"
|
|
|
|
|
'0.2.8 Features
|
|
|
|
|
Strings.AvailableFeature(42) = "2"
|
|
|
|
|
Case 1
|
|
|
|
|
Strings.AvailableFeature(0) = "1"
|
|
|
|
|
Strings.AvailableFeature(1) = "1"
|
|
|
|
|
Strings.AvailableFeature(2) = "1"
|
|
|
|
|
Strings.AvailableFeature(3) = "1"
|
|
|
|
|
Strings.AvailableFeature(4) = "1"
|
|
|
|
|
Strings.AvailableFeature(5) = "3"
|
|
|
|
|
Strings.AvailableFeature(6) = "3"
|
|
|
|
|
Strings.AvailableFeature(7) = "3"
|
|
|
|
|
Strings.AvailableFeature(8) = "1"
|
|
|
|
|
Strings.AvailableFeature(9) = "1"
|
|
|
|
|
Strings.AvailableFeature(10) = "1"
|
|
|
|
|
Strings.AvailableFeature(11) = "1"
|
|
|
|
|
Strings.AvailableFeature(12) = "3"
|
|
|
|
|
Strings.AvailableFeature(13) = "1"
|
|
|
|
|
Strings.AvailableFeature(14) = "1"
|
|
|
|
|
Strings.AvailableFeature(15) = "1"
|
|
|
|
|
'0.2.4 Features
|
|
|
|
|
Strings.AvailableFeature(16) = "1"
|
|
|
|
|
Strings.AvailableFeature(17) = "1"
|
|
|
|
|
Strings.AvailableFeature(18) = "1"
|
|
|
|
|
Strings.AvailableFeature(19) = "1"
|
|
|
|
|
Strings.AvailableFeature(20) = "1"
|
|
|
|
|
Strings.AvailableFeature(21) = "1"
|
|
|
|
|
Strings.AvailableFeature(22) = "1"
|
|
|
|
|
'0.2.5 Features
|
|
|
|
|
Strings.AvailableFeature(23) = "1"
|
|
|
|
|
Strings.AvailableFeature(24) = "3"
|
|
|
|
|
Strings.AvailableFeature(25) = "3"
|
|
|
|
|
Strings.AvailableFeature(26) = "3"
|
|
|
|
|
Strings.AvailableFeature(27) = "3"
|
|
|
|
|
Strings.AvailableFeature(28) = "3"
|
|
|
|
|
Strings.AvailableFeature(29) = "1"
|
|
|
|
|
Strings.AvailableFeature(30) = "1"
|
|
|
|
|
'0.2.6 Features
|
|
|
|
|
Strings.AvailableFeature(31) = "1"
|
|
|
|
|
Strings.AvailableFeature(32) = "1"
|
|
|
|
|
Strings.AvailableFeature(33) = "1"
|
|
|
|
|
'0.2.7 Features
|
|
|
|
|
Strings.AvailableFeature(34) = "1"
|
|
|
|
|
Strings.AvailableFeature(35) = "2"
|
|
|
|
|
Strings.AvailableFeature(36) = "2"
|
|
|
|
|
Strings.AvailableFeature(37) = "2"
|
|
|
|
|
Strings.AvailableFeature(38) = "2"
|
|
|
|
|
Strings.AvailableFeature(39) = "2"
|
|
|
|
|
Strings.AvailableFeature(40) = "2"
|
|
|
|
|
Strings.AvailableFeature(41) = "2"
|
|
|
|
|
'0.2.8 Features
|
|
|
|
|
Strings.AvailableFeature(42) = "2"
|
2022-12-03 00:10:41 +00:00
|
|
|
|
Strings.AvailableFeature(43) = "2"
|
|
|
|
|
Strings.AvailableFeature(44) = "2"
|
|
|
|
|
Strings.AvailableFeature(45) = "2"
|
|
|
|
|
Strings.AvailableFeature(46) = "2"
|
|
|
|
|
Strings.AvailableFeature(47) = "2"
|
|
|
|
|
Strings.AvailableFeature(48) = "2"
|
|
|
|
|
Strings.AvailableFeature(49) = "2"
|
|
|
|
|
Strings.AvailableFeature(50) = "2"
|
|
|
|
|
Strings.AvailableFeature(51) = "2"
|
|
|
|
|
Strings.AvailableFeature(52) = "2"
|
2022-11-27 13:58:48 +00:00
|
|
|
|
End Select
|
2022-11-04 01:56:41 +00:00
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Sub FreeRoamMode()
|
2022-11-21 22:42:55 +00:00
|
|
|
|
IsConsoleParent = True
|
2022-11-24 01:18:00 +00:00
|
|
|
|
'Sets all features to as bought or either upgraded, Complete ShiftOS should have been like this
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Strings.ComputerInfo(0) = "shiftos"
|
|
|
|
|
Strings.ComputerInfo(1) = "user"
|
2022-11-04 22:36:43 +00:00
|
|
|
|
Strings.ComputerInfo(2) = "0"
|
2022-11-24 16:06:37 +00:00
|
|
|
|
Strings.ComputerInfo(4) = "42"
|
2022-11-04 01:56:41 +00:00
|
|
|
|
Strings.AvailableFeature(0) = "1"
|
|
|
|
|
Strings.AvailableFeature(1) = "1"
|
|
|
|
|
Strings.AvailableFeature(2) = "1"
|
|
|
|
|
Strings.AvailableFeature(3) = "1"
|
2022-11-04 06:12:41 +00:00
|
|
|
|
Strings.AvailableFeature(4) = "1"
|
|
|
|
|
Strings.AvailableFeature(5) = "3"
|
|
|
|
|
Strings.AvailableFeature(6) = "3"
|
2022-11-06 00:21:26 +00:00
|
|
|
|
Strings.AvailableFeature(7) = "3"
|
2022-11-04 22:36:43 +00:00
|
|
|
|
Strings.AvailableFeature(8) = "1"
|
2022-11-05 15:24:30 +00:00
|
|
|
|
Strings.AvailableFeature(9) = "1"
|
2022-11-05 16:48:35 +00:00
|
|
|
|
Strings.AvailableFeature(10) = "1"
|
2022-11-06 00:21:26 +00:00
|
|
|
|
Strings.AvailableFeature(11) = "1"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Strings.AvailableFeature(12) = "3"
|
2022-11-06 07:24:53 +00:00
|
|
|
|
Strings.AvailableFeature(13) = "1"
|
|
|
|
|
Strings.AvailableFeature(14) = "1"
|
|
|
|
|
Strings.AvailableFeature(15) = "1"
|
2022-11-07 00:13:50 +00:00
|
|
|
|
'0.2.4 Features
|
|
|
|
|
Strings.AvailableFeature(16) = "1"
|
|
|
|
|
Strings.AvailableFeature(17) = "1"
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Strings.AvailableFeature(18) = "1"
|
|
|
|
|
Strings.AvailableFeature(19) = "1"
|
|
|
|
|
Strings.AvailableFeature(20) = "1"
|
2022-11-08 23:30:53 +00:00
|
|
|
|
Strings.AvailableFeature(21) = "1"
|
|
|
|
|
Strings.AvailableFeature(22) = "1"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
'0.2.5 Features
|
|
|
|
|
Strings.AvailableFeature(23) = "1"
|
2022-11-13 14:22:42 +00:00
|
|
|
|
Strings.AvailableFeature(24) = "3"
|
|
|
|
|
Strings.AvailableFeature(25) = "3"
|
|
|
|
|
Strings.AvailableFeature(26) = "3"
|
|
|
|
|
Strings.AvailableFeature(27) = "3"
|
|
|
|
|
Strings.AvailableFeature(28) = "3"
|
|
|
|
|
Strings.AvailableFeature(29) = "1"
|
|
|
|
|
Strings.AvailableFeature(30) = "1"
|
2022-11-14 06:50:43 +00:00
|
|
|
|
'0.2.6 Features
|
|
|
|
|
Strings.AvailableFeature(31) = "1"
|
2022-11-19 19:25:18 +00:00
|
|
|
|
Strings.AvailableFeature(32) = "1"
|
|
|
|
|
Strings.AvailableFeature(33) = "1"
|
2022-11-20 09:43:01 +00:00
|
|
|
|
'0.2.7 Features
|
|
|
|
|
Strings.AvailableFeature(34) = "1"
|
2022-11-24 01:18:00 +00:00
|
|
|
|
Strings.AvailableFeature(35) = "1"
|
|
|
|
|
Strings.AvailableFeature(36) = "1"
|
2022-11-24 14:26:45 +00:00
|
|
|
|
Strings.AvailableFeature(37) = "1"
|
|
|
|
|
Strings.AvailableFeature(38) = "1"
|
|
|
|
|
Strings.AvailableFeature(39) = "1"
|
|
|
|
|
Strings.AvailableFeature(40) = "3"
|
|
|
|
|
Strings.AvailableFeature(41) = "1"
|
2022-11-27 13:58:48 +00:00
|
|
|
|
'0.2.8 Features
|
|
|
|
|
Strings.AvailableFeature(42) = "1"
|
2022-12-03 00:10:41 +00:00
|
|
|
|
Strings.AvailableFeature(43) = "1"
|
|
|
|
|
Strings.AvailableFeature(44) = "1"
|
|
|
|
|
Strings.AvailableFeature(45) = "1"
|
|
|
|
|
Strings.AvailableFeature(46) = "1"
|
|
|
|
|
Strings.AvailableFeature(47) = "1"
|
|
|
|
|
Strings.AvailableFeature(48) = "1"
|
|
|
|
|
Strings.AvailableFeature(49) = "1"
|
|
|
|
|
Strings.AvailableFeature(50) = "1"
|
|
|
|
|
Strings.AvailableFeature(51) = "1"
|
|
|
|
|
Strings.AvailableFeature(52) = "1"
|
2022-11-04 01:56:41 +00:00
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Sub GodMode()
|
2022-11-14 06:50:43 +00:00
|
|
|
|
'Same as new game but codepoints automatically assigned to 9999 and not saved into the FS
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Strings.ComputerInfo(0) = "shiftos"
|
|
|
|
|
Strings.ComputerInfo(1) = "user"
|
2022-11-04 01:56:41 +00:00
|
|
|
|
Strings.ComputerInfo(2) = 9999
|
2022-11-04 22:36:43 +00:00
|
|
|
|
Strings.ComputerInfo(4) = "0"
|
2022-11-06 00:21:26 +00:00
|
|
|
|
Strings.AvailableFeature(0) = "2"
|
|
|
|
|
Strings.AvailableFeature(1) = "2"
|
2022-11-04 01:56:41 +00:00
|
|
|
|
Strings.AvailableFeature(2) = "2"
|
|
|
|
|
Strings.AvailableFeature(3) = "2"
|
2022-11-04 06:12:41 +00:00
|
|
|
|
Strings.AvailableFeature(4) = "2"
|
|
|
|
|
Strings.AvailableFeature(5) = "2"
|
|
|
|
|
Strings.AvailableFeature(6) = "2"
|
|
|
|
|
Strings.AvailableFeature(7) = "2"
|
2022-11-04 22:36:43 +00:00
|
|
|
|
Strings.AvailableFeature(8) = "2"
|
2022-11-05 15:24:30 +00:00
|
|
|
|
Strings.AvailableFeature(9) = "2"
|
2022-11-05 16:48:35 +00:00
|
|
|
|
Strings.AvailableFeature(10) = "2"
|
2022-11-06 00:21:26 +00:00
|
|
|
|
Strings.AvailableFeature(11) = "0"
|
|
|
|
|
Strings.AvailableFeature(12) = "2"
|
2022-11-06 07:24:53 +00:00
|
|
|
|
Strings.AvailableFeature(14) = "2"
|
|
|
|
|
Strings.AvailableFeature(15) = "2"
|
2022-11-07 00:13:50 +00:00
|
|
|
|
'0.2.4 Features
|
|
|
|
|
Strings.AvailableFeature(16) = "2"
|
|
|
|
|
Strings.AvailableFeature(17) = "2"
|
2022-11-08 03:22:01 +00:00
|
|
|
|
Strings.AvailableFeature(18) = "2"
|
|
|
|
|
Strings.AvailableFeature(19) = "2"
|
|
|
|
|
Strings.AvailableFeature(20) = "2"
|
2022-11-08 23:30:53 +00:00
|
|
|
|
Strings.AvailableFeature(21) = "2"
|
|
|
|
|
Strings.AvailableFeature(22) = "2"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
'0.2.5 Features
|
|
|
|
|
Strings.AvailableFeature(23) = "2"
|
2022-11-13 14:22:42 +00:00
|
|
|
|
Strings.AvailableFeature(24) = "2"
|
|
|
|
|
Strings.AvailableFeature(25) = "2"
|
|
|
|
|
Strings.AvailableFeature(26) = "2"
|
|
|
|
|
Strings.AvailableFeature(27) = "2"
|
|
|
|
|
Strings.AvailableFeature(28) = "2"
|
|
|
|
|
Strings.AvailableFeature(29) = "2"
|
|
|
|
|
Strings.AvailableFeature(30) = "2"
|
2022-11-14 06:50:43 +00:00
|
|
|
|
'0.2.6 Features
|
|
|
|
|
Strings.AvailableFeature(31) = "2"
|
2022-11-19 19:25:18 +00:00
|
|
|
|
Strings.AvailableFeature(32) = "2"
|
|
|
|
|
Strings.AvailableFeature(33) = "2"
|
2022-11-20 09:43:01 +00:00
|
|
|
|
'0.2.7 Features
|
|
|
|
|
Strings.AvailableFeature(34) = "2"
|
2022-11-24 01:18:00 +00:00
|
|
|
|
Strings.AvailableFeature(35) = "2"
|
|
|
|
|
Strings.AvailableFeature(36) = "2"
|
2022-11-24 14:26:45 +00:00
|
|
|
|
Strings.AvailableFeature(37) = "2"
|
|
|
|
|
Strings.AvailableFeature(38) = "2"
|
|
|
|
|
Strings.AvailableFeature(39) = "2"
|
|
|
|
|
Strings.AvailableFeature(40) = "2"
|
|
|
|
|
Strings.AvailableFeature(41) = "2"
|
2022-11-27 13:58:48 +00:00
|
|
|
|
'0.2.8 Features
|
|
|
|
|
Strings.AvailableFeature(42) = "2"
|
2022-12-03 00:10:41 +00:00
|
|
|
|
Strings.AvailableFeature(43) = "2"
|
|
|
|
|
Strings.AvailableFeature(44) = "2"
|
|
|
|
|
Strings.AvailableFeature(45) = "2"
|
|
|
|
|
Strings.AvailableFeature(46) = "2"
|
|
|
|
|
Strings.AvailableFeature(47) = "2"
|
|
|
|
|
Strings.AvailableFeature(48) = "2"
|
|
|
|
|
Strings.AvailableFeature(49) = "2"
|
|
|
|
|
Strings.AvailableFeature(50) = "2"
|
|
|
|
|
Strings.AvailableFeature(51) = "2"
|
|
|
|
|
Strings.AvailableFeature(52) = "2"
|
2022-11-04 01:56:41 +00:00
|
|
|
|
End Sub
|
2022-11-06 11:45:00 +00:00
|
|
|
|
|
|
|
|
|
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)
|
2022-11-24 15:51:51 +00:00
|
|
|
|
If Strings.AvailableFeature(35) Then
|
|
|
|
|
Select Case Strings.ComputerInfo(7)
|
|
|
|
|
Case 1
|
|
|
|
|
Dim DesktopColor As Integer = GUISCustomizations.DesktopColor.ToArgb()
|
|
|
|
|
File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\Shifter_Desktop.sos", DesktopColor.ToString)
|
|
|
|
|
End Select
|
|
|
|
|
End If
|
2022-11-06 11:45:00 +00:00
|
|
|
|
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")
|
2022-11-24 15:51:51 +00:00
|
|
|
|
If Strings.AvailableFeature(35) Then
|
|
|
|
|
Select Case Strings.ComputerInfo(7)
|
|
|
|
|
Case 1
|
|
|
|
|
Dim DesktopColor As Integer
|
|
|
|
|
If File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\Shifter_Desktop.sos") = True Then
|
|
|
|
|
DesktopColor = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\Shifter_Desktop.sos")
|
|
|
|
|
GUISCustomizations.DesktopColor = Color.FromArgb(DesktopColor)
|
|
|
|
|
Else
|
|
|
|
|
GUISCustomizations.DesktopColor = Color.Black
|
|
|
|
|
End If
|
|
|
|
|
End Select
|
|
|
|
|
End If
|
2022-11-06 11:45:00 +00:00
|
|
|
|
End If
|
|
|
|
|
End Sub
|
2022-11-24 14:26:45 +00:00
|
|
|
|
End Module
|