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"
Try
Strings.IsFree = True
Strings.AvailableFeature(0) = "0"
Strings.AvailableFeature(1) = "0"
Terminal.Show()
Close()
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)
'
'Features bought hierarchy :
'MAN (20 CP)
'CLEAR (25 CP)
'ShiftOS Help Manual (MAN) (20 CP)
'Terminal Clear (CLEAR) (25 CP)
End Class

View file

@ -75,6 +75,11 @@
Case "guess"
'AppHost("gtn")
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"
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
@ -117,6 +122,7 @@
If AdvancedCommand = True Then
If command Like "man *" Then
If Strings.AvailableFeature(0) = "1" Then
'MAN command starts with this kinda format
'ShiftOS Help Manual
'
@ -157,18 +163,56 @@
Case Else
TextBox1.Text = TextBox1.Text & Environment.NewLine & "MAN : Invalid command"
End Select
End If
End If
If command Like "shiftorium *" Then
Dim prompt As String = command.Replace("shiftorium ", "")
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Shiftorium ShiftOS Center"
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
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
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
If command Like "print *" Then

View file

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