finished shiftorium

This commit is contained in:
EverythingWindows 2022-11-03 02:46:32 +07:00
parent f8fc91385f
commit 0f683e5c35
5 changed files with 125 additions and 47 deletions

View file

@ -34,6 +34,8 @@ Public Class ShiftOSMenu
Case "Free Roam Mode" Case "Free Roam Mode"
Try Try
Strings.IsFree = True Strings.IsFree = True
Strings.AvailableFeature(0) = "0"
Strings.AvailableFeature(1) = "0"
Terminal.Show() Terminal.Show()
Close() Close()
Catch ex As Exception Catch ex As Exception

View file

@ -0,0 +1,31 @@
Module Shiftoriums
Public Sub InstallFeature(IsCLI As Boolean, Feature As String, Codepoint As Integer)
Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2))
If TempCP >= Codepoint Then
Dim success As Boolean = False
Select Case Feature
Case "man"
Strings.AvailableFeature(0) = "1"
success = True
Case "clear"
Strings.AvailableFeature(1) = "1"
success = True
End Select
If success = False Then
If IsCLI = True Then
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Invalid command or feature already installed"
End If
Else
TempCP = TempCP - Codepoint
Strings.ComputerInfo(2) = Convert.ToString(TempCP)
If IsCLI = True Then
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Feature has been install succesfully"
End If
End If
Else
If IsCLI = True Then
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Insufficent Codepoint"
End If
End If
End Sub
End Module

View file

@ -38,6 +38,6 @@
'1 = CLEAR command [Clearing the screen] (0.2) (default : 0) '1 = CLEAR command [Clearing the screen] (0.2) (default : 0)
' '
'Features bought hierarchy : 'Features bought hierarchy :
'MAN (20 CP) 'ShiftOS Help Manual (MAN) (20 CP)
'CLEAR (25 CP) 'Terminal Clear (CLEAR) (25 CP)
End Class End Class

View file

@ -75,6 +75,11 @@
Case "guess" Case "guess"
'AppHost("gtn") 'AppHost("gtn")
Undeveloped() Undeveloped()
Case "gimme"
Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2))
TempCP = TempCP + 50
Strings.ComputerInfo(2) = Convert.ToString(TempCP)
TextBox1.Text = TextBox1.Text & Environment.NewLine & "you cheater!"
Case "help" Case "help"
TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS Help Manual" & Environment.NewLine & Environment.NewLine & "You can type 'help' to get all available commands and its corresponding action." TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS Help Manual" & Environment.NewLine & Environment.NewLine & "You can type 'help' to get all available commands and its corresponding action."
If Strings.AvailableFeature(0) = 1 Then If Strings.AvailableFeature(0) = 1 Then
@ -83,7 +88,7 @@
TextBox1.Text = TextBox1.Text & Environment.NewLine TextBox1.Text = TextBox1.Text & Environment.NewLine
End If End If
If Strings.AvailableFeature(1) = 1 Then If Strings.AvailableFeature(1) = 1 Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "CLEAR Clear the terminal" TextBox1.Text = TextBox1.Text & Environment.NewLine & "CLEAR Clear the terminal"
End If End If
TextBox1.Text = TextBox1.Text & Environment.NewLine & "CODEPOINT Display Codepoint(s) from your wallet" TextBox1.Text = TextBox1.Text & Environment.NewLine & "CODEPOINT Display Codepoint(s) from your wallet"
TextBox1.Text = TextBox1.Text & Environment.NewLine & "HELP Shows all commands available and its corresponding action" TextBox1.Text = TextBox1.Text & Environment.NewLine & "HELP Shows all commands available and its corresponding action"
@ -117,58 +122,97 @@
If AdvancedCommand = True Then If AdvancedCommand = True Then
If command Like "man *" Then If command Like "man *" Then
'MAN command starts with this kinda format If Strings.AvailableFeature(0) = "1" Then
'ShiftOS Help Manual 'MAN command starts with this kinda format
' 'ShiftOS Help Manual
''command' Usage: [switch/value if needed] '
' ''command' Usage: [switch/value if needed]
'Summary of the command's action '
' 'Summary of the command's action
'Example usage : command '
TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS Help Manual" & Environment.NewLine 'Example usage : command
'TextBox1.Text = TextBox1.Text & Environment.NewLine & command.Substring(4) TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS Help Manual" & Environment.NewLine
Dim mancommand As String = command.Replace("man ", "") 'TextBox1.Text = TextBox1.Text & Environment.NewLine & command.Substring(4)
Dim TempUsage As String = "'" & mancommand & "' Usage: " Dim mancommand As String = command.Replace("man ", "")
Select Case mancommand Dim TempUsage As String = "'" & mancommand & "' Usage: "
Case "clear" Select Case mancommand
TempUsage = TempUsage & "clear" Case "clear"
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Clears all contents of the terminal" & Environment.NewLine TempUsage = TempUsage & "clear"
BadCommand = False TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Clears all contents of the terminal" & Environment.NewLine
Case "codepoint" BadCommand = False
TempUsage = TempUsage & "codepoint" Case "codepoint"
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Shows the value of codepoint in your wallet" & Environment.NewLine TempUsage = TempUsage & "codepoint"
BadCommand = False TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Shows the value of codepoint in your wallet" & Environment.NewLine
Case "help" BadCommand = False
TempUsage = TempUsage & "help" Case "help"
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Shows all commands available in the terminal and its brief explanation of action" & Environment.NewLine TempUsage = TempUsage & "help"
BadCommand = False TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Shows all commands available in the terminal and its brief explanation of action" & Environment.NewLine
Case "man" BadCommand = False
TempUsage = TempUsage & "man [command]" Case "man"
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Shows up a manual on each corresponding command and its example of action" & Environment.NewLine & Environment.NewLine & "[COMMAND] Any command that you want to get the manual for" & Environment.NewLine & Environment.NewLine & "Example: man help" TempUsage = TempUsage & "man [command]"
BadCommand = False TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Shows up a manual on each corresponding command and its example of action" & Environment.NewLine & Environment.NewLine & "[COMMAND] Any command that you want to get the manual for" & Environment.NewLine & Environment.NewLine & "Example: man help"
Case "shutdown" BadCommand = False
TempUsage = TempUsage & "shutdown" Case "shutdown"
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Terminate ShiftOS session" & Environment.NewLine TempUsage = TempUsage & "shutdown"
BadCommand = False TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Terminate ShiftOS session" & Environment.NewLine
Case "ver" BadCommand = False
TempUsage = TempUsage & "ver" Case "ver"
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Displays current version of ShiftOS TheRevival" & Environment.NewLine TempUsage = TempUsage & "ver"
BadCommand = False TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & "Displays current version of ShiftOS TheRevival" & Environment.NewLine
Case Else BadCommand = False
TextBox1.Text = TextBox1.Text & Environment.NewLine & "MAN : Invalid command" Case Else
End Select TextBox1.Text = TextBox1.Text & Environment.NewLine & "MAN : Invalid command"
End Select
End If
End If End If
If command Like "shiftorium *" Then If command Like "shiftorium *" Then
Dim prompt As String = command.Replace("shiftorium ", "") Dim prompt As String = command.Replace("shiftorium ", "")
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Shiftorium ShiftOS Center"
If prompt Like "info *" Then If prompt Like "info *" Then
prompt = command.Replace("shiftorium info ", "")
'ManHeader is for the ShiftOS Help Manual header and the 'Cost' footer, kinda like template-ish
Dim ManHeader(1) As String
'ManHeader(0) = Insert any feature here for the Case prompt
ManHeader(1) = "Cost: "
Select Case prompt
Case "man"
ManHeader(0) = "ShiftOS Help Manual (command: man)"
ManHeader(1) = "20 CP"
TextBox1.Text = TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows up any further help instruction on each command, its corresponding action and its example if necessary" & Environment.NewLine & Environment.NewLine & ManHeader(1)
BadCommand = False
Case "clear"
ManHeader(0) = "Clear Terminal Screen (command: clear)"
ManHeader(1) = "25 CP"
TextBox1.Text = TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Clears the terminal screen" & Environment.NewLine & Environment.NewLine & ManHeader(1)
BadCommand = False
Case Else
BadCommand = False
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
End Select
End If End If
If prompt Like "install *" Then If prompt Like "install *" Then
prompt = command.Replace("shiftorium install ", "")
Select Case prompt
Case "man"
InstallFeature(True, "man", 20)
BadCommand = False
Case "clear"
InstallFeature(True, "clear", 25)
BadCommand = False
Case Else
BadCommand = False
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
End Select
End If End If
If prompt = "list" Then If prompt = "list" Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Shiftorium Available Feature(s)" & Environment.NewLine
If Strings.AvailableFeature(0) = "0" Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS Help Manual (20 CP)"
End If
If Strings.AvailableFeature(1) = "0" Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Clear Terminal Screen (25 CP)"
End If
BadCommand = False
End If End If
End If End If
If command Like "print *" Then If command Like "print *" Then

View file

@ -99,6 +99,7 @@
<Compile Include="MainForms\BugSlap.vb"> <Compile Include="MainForms\BugSlap.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="MainForms\Shiftoriums.vb" />
<Compile Include="MainForms\ShiftOSMenu.vb"> <Compile Include="MainForms\ShiftOSMenu.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>