mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 11:21:47 -05:00
minor moving fixes
This commit is contained in:
parent
0a2b03e312
commit
f96d01a788
12 changed files with 141 additions and 29 deletions
|
@ -3,6 +3,12 @@
|
|||
Module SaveLoadSystem
|
||||
|
||||
Public Sub NewGameMode()
|
||||
Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS", True)
|
||||
Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved", True)
|
||||
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS")
|
||||
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
|
||||
Strings.ComputerInfo(0) = "shiftos"
|
||||
Strings.ComputerInfo(1) = "user"
|
||||
Strings.ComputerInfo(2) = "0"
|
||||
Strings.ComputerInfo(4) = "0"
|
||||
Strings.AvailableFeature(0) = "2"
|
||||
|
@ -24,11 +30,16 @@ Module SaveLoadSystem
|
|||
'0.2.4 Features
|
||||
Strings.AvailableFeature(16) = "2"
|
||||
Strings.AvailableFeature(17) = "2"
|
||||
Strings.AvailableFeature(18) = "2"
|
||||
Strings.AvailableFeature(19) = "2"
|
||||
Strings.AvailableFeature(20) = "2"
|
||||
End Sub
|
||||
|
||||
Public Sub FreeRoamMode()
|
||||
Strings.ComputerInfo(0) = "shiftos"
|
||||
Strings.ComputerInfo(1) = "user"
|
||||
Strings.ComputerInfo(2) = "0"
|
||||
Strings.ComputerInfo(4) = "16"
|
||||
Strings.ComputerInfo(4) = "19"
|
||||
Strings.AvailableFeature(0) = "1"
|
||||
Strings.AvailableFeature(1) = "1"
|
||||
Strings.AvailableFeature(2) = "1"
|
||||
|
@ -48,9 +59,14 @@ Module SaveLoadSystem
|
|||
'0.2.4 Features
|
||||
Strings.AvailableFeature(16) = "1"
|
||||
Strings.AvailableFeature(17) = "1"
|
||||
Strings.AvailableFeature(18) = "1"
|
||||
Strings.AvailableFeature(19) = "1"
|
||||
Strings.AvailableFeature(20) = "1"
|
||||
End Sub
|
||||
|
||||
Public Sub GodMode()
|
||||
Strings.ComputerInfo(0) = "shiftos"
|
||||
Strings.ComputerInfo(1) = "user"
|
||||
Strings.ComputerInfo(2) = 9999
|
||||
Strings.ComputerInfo(4) = "0"
|
||||
Strings.AvailableFeature(0) = "2"
|
||||
|
@ -71,6 +87,9 @@ Module SaveLoadSystem
|
|||
'0.2.4 Features
|
||||
Strings.AvailableFeature(16) = "2"
|
||||
Strings.AvailableFeature(17) = "2"
|
||||
Strings.AvailableFeature(18) = "2"
|
||||
Strings.AvailableFeature(19) = "2"
|
||||
Strings.AvailableFeature(20) = "2"
|
||||
End Sub
|
||||
|
||||
Public Sub SaveGame()
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
End If
|
||||
End If
|
||||
End If
|
||||
If Strings.AvailableFeature(18) = "0" Then
|
||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "(shiftkey | 45 CP) ShiftKey"
|
||||
End If
|
||||
End If
|
||||
If Strings.AvailableFeature(5) = "0" Then
|
||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "(stime | 10 CP) Time by Seconds"
|
||||
Else
|
||||
|
@ -68,7 +72,6 @@
|
|||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Shiftorium_InformationFeatures()
|
||||
|
@ -203,6 +206,13 @@
|
|||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "A simple text-editor for ShiftOS" & Environment.NewLine & Environment.NewLine & ManHeader(1)
|
||||
Terminal.BadCommand = False
|
||||
End If
|
||||
Case "shiftkey"
|
||||
If Strings.AvailableFeature(18) = "0" Then
|
||||
ManHeader(0) = "ShiftKey"
|
||||
ManHeader(1) = "45 CP"
|
||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Recall the previous command on terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1)
|
||||
Terminal.BadCommand = False
|
||||
End If
|
||||
Case Else
|
||||
Terminal.BadCommand = False
|
||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
|
||||
|
@ -266,6 +276,9 @@
|
|||
Case "textpad"
|
||||
Shiftorium_InstallFeatures(True, "textpad", 17, 100)
|
||||
Terminal.BadCommand = False
|
||||
Case "shiftkey"
|
||||
Shiftorium_InstallFeatures(True, "shiftkey", 18, 45)
|
||||
Terminal.BadCommand = False
|
||||
Case Else
|
||||
Terminal.BadCommand = False
|
||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
|
||||
|
@ -291,6 +304,7 @@
|
|||
Case "print"
|
||||
Strings.AvailableFeature(2) = "1"
|
||||
Strings.AvailableFeature(3) = "0"
|
||||
Strings.AvailableFeature(18) = "0"
|
||||
success = True
|
||||
Case "termdspdrv"
|
||||
Strings.AvailableFeature(3) = "1"
|
||||
|
@ -353,6 +367,9 @@
|
|||
Case "textpad"
|
||||
Strings.AvailableFeature(17) = "1"
|
||||
success = True
|
||||
Case "shiftkey"
|
||||
Strings.AvailableFeature(18) = "1"
|
||||
success = True
|
||||
End Select
|
||||
If success = False Then
|
||||
If IsCLI = True Then
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Public Class Strings
|
||||
Public Shared OSInfo() As String
|
||||
Public Shared ComputerInfo(4) As String
|
||||
Public Shared ComputerInfo(6) As String
|
||||
Public Shared IsFree As Boolean
|
||||
Public Shared OnceInfo(6) As String
|
||||
Public Shared AvailableFeature(17) As String
|
||||
Public Shared AvailableFeature(18) As String
|
||||
Public Shared CLIInterpreter As String
|
||||
Public Shared SaveFile As String
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
'0 = IsRoot? (0.1) (default : No)
|
||||
'1 = RootDirectory (0.2.3) (default : Environment.SpecialDirectories.ApplicationData & "\ShiftOS\ShiftFS\")
|
||||
'2 = Infobar Boolean (0.2.3) (default : True)
|
||||
'3 = Color for Terminal (0.2.3) (default : 0F)
|
||||
'3 = Color for Terminal (0.2.3) (default : 0F) => moved to ComputerInfo(5)
|
||||
'4 = RootDirectoryString (0.2.3) (default : !)
|
||||
'5 = Terminal TrackPos (0.2.3) (default : 0)
|
||||
'6 = GameMode (0.2.3) (dependant)
|
||||
|
@ -41,6 +41,8 @@
|
|||
'2 = Codepoint (0.2) (default : 0)
|
||||
'3 = Story Chapter (0.2) (default : 0 for New Game)
|
||||
'4 = Installed Packages (0.2.3) (default : 0 for New Game)
|
||||
'5 = Color for Terminal (0.2.4) (default : 0F)
|
||||
'6 = Color for Infobar (0.2.4) (default : F0)
|
||||
'
|
||||
'AvailableFeature (Default is defined on the Story Mode, Free Mode automatically assigns every available feature to 1, Unavailable in the Shiftorium assigned as 2, Upgraded assigned as 3) Strings:
|
||||
'0 = MAN command [Manual on each command] (0.2) (default : 0)
|
||||
|
@ -61,12 +63,18 @@
|
|||
'15 = 4-bit Color Display [Adds to 16 colours support to the Display Driver] (0.2.3) (default : 0)
|
||||
'16 = Terminal Read-Only Memory Driver [ShiftOS Read-Only Memory support for HDD, SSD, etc.] (0.2.4) (default : 0)
|
||||
'17 = TextPad [Notepad] (0.2.4) (default : 0)
|
||||
'18 = ShiftKey [DOSKey for ShiftOS] (0.2.4) (default : 0)
|
||||
'19 = Custom Username [Custom username for ShiftOS] (0.2.4) (default : 0)
|
||||
'20 = Custom Hostname [Custom hostname for ShiftOS] (0.2.4) (default : 0)
|
||||
'
|
||||
'Features bought hierarchy :
|
||||
'ShiftOS Key (KEY) (5 CP)
|
||||
'>ShiftOS Help Manual (MAN) (10 CP)
|
||||
'>>Custom Username (USERNAME) (15 CP)
|
||||
'>>Custom Hostname (HOSTNAME) (15 CP)
|
||||
'>Terminal Clear (CLEAR) (20 CP)
|
||||
'>>Terminal Print (PRINT) (25 CP)
|
||||
'>>>ShiftKey (ShOSKey) (45 CP)
|
||||
'>>>Terminal Display Driver (TERMDSPDRV) (40 CP)
|
||||
'>>>>Terminal InfoBar (INFOBAR) (50 CP)
|
||||
'>>>>Shiftfetch (SHIFTFETCH) (55 CP)
|
||||
|
|
|
@ -15,6 +15,7 @@ Public Class Terminal
|
|||
Public StayAtChapter As Boolean = False
|
||||
Public ToolBarUse As Boolean = False
|
||||
Public ReleaseCursor As Boolean = False
|
||||
Public ShOSKey As String
|
||||
|
||||
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
|
@ -34,8 +35,6 @@ Public Class Terminal
|
|||
AssignPrompt()
|
||||
Else
|
||||
If StayAtChapter = True Then
|
||||
Strings.ComputerInfo(0) = "shiftos"
|
||||
Strings.ComputerInfo(1) = "user"
|
||||
LoadGame()
|
||||
CheckFeature()
|
||||
PrintPrompt()
|
||||
|
@ -46,8 +45,6 @@ Public Class Terminal
|
|||
StayAtChapter = True
|
||||
StoryOnlyTimer.Start()
|
||||
Else
|
||||
Strings.ComputerInfo(0) = "shiftos"
|
||||
Strings.ComputerInfo(1) = "user"
|
||||
LoadGame()
|
||||
CheckFeature()
|
||||
PrintPrompt()
|
||||
|
@ -227,6 +224,9 @@ Public Class Terminal
|
|||
End If
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "GUESS Runs 'Guess the Number' application"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "HELP Shows all commands available and its corresponding action"
|
||||
If Strings.AvailableFeature(4) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "INFOBAR Displays informations about current session such as current app, current user, current time, etc."
|
||||
End If
|
||||
If Strings.AvailableFeature(0) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "MAN Shows a command, its corresponding action, and its example usage"
|
||||
End If
|
||||
|
@ -271,10 +271,16 @@ Public Class Terminal
|
|||
TextBox1.Text = TextBox1.Text & Environment.NewLine
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "infobar"
|
||||
If Strings.AvailableFeature(4) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & My.Resources.man_infobar
|
||||
End If
|
||||
Case "pwd"
|
||||
If Strings.AvailableFeature(16) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & CurrentDirectory.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS", "!")
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "reboot"
|
||||
TextBox1.Text = Nothing
|
||||
AdvancedCommand = False
|
||||
|
@ -324,6 +330,7 @@ Public Class Terminal
|
|||
BadCommand = False
|
||||
Undeveloped()
|
||||
Case "shutdown", "shut down"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Saving game..."
|
||||
If Strings.OnceInfo(6) = "story" Then
|
||||
SaveGame()
|
||||
End If
|
||||
|
@ -484,6 +491,12 @@ Public Class Terminal
|
|||
TempUsage = TempUsage & "help"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_help & Environment.NewLine
|
||||
BadCommand = False
|
||||
Case "infobar"
|
||||
If Strings.AvailableFeature(4) = 1 Then
|
||||
TempUsage = TempUsage & "infbar [ON|OFF] [OPTION]"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_infobar & Environment.NewLine
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "man"
|
||||
If Strings.AvailableFeature(0) = "1" Then
|
||||
TempUsage = TempUsage & "man [command]"
|
||||
|
@ -502,6 +515,12 @@ Public Class Terminal
|
|||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_print & Environment.NewLine
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "pwd"
|
||||
If Strings.AvailableFeature(16) = "1" Then
|
||||
TempUsage = TempUsage & "pwd"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_pwd & Environment.NewLine
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "reboot"
|
||||
TempUsage = TempUsage & "reboot"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_reboot & Environment.NewLine
|
||||
|
@ -705,6 +724,9 @@ Public Class Terminal
|
|||
|
||||
Else
|
||||
ReadCommand()
|
||||
If Strings.AvailableFeature(18) = 1 Then
|
||||
ShOSKey_InputCommand(command)
|
||||
End If
|
||||
If ChangeInterpreter = True Then
|
||||
DoChildCommand()
|
||||
PrintPrompt()
|
||||
|
@ -764,8 +786,16 @@ Public Class Terminal
|
|||
'End If
|
||||
Case Keys.Up
|
||||
e.SuppressKeyPress = True
|
||||
If Strings.AvailableFeature(18) = 1 Then
|
||||
ShOSKey_Display()
|
||||
TextRebind()
|
||||
End If
|
||||
Case Keys.Down
|
||||
e.SuppressKeyPress = True
|
||||
If Strings.AvailableFeature(18) = 1 Then
|
||||
ShOSKey_Display()
|
||||
TextRebind()
|
||||
End If
|
||||
Case Else
|
||||
TrackPos = TrackPos + 1
|
||||
End Select
|
||||
|
|
|
@ -134,6 +134,7 @@ Module TerminalApps
|
|||
Terminal.CurrentInterpreter = "terminal"
|
||||
Terminal.CheckFeature()
|
||||
Terminal.AssignPrompt()
|
||||
Terminal.PrintPrompt()
|
||||
Terminal.TextRebind()
|
||||
End Select
|
||||
End Sub
|
||||
|
@ -257,6 +258,19 @@ Module TerminalApps
|
|||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ShOSKey_InputCommand(lastcommand As String)
|
||||
Terminal.ShOSKey = lastcommand
|
||||
End Sub
|
||||
|
||||
Public Sub ShOSKey_Display()
|
||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Terminal.ShOSKey
|
||||
Try
|
||||
Terminal.TrackPos = Terminal.ShOSKey.Length
|
||||
Catch ex As Exception
|
||||
Terminal.TrackPos = 0
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub TextPad_CheckExist(TxtFileName As String)
|
||||
If File.Exists(Terminal.CurrentDirectory & "\" & TxtFileName) = True Then
|
||||
Terminal.TextBox1.Text = My.Computer.FileSystem.ReadAllText(Terminal.CurrentDirectory & "\" & TxtFileName)
|
||||
|
|
|
@ -201,10 +201,11 @@
|
|||
Case "infobar"
|
||||
Terminal.InfoBar.BackColor = BgColor
|
||||
Terminal.InfoBar.ForeColor = FgColor
|
||||
Strings.ComputerInfo(6) = Bg & Fg
|
||||
Case "terminal"
|
||||
Terminal.TextBox1.BackColor = BgColor
|
||||
Terminal.TextBox1.ForeColor = FgColor
|
||||
Strings.OnceInfo(3) = Bg & Fg
|
||||
Strings.ComputerInfo(5) = Bg & Fg
|
||||
End Select
|
||||
End Sub
|
||||
End Module
|
||||
|
|
14
ShiftOS-TheRevival/My Project/Resources.Designer.vb
generated
14
ShiftOS-TheRevival/My Project/Resources.Designer.vb
generated
|
@ -164,6 +164,20 @@ Namespace My.Resources
|
|||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Displays informations about current session of Terminal such as current time, current application, current user, and current codepoint
|
||||
'''
|
||||
'''[OPTION] Option to do certain things regarding the Infobar
|
||||
'''COLOR [BG][FG] changes the infobar's color to the selected one
|
||||
'''[ON|OFF] Turning infobar on or off
|
||||
'''.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property man_infobar() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("man_infobar", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Shows up a manual on each corresponding command and its example of action
|
||||
'''
|
||||
|
|
|
@ -148,6 +148,9 @@
|
|||
<data name="man_help" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\help.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="man_infobar" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\infobar.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="man_man" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\man.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
|
@ -179,9 +182,9 @@
|
|||
<value>..\resources\man manuals\ver.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="MenuBanner1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShiftOS_MenuBanner1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<value>..\Resources\Menu Picture\ShiftOS_MenuBanner1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MenuBanner2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ShiftOS_MenuBanner2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<value>..\Resources\Menu Picture\ShiftOS_MenuBanner2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
5
ShiftOS-TheRevival/Resources/man Manuals/infobar.txt
Normal file
5
ShiftOS-TheRevival/Resources/man Manuals/infobar.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
Displays informations about current session of Terminal such as current time, current application, current user, and current codepoint
|
||||
|
||||
[OPTION] Option to do certain things regarding the Infobar
|
||||
COLOR [BG][FG] changes the infobar's color to the selected one
|
||||
[ON|OFF] Turning infobar on or off
|
|
@ -208,6 +208,7 @@
|
|||
<Content Include="Resources\man Manuals\dir.txt" />
|
||||
<Content Include="Resources\man Manuals\guess.txt" />
|
||||
<Content Include="Resources\man Manuals\help.txt" />
|
||||
<Content Include="Resources\man Manuals\infobar.txt" />
|
||||
<Content Include="Resources\man Manuals\man.txt" />
|
||||
<Content Include="Resources\man Manuals\mkdir.txt" />
|
||||
<Content Include="Resources\man Manuals\print.txt" />
|
||||
|
@ -218,8 +219,8 @@
|
|||
<Content Include="Resources\man Manuals\shiftorium.txt" />
|
||||
<Content Include="Resources\man Manuals\shutdown.txt" />
|
||||
<Content Include="Resources\man Manuals\ver.txt" />
|
||||
<None Include="Resources\ShiftOS_MenuBanner2.jpg" />
|
||||
<None Include="Resources\ShiftOS_MenuBanner1.jpg" />
|
||||
<None Include="Resources\Menu Picture\ShiftOS_MenuBanner2.jpg" />
|
||||
<None Include="Resources\Menu Picture\ShiftOS_MenuBanner1.jpg" />
|
||||
<Content Include="ShiftOS.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
|
|
Loading…
Reference in a new issue