From be79ac82e2a542d21f15222119be99051f32dfa8 Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Thu, 17 Nov 2022 11:22:51 +0700 Subject: More structured in functions --- .../Functions/InGame/CodepointSystem.vb | 11 - ShiftOS-TheRevival/Functions/InGame/ColorSystem.vb | 165 ----- .../Functions/InGame/IntroStoryTell.vb | 41 -- .../Functions/InGame/LoreManager/IntroStoryTell.vb | 41 ++ .../Functions/InGame/ROMs/Strings.vb | 118 ++++ ShiftOS-TheRevival/Functions/InGame/Shiftoriums.vb | 684 --------------------- .../Functions/InGame/StoreManager/Shiftoriums.vb | 684 +++++++++++++++++++++ ShiftOS-TheRevival/Functions/InGame/Strings.vb | 118 ---- .../InGame/SystemManager/CodepointSystem.vb | 11 + .../Functions/InGame/SystemManager/ColorSystem.vb | 165 +++++ .../Functions/InGame/SystemManager/Terminate.vb | 15 + ShiftOS-TheRevival/Functions/InGame/Terminate.vb | 15 - 12 files changed, 1034 insertions(+), 1034 deletions(-) delete mode 100644 ShiftOS-TheRevival/Functions/InGame/CodepointSystem.vb delete mode 100644 ShiftOS-TheRevival/Functions/InGame/ColorSystem.vb delete mode 100644 ShiftOS-TheRevival/Functions/InGame/IntroStoryTell.vb create mode 100644 ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb create mode 100644 ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb delete mode 100644 ShiftOS-TheRevival/Functions/InGame/Shiftoriums.vb create mode 100644 ShiftOS-TheRevival/Functions/InGame/StoreManager/Shiftoriums.vb delete mode 100644 ShiftOS-TheRevival/Functions/InGame/Strings.vb create mode 100644 ShiftOS-TheRevival/Functions/InGame/SystemManager/CodepointSystem.vb create mode 100644 ShiftOS-TheRevival/Functions/InGame/SystemManager/ColorSystem.vb create mode 100644 ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb delete mode 100644 ShiftOS-TheRevival/Functions/InGame/Terminate.vb (limited to 'ShiftOS-TheRevival/Functions') diff --git a/ShiftOS-TheRevival/Functions/InGame/CodepointSystem.vb b/ShiftOS-TheRevival/Functions/InGame/CodepointSystem.vb deleted file mode 100644 index 6a76a28..0000000 --- a/ShiftOS-TheRevival/Functions/InGame/CodepointSystem.vb +++ /dev/null @@ -1,11 +0,0 @@ -Module CodepointSystem - Public Sub ChangeCP(Addition As Boolean, NeededCP As Integer) - Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) - If Addition = True Then - TempCP = TempCP + NeededCP - Else - TempCP = TempCP - NeededCP - End If - Strings.ComputerInfo(2) = Convert.ToString(TempCP) - End Sub -End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/ColorSystem.vb b/ShiftOS-TheRevival/Functions/InGame/ColorSystem.vb deleted file mode 100644 index 80f1c8f..0000000 --- a/ShiftOS-TheRevival/Functions/InGame/ColorSystem.vb +++ /dev/null @@ -1,165 +0,0 @@ -Module ColorSystem - 'GUIDE to COLORS in TERMINAL - 'Using the same Hexadecimal numbering as what Command Prompt used to: - '0 = Black 8 = Gray - '1 = Blue 9 = Light Blue - '2 = Green A = Light Green - '3 = Aqua B = Light Aqua - '4 = Red C = Light Red - '5 = Purple D = Light Purple - '6 = Yellow E = Yellow - '7 = Dark Gray F = White - Public BgColor As Color - Public FgColor As Color - - Public Sub GetColor(App As String, Bg As String, Fg As String) - Select Case App - Case "terminal" - BgColor = Color.Black - FgColor = Color.White - Case "infobar" - BgColor = Color.White - FgColor = Color.Black - End Select - If Bg = Fg Then - NewLine("Background and Foreground Color cannot be same!") - Else - If Strings.AvailableFeature(10) = "1" Then - Select Case Bg - Case "0" - BgColor = Color.Black - Case "7" - BgColor = Color.Silver - Case "8" - BgColor = Color.Gray - Case "f" - BgColor = Color.White - Case "2", "9", "c" - If Strings.AvailableFeature(13) = "1" Then - Select Case Bg - Case "2" - BgColor = Color.Green - Case "9" - BgColor = Color.Blue - Case "c" - BgColor = Color.Red - End Select - Else - NewLine("One or two colors you selected is not available.") - End If - Case "1", "4", "a" - If Strings.AvailableFeature(14) = "1" Then - Select Case Bg - Case "1" - BgColor = Color.Navy - Case "4" - BgColor = Color.Maroon - Case "a" - BgColor = Color.Lime - End Select - Else - NewLine("One or two colors you selected is not available.") - End If - Case "3", "5", "6", "b", "d", "e" - If Strings.AvailableFeature(15) = "1" Then - Select Case Bg - Case "3" - BgColor = Color.Cyan - Case "5" - BgColor = Color.Magenta - Case "6" - BgColor = Color.Brown - Case "b" - BgColor = Color.Aqua - Case "d" - BgColor = Color.Fuchsia - Case "e" - BgColor = Color.Yellow - End Select - Else - NewLine("One or two colors you selected is not available.") - End If - Case Else - BgColor = Color.Black - End Select - Select Case Fg - Case "0" - FgColor = Color.Black - Case "7" - FgColor = Color.Silver - Case "8" - FgColor = Color.Gray - Case "f" - FgColor = Color.White - Case "2", "9", "c" - If Strings.AvailableFeature(13) = "1" Then - Select Case Fg - Case "2" - FgColor = Color.Green - Case "9" - FgColor = Color.Blue - Case "c" - FgColor = Color.Red - End Select - Else - NewLine("One or two colors you selected is not available.") - End If - Case "1", "4", "a" - If Strings.AvailableFeature(14) = "1" Then - Select Case Fg - Case "1" - FgColor = Color.Navy - Case "4" - FgColor = Color.Maroon - Case "a" - FgColor = Color.Lime - End Select - Else - NewLine("One or two colors you selected is not available.") - End If - Case "3", "5", "6", "b", "d", "e" - If Strings.AvailableFeature(15) = "1" Then - Select Case Fg - Case "3" - FgColor = Color.Cyan - Case "5" - FgColor = Color.Magenta - Case "6" - FgColor = Color.Brown - Case "b" - FgColor = Color.Aqua - Case "d" - FgColor = Color.Fuchsia - Case "e" - FgColor = Color.Yellow - End Select - Else - NewLine("One or two colors you selected is not available.") - End If - Case Else - FgColor = Color.White - End Select - Else - NewLine("Color is not supported for 1-bit Color Display") - Select Case App - Case "terminal" - BgColor = Color.Black - FgColor = Color.White - Case "infobar" - BgColor = Color.White - FgColor = Color.Black - End Select - End If - End If - Select Case App - Case "infobar" - Console.InfoBar.BackColor = BgColor - Console.InfoBar.ForeColor = FgColor - Strings.ComputerInfo(6) = Bg & Fg - Case "terminal" - Console.TextBox1.BackColor = BgColor - Console.TextBox1.ForeColor = FgColor - Strings.ComputerInfo(5) = Bg & Fg - End Select - End Sub -End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/IntroStoryTell.vb b/ShiftOS-TheRevival/Functions/InGame/IntroStoryTell.vb deleted file mode 100644 index 048b61f..0000000 --- a/ShiftOS-TheRevival/Functions/InGame/IntroStoryTell.vb +++ /dev/null @@ -1,41 +0,0 @@ -Module IntroStoryTell - Public Sub StoryLineIntro(Timestamp As Integer) - Select Case Strings.ComputerInfo(3) - Case "0" - Select Case Timestamp - Case 5 - ResetLine("Connected to ") - Case 25 - NewLine(": Hey there, Unknown user!") - Case 60 - NewLine(": Congratulaions! You have been involuntarily selected for a test on my experimental operating system, ShiftOS.") - Case 125 - NewLine(": ShiftOS is an operating system that will evolve itself as you use it as I progressively add more features into ShiftOS.") - Case 160 - NewLine(": Currently ShiftOS isn't much from a basic command-line operating system.") - Case 210 - NewLine(": I don't wish to reveal my indentity at this point in time.") - Case 270 - NewLine(": I will install ShiftOS on your system once I leave while I work on... something else.") - Case 335 - NewLine(": Once you have ShiftOS rich feature enough, I will come back to you. In the mean time, goodbye!") - Case 400 - NewLine(" Disconnected") - Case 430 - ResetLine("Installing ShiftOS...") - Case 550 - ResetLine("ShiftOS Installed, The computer will restart in a few seconds") - Case 600 - Console.StoryOnlyTimer.Stop() - Console.TextBox1.Text = Nothing - Console.TextBox1.ReadOnly = False - Strings.ComputerInfo(0) = "shiftos" - Strings.ComputerInfo(1) = "user" - Console.CheckFeature() - Terminal_PrintPrompt() - Terminal_AssignPrompt() - TextRebind() - End Select - End Select - End Sub -End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb b/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb new file mode 100644 index 0000000..048b61f --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/LoreManager/IntroStoryTell.vb @@ -0,0 +1,41 @@ +Module IntroStoryTell + Public Sub StoryLineIntro(Timestamp As Integer) + Select Case Strings.ComputerInfo(3) + Case "0" + Select Case Timestamp + Case 5 + ResetLine("Connected to ") + Case 25 + NewLine(": Hey there, Unknown user!") + Case 60 + NewLine(": Congratulaions! You have been involuntarily selected for a test on my experimental operating system, ShiftOS.") + Case 125 + NewLine(": ShiftOS is an operating system that will evolve itself as you use it as I progressively add more features into ShiftOS.") + Case 160 + NewLine(": Currently ShiftOS isn't much from a basic command-line operating system.") + Case 210 + NewLine(": I don't wish to reveal my indentity at this point in time.") + Case 270 + NewLine(": I will install ShiftOS on your system once I leave while I work on... something else.") + Case 335 + NewLine(": Once you have ShiftOS rich feature enough, I will come back to you. In the mean time, goodbye!") + Case 400 + NewLine(" Disconnected") + Case 430 + ResetLine("Installing ShiftOS...") + Case 550 + ResetLine("ShiftOS Installed, The computer will restart in a few seconds") + Case 600 + Console.StoryOnlyTimer.Stop() + Console.TextBox1.Text = Nothing + Console.TextBox1.ReadOnly = False + Strings.ComputerInfo(0) = "shiftos" + Strings.ComputerInfo(1) = "user" + Console.CheckFeature() + Terminal_PrintPrompt() + Terminal_AssignPrompt() + TextRebind() + End Select + End Select + End Sub +End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb new file mode 100644 index 0000000..0bbada4 --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb @@ -0,0 +1,118 @@ +Public Class Strings + Public Shared OSInfo() As String + Public Shared ComputerInfo(6) As String + Public Shared IsFree As Boolean + Public Shared OnceInfo(8) As String + Public Shared AvailableFeature(31) As String + Public Shared CLIInterpreter As String + Public Shared SaveFile As String + Public Shared Achievement As String + + 'STRING CATEGORIZATION WRITING RULES! + 'THIS IS IN ORDER TO REMAIN COMPATIBLE WITH OLDER VERSIONS! + ' + 'General string : + '(Row Number) = Function/Subject (default value : default) + ' + 'Each have to placed in numerical order + 'If there's moved strings for newer version, example: + '0 = Computer Name (0.1) => OS Version (0.2) => Root Location (0.3), etc. + 'If there's removed strings for newer version, example: + '69 = Secret Easter Egg (removed in 0.420) + 'If there's repurposed strings for newer version after removed, example: + '5 = FreeRoam enabled? (removed in 0.4) => Story Mode State + ' + 'ALWAYS WRITE THE NOTES IN COMMENTS, THIS CLASS ONLY IS FOR STORING STRINGS AND DEPLOYING STRINGS TO DISK + + 'OSInfo Strings: + '0 = OSVersion (default : dependant) + ' + 'OnceInfo Strings: + '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) => moved to ComputerInfo(5) + '4 = RootDirectoryString (0.2.3) (default : !) + '5 = Terminal TrackPos (0.2.3) (default : 0) + '6 = GameMode (0.2.3) (dependant) + '7 = MaxWidth (0.2.4) (depentant) + '8 = MaxHeight (0.2.4) (depentant) + ' + 'ComputerInfo Strings: + '0 = Computer Name (0.1) (default : shiftos) + '1 = Username (0.1) (default : user) + '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) + '1 = CLEAR command [Clearing the screen] (0.2) (default : 0) + '2 = PRINT command [Printing a string] (0.2.2) (default : 0) + '3 = Terminal Display Driver [Dependencies for advanced terminal applications] (0.2.2) (default : 0) + '4 = Terminal InfoBar [A panel bar at the bottom of the terminal to show 'Time', 'User Session', 'Codepoint', 'Program running'] (0.2.2) (default : 0) + '5 = Time by Second [Showing time in seconds form since midnight] (0.2.2) (default : 0) + '6 = Time by Minutes [Showing time in minutes form since midnight] (0.2.2) (default : 0) + '7 = Time by Hours [Showing time in hours form since midnight] (0.2.2) (default : 0) + '8 = Shiftfetch [ShiftOS port of Neofetch, A command-line system information tool] (0.2.3) (default : 0) + '9 = bc [Basic Calculator for ShiftOS] (0.2.3) (default : 0) + '10 = 2-bit Color Display [Adds Dark Gray and Light Gray support to the Display Driver] (0.2.3) (default : 0) + '11 = ShiftOS Key [A key to unlock advanced features on ShiftOS] (0.2.3) (default : 0) + '12 = Time by PM and AM [Showing time in hours form since midnight] (0.2.3) (default : 0) + '13 = Red, Green, Blue [Adds Red, Green, and Blue support to the Display Driver] (0.2.3) (default : 0) + '14 = RGB Variant [Adds lighter or darker variant of Red, Green, and Blue] (0.2.3) (default : 0) + '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) + '21 = Reverse String [Reverse a text] (0.2.4) (default : 0) + '22 = Cowsay [Cowsay] (0.2.4) (default : 0) + '23 = Time by Hours and Minutes [Shows time in Hours and Minutes format] (0.2.5) (default : 0) + '24 = Date command [Shows date in days since first day of the year format] (0.2.5) (default : 0) + '25 = Date by week [Shows date in weeks since first week of the year format] (0.2.5) (default : 0) + '26 = Date by month [Shows date in months since first month of the year format] (0.2.5) (default : 0) + '27 = Date by year [Shows date in year format] (0.2.5) (default : 0) + '28 = Date by month and year [Shows date in MM/YYYY format] (0.2.5) (default : 0) + '29 = Date by general [Shows date in general DD/MM/YYYY format] (0.2.5) (default : 0) + '30 = Batch-file support for ShiftOS [Gives execution support for ShiftOS Script File (.scr)] (0.2.5) (default : 0) + '31 = Clipboard support for ShiftOS [Gives clipboard support for copy-pasting in ShiftOS] (0.2.6) (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) + '>>>Reverse String command (REV) (30 CP) + '>>>>Cowsay (50 CP) + '>>>>Fortune command (55 CP) + '>>>ShiftKey (ShOSKey) (45 CP) + '>>>Terminal Display Driver (TERMDSPDRV) (40 CP) + '>>>>Terminal InfoBar (INFOBAR) (50 CP) + '>>>>Shiftfetch (SHIFTFETCH) (55 CP) + '>>>>2-bit Color Display (2BITCOLOR) (60 CP) + '>>>>>Red, Green, Blue (rgb) (70 CP) + '>>>>>>RGB Variant (rgb2) (75 CP) + '>>>>>>>4-bit Color Display (4BITCOLOR) (80 CP) + '>>>>>>>>Terminal Read-Only Memory Driver (ROMDRIVER, DIR, MKDIR, RMDIR, CD, PWD) (90 CP) + '>>>>>>>>>TextPad (100 CP) + '>>>>>>>>>>Clipboard support (CLIPBOARD) (100 CP) + '>>>>>>>>>>ShiftOS Batch Script Support (BATCHSCRIPT) (100 CP) + '>>Basic Calculator (BC) (55 CP) + '>>Time by Seconds (TIME, STIME) (10 CP) + '>>>Time by Minutes (TIME, MTIME) (20 CP) + '>>>>Time by Hours (Time, HTIME) (30 CP) + '>>>>>PM and AM (Time, PMAM (40 CP)) + '>>>>>>Time by Hours and Minutes (Time, HHMM (50 CP)) + '>>>>>>>Date command (DATE (70 CP)) + '>>>>>>>>Date by week (DATE, WOY (75 CP)) + '>>>>>>>>>Date by month (DATE, MOY (80 CP)) + '>>>>>>>>>>Date by year (DATE, YEAR (85 CP)) + '>>>>>>>>>>>Date by month and year (DATE, MMYYYY (90 CP)) + '>>>>>>>>>>>>Date by general (DATE, GENERALDATE (95 CP)) +End Class diff --git a/ShiftOS-TheRevival/Functions/InGame/Shiftoriums.vb b/ShiftOS-TheRevival/Functions/InGame/Shiftoriums.vb deleted file mode 100644 index 89a1e77..0000000 --- a/ShiftOS-TheRevival/Functions/InGame/Shiftoriums.vb +++ /dev/null @@ -1,684 +0,0 @@ -Module Shiftoriums - Public prompt As String - - Public Sub Shiftorium_ListFeatures() - 'Shows available installable feature on Shiftorium - 'Only AvailableFeature that are in the value of 0 can be displayed in the list - NewLine("Shiftorium Available Feature(s)") - NewLine(Nothing) - If Strings.AvailableFeature(11) = "0" Then - NewLine("(key | 5 CP) ShiftOS Key") - Else - If Strings.AvailableFeature(0) = "0" Then - NewLine("(man | 10 CP) ShiftOS Help Manual") - Else - If Strings.AvailableFeature(19) = "0" Then - NewLine("(username | 15 CP) Custom Username") - End If - If Strings.AvailableFeature(20) = "0" Then - NewLine("(hostname | 15 CP) Custom hostname") - End If - End If - If Strings.AvailableFeature(1) = "0" Then - NewLine("(clear | 20 CP) Clear Terminal Screen") - Else - If Strings.AvailableFeature(2) = "0" Then - NewLine("(print | 25 CP) Print Terminal Screen") - Else - If Strings.AvailableFeature(3) = "0" Then - NewLine("(termdspdrv | 40 CP) Terminal Display Driver") - Else - If Strings.AvailableFeature(4) = "0" Then - NewLine("(infobar | 50 CP) Terminal InfoBar") - End If - If Strings.AvailableFeature(8) = "0" Then - NewLine("(shiftfetch | 55 CP) Shiftfetch") - End If - If Strings.AvailableFeature(10) = "0" Then - NewLine("(2bitcolor | 60 CP) 2-bit Color Support") - Else - If Strings.AvailableFeature(13) = "0" Then - NewLine("(rgb | 70 CP) Red, Green, and Blue") - Else - If Strings.AvailableFeature(14) = "0" Then - NewLine("(rgb2 | 75 CP) RGB Variant") - Else - If Strings.AvailableFeature(15) = "0" Then - NewLine("(4bitcolor | 80 CP) 4-bit Color Support") - Else - If Strings.AvailableFeature(16) = "0" Then - NewLine("(romdriver | 90 CP) Terminal Read-Only Memory Support") - Else - If Strings.AvailableFeature(17) = "0" Then - NewLine("(textpad | 100 CP) TextPad") - Else - If Strings.AvailableFeature(30) = "0" Then - NewLine("(batchscript | 100 CP) ShiftOS Batch Script Support") - End If - If Strings.AvailableFeature(31) = "0" Then - NewLine("(clipboard | 100 CP) Clipboard support") - End If - End If - End If - End If - End If - End If - End If - End If - If Strings.AvailableFeature(18) = "0" Then - NewLine("(shiftkey | 45 CP) ShiftKey") - End If - If Strings.AvailableFeature(21) = "0" Then - NewLine("(rev | 30 CP) Reverse String") - Else - If Strings.AvailableFeature(22) = "0" Then - NewLine("(cowsay | 50 CP) Cowsay") - End If - End If - End If - If Strings.AvailableFeature(5) = "0" Then - NewLine("(stime | 10 CP) Time by Seconds") - Else - If Strings.AvailableFeature(6) = "0" Then - NewLine("(mtime | 20 CP) Time by Minutes") - Else - If Strings.AvailableFeature(7) = "0" Then - NewLine("(htime | 30 CP) Time by Hours") - Else - If Strings.AvailableFeature(12) = "0" Then - NewLine("(pmam | 40 CP) PM and AM") - Else - If Strings.AvailableFeature(23) = "0" Then - NewLine("(hhmm | 50 CP) Time by Hours and Minutes") - Else - If Strings.AvailableFeature(24) = "0" Then - NewLine("(date | 70 CP) Date command") - Else - If Strings.AvailableFeature(25) = "0" Then - NewLine("(woy | 75 CP) Date by week of year") - Else - If Strings.AvailableFeature(26) = "0" Then - NewLine("(moy | 80 CP) Date by month of year") - Else - If Strings.AvailableFeature(27) = "0" Then - NewLine("(year | 85 CP) Date by year") - Else - If Strings.AvailableFeature(28) = "0" Then - NewLine("(mmyyyy | 90 CP) Date by month and year") - Else - If Strings.AvailableFeature(29) = "0" Then - NewLine("(generaldate | 95 CP) Date by general format") - End If - End If - End If - End If - End If - End If - End If - End If - End If - End If - End If - If Strings.AvailableFeature(9) = "0" Then - NewLine("(bc | 55 CP) Basic Calculator") - End If - End If - End If - End Sub - - Public Sub Shiftorium_InformationFeatures() - '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" - If Strings.AvailableFeature(0) = "0" Then - ManHeader(0) = "ShiftOS Help Manual (command: man)" - ManHeader(1) = "10 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Shows up any further help instruction on each command, its corresponding action and its example if necessary") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "clear" - If Strings.AvailableFeature(1) = "0" Then - ManHeader(0) = "Clear Terminal Screen (command: clear)" - ManHeader(1) = "20 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Clears the terminal screen" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "print" - If Strings.AvailableFeature(2) = "0" Then - ManHeader(0) = "Print Command (command: print)" - ManHeader(1) = "25 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Prints a corresponding text entered in the command" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "termdspdrv" - If Strings.AvailableFeature(3) = "0" Then - ManHeader(0) = "Terminal Display Driver" - ManHeader(1) = "40 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Display driver for ShiftOS' Terminal to utilize advantages such as Infobar, ASCII-based applications" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "infobar" - If Strings.AvailableFeature(4) = "0" Then - ManHeader(0) = "Terminal InfoBar" - ManHeader(1) = "50 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Panel bar at the bottom of the terminal to display basic informations" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "stime" - If Strings.AvailableFeature(5) = "0" Then - ManHeader(0) = "Time by Seconds" - ManHeader(1) = "10 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in seconds form since midnight" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "stime" - If Strings.AvailableFeature(6) = "0" Then - ManHeader(0) = "Time by Minutes" - ManHeader(1) = "20 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in minutes form since midnight" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "htime" - If Strings.AvailableFeature(7) = "0" Then - ManHeader(0) = "Time by Hours" - ManHeader(1) = "30 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in hours form since midnight" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "shiftfetch" - If Strings.AvailableFeature(8) = "0" Then - ManHeader(0) = "Shiftfetch" - ManHeader(1) = "55 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "ShiftOS port of Neofetch, A command-line system information tool" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "bc" - If Strings.AvailableFeature(9) = "0" Then - ManHeader(0) = "Basic Calculator" - ManHeader(1) = "55 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Basic Calculator for simple calculation" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "2bitcolor" - If Strings.AvailableFeature(10) = "0" Then - ManHeader(0) = "2-bit Color Support" - ManHeader(1) = "60 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds 2 colours (Dark Gray, Light Gray) supports to the terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "key" - If Strings.AvailableFeature(11) = "0" Then - ManHeader(0) = "ShiftOS Key" - ManHeader(1) = "5 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "An encryption key to unlock advanced terminal feature for ShiftOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "pmam" - If Strings.AvailableFeature(12) = "0" Then - ManHeader(0) = "PM and AM" - ManHeader(1) = "40 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in PM and AM format" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "rgb" - If Strings.AvailableFeature(13) = "0" Then - ManHeader(0) = "Red, Green, and Blue" - ManHeader(1) = "70 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds Red, Green, and Blue support to the Display Driver" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "rgb2" - If Strings.AvailableFeature(14) = "0" Then - ManHeader(0) = "RGB Variant" - ManHeader(1) = "75 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds lighter or darker variant of Red, Green, and Blue" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "4bitcolor" - If Strings.AvailableFeature(15) = "0" Then - ManHeader(0) = "4-bit Color Display" - ManHeader(1) = "80 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds to 16 colours support to the Display Driver" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "romdriver" - If Strings.AvailableFeature(16) = "0" Then - ManHeader(0) = "Terminal Read-Only Memory Driver" - ManHeader(1) = "90 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "ShiftOS Read-Only Memory support for ShiftOS such as writing and reading permanent memory such as HDD, SDD, etc." & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "textpad" - If Strings.AvailableFeature(17) = "0" Then - ManHeader(0) = "TextPad" - ManHeader(1) = "100 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "A simple text-editor for ShiftOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "shiftkey" - If Strings.AvailableFeature(18) = "0" Then - ManHeader(0) = "ShiftKey" - ManHeader(1) = "45 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Recall the previous command on terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "username" - If Strings.AvailableFeature(19) = "0" Then - ManHeader(0) = "Custom Username" - ManHeader(1) = "15 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Set custom username for ShfitOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "hostname" - If Strings.AvailableFeature(20) = "0" Then - ManHeader(0) = "Custom Hostname" - ManHeader(1) = "15 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Set custom hostname/computer name for ShfitOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "rev" - If Strings.AvailableFeature(21) = "0" Then - ManHeader(0) = "Reverse String" - ManHeader(1) = "30 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Reverse any text you entered in the terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "cowsay" - If Strings.AvailableFeature(22) = "0" Then - ManHeader(0) = "Cowsay" - ManHeader(1) = "50 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Make the ASCII cow say anything you want to" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "hhmm" - If Strings.AvailableFeature(23) = "0" Then - ManHeader(0) = "Time by Hours and Minutes" - ManHeader(1) = "50 CP" - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in Hours and Minutes format" & Environment.NewLine & Environment.NewLine & ManHeader(1) - Console.BadCommand = False - End If - Case "date" - If Strings.AvailableFeature(24) = "0" Then - ManHeader(0) = "Date command" - ManHeader(1) = "70 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Displays date in days format since first day of the year") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "woy" - If Strings.AvailableFeature(25) = "0" Then - ManHeader(0) = "Date by week of year" - ManHeader(1) = "75 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Displays date in week format since first week of the year") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "moy" - If Strings.AvailableFeature(26) = "0" Then - ManHeader(0) = "Date by month of year" - ManHeader(1) = "80 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Displays date in month format since first month of the year") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "year" - If Strings.AvailableFeature(27) = "0" Then - ManHeader(0) = "Date by year" - ManHeader(1) = "85 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Displays date in year format") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "mmyyyy" - If Strings.AvailableFeature(28) = "0" Then - ManHeader(0) = "Date by month and year" - ManHeader(1) = "90 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Displays date in month and year format") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "generaldate" - If Strings.AvailableFeature(29) = "0" Then - ManHeader(0) = "Date by general format" - ManHeader(1) = "95 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Displays date in DD/MM/YYYY format") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "batchscript" - If Strings.AvailableFeature(30) = "0" Then - ManHeader(0) = "ShiftOS Batch Script Support" - ManHeader(1) = "100 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Adds the supports for ShiftOS Batch Script") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case "clipboard" - If Strings.AvailableFeature(31) = "0" Then - ManHeader(0) = "Clipboard Support" - ManHeader(1) = "100 CP" - NewLine(ManHeader(0)) - NewLine(Nothing) - NewLine("Adds the supports for clipboard") - NewLine(Nothing) - NewLine(ManHeader(1)) - Console.BadCommand = False - End If - Case Else - Console.BadCommand = False - Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available" - End Select - End Sub - - Public Sub Shiftorium_DetectInstallFeatures() - NewLine("Installing feature...") - Select Case prompt - Case "man" - Shiftorium_InstallFeatures(True, "man", 0, 10) - Console.BadCommand = False - Case "clear" - Shiftorium_InstallFeatures(True, "clear", 1, 20) - Console.BadCommand = False - Case "print" - Shiftorium_InstallFeatures(True, "print", 2, 25) - Console.BadCommand = False - Case "termdspdrv" - Shiftorium_InstallFeatures(True, "termdspdrv", 3, 40) - Console.BadCommand = False - Case "infobar" - Shiftorium_InstallFeatures(True, "infobar", 4, 50) - Console.BadCommand = False - Case "stime" - Shiftorium_InstallFeatures(True, "stime", 5, 10) - Console.BadCommand = False - Case "mtime" - Shiftorium_InstallFeatures(True, "mtime", 6, 20) - Console.BadCommand = False - Case "htime" - Shiftorium_InstallFeatures(True, "htime", 7, 30) - Console.BadCommand = False - Case "shiftfetch" - Shiftorium_InstallFeatures(True, "shiftfetch", 8, 55) - Console.BadCommand = False - Case "bc" - Shiftorium_InstallFeatures(True, "bc", 9, 55) - Console.BadCommand = False - Case "2bitcolor" - Shiftorium_InstallFeatures(True, "2bitcolor", 10, 60) - Console.BadCommand = False - Case "key" - Shiftorium_InstallFeatures(True, "key", 11, 5) - Console.BadCommand = False - Case "pmam" - Shiftorium_InstallFeatures(True, "pmam", 12, 40) - Console.BadCommand = False - Case "rgb" - Shiftorium_InstallFeatures(True, "rgb", 13, 70) - Console.BadCommand = False - Case "rgb2" - Shiftorium_InstallFeatures(True, "rgb2", 14, 75) - Console.BadCommand = False - Case "4bitcolor" - Shiftorium_InstallFeatures(True, "4bitcolor", 15, 80) - Console.BadCommand = False - Case "romdriver" - Shiftorium_InstallFeatures(True, "romdriver", 16, 90) - Console.BadCommand = False - Case "textpad" - Shiftorium_InstallFeatures(True, "textpad", 17, 100) - Console.BadCommand = False - Case "shiftkey" - Shiftorium_InstallFeatures(True, "shiftkey", 18, 45) - Console.BadCommand = False - Case "username" - Shiftorium_InstallFeatures(True, "username", 19, 15) - Console.BadCommand = False - Case "hostname" - Shiftorium_InstallFeatures(True, "hostname", 20, 15) - Console.BadCommand = False - Case "rev" - Shiftorium_InstallFeatures(True, "rev", 21, 30) - Console.BadCommand = False - Case "cowsay" - Shiftorium_InstallFeatures(True, "cowsay", 22, 50) - Console.BadCommand = False - Case "hhmm" - Shiftorium_InstallFeatures(True, "hhmm", 23, 50) - Console.BadCommand = False - Case "date" - Shiftorium_InstallFeatures(True, "date", 24, 70) - Console.BadCommand = False - Case "woy" - Shiftorium_InstallFeatures(True, "woy", 25, 75) - Console.BadCommand = False - Case "moy" - Shiftorium_InstallFeatures(True, "moy", 26, 80) - Console.BadCommand = False - Case "year" - Shiftorium_InstallFeatures(True, "year", 27, 85) - Console.BadCommand = False - Case "mmyyyy" - Shiftorium_InstallFeatures(True, "mmyyyy", 28, 90) - Console.BadCommand = False - Case "generaldate" - Shiftorium_InstallFeatures(True, "generaldate", 29, 95) - Console.BadCommand = False - Case "batchscript" - Shiftorium_InstallFeatures(True, "batchscript", 30, 100) - Console.BadCommand = False - Case "clipboard" - Shiftorium_InstallFeatures(True, "clipboard", 31, 100) - Console.BadCommand = False - Case Else - Console.BadCommand = False - NewLine("Shiftorium: Bad command or not available") - End Select - End Sub - - Public Sub Shiftorium_InstallFeatures(IsCLI As Boolean, Feature As String, FeatureRow As Integer, Codepoint As Integer) - 'Import the current CP as an Integer - Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) - 'See what feature that are going to be installed - Select Case Strings.AvailableFeature(FeatureRow) - Case "0" - If TempCP >= Codepoint Then - Dim success As Boolean = False - Select Case Feature - Case "man" - Strings.AvailableFeature(0) = "1" - Strings.AvailableFeature(19) = "0" - Strings.AvailableFeature(20) = "0" - success = True - Case "clear" - Strings.AvailableFeature(1) = "1" - Strings.AvailableFeature(2) = "0" - Strings.AvailableFeature(5) = "0" - Strings.AvailableFeature(9) = "0" - success = True - Case "print" - Strings.AvailableFeature(2) = "1" - Strings.AvailableFeature(3) = "0" - Strings.AvailableFeature(18) = "0" - Strings.AvailableFeature(21) = "0" - success = True - Case "termdspdrv" - Strings.AvailableFeature(3) = "1" - Strings.AvailableFeature(4) = "0" - Strings.AvailableFeature(8) = "0" - Strings.AvailableFeature(10) = "0" - success = True - Case "infobar" - Strings.AvailableFeature(4) = "1" - success = True - Case "stime" - Strings.AvailableFeature(5) = "1" - Strings.AvailableFeature(6) = "0" - success = True - Case "mtime" - Strings.AvailableFeature(5) = "3" - Strings.AvailableFeature(6) = "1" - Strings.AvailableFeature(7) = "0" - success = True - Case "htime" - Strings.AvailableFeature(6) = "3" - Strings.AvailableFeature(7) = "1" - Strings.AvailableFeature(12) = "0" - success = True - Case "shiftfetch" - Strings.AvailableFeature(8) = "1" - success = True - Case "bc" - Strings.AvailableFeature(9) = "1" - success = True - Case "2bitcolor" - Strings.AvailableFeature(10) = "1" - Strings.AvailableFeature(13) = "0" - success = True - Case "key" - Strings.AvailableFeature(11) = "1" - Strings.AvailableFeature(0) = "0" - Strings.AvailableFeature(1) = "0" - success = True - Case "pmam" - Strings.AvailableFeature(7) = "3" - Strings.AvailableFeature(12) = "1" - Strings.AvailableFeature(23) = "0" - success = True - Case "rgb" - Strings.AvailableFeature(13) = "1" - Strings.AvailableFeature(14) = "0" - success = True - Case "rgb2" - Strings.AvailableFeature(14) = "1" - Strings.AvailableFeature(15) = "0" - success = True - Case "4bitcolor" - Strings.AvailableFeature(15) = "1" - Strings.AvailableFeature(16) = "0" - success = True - Case "romdriver" - Strings.AvailableFeature(16) = "1" - Strings.AvailableFeature(17) = "0" - success = True - Case "textpad" - Strings.AvailableFeature(17) = "1" - Strings.AvailableFeature(30) = "0" - Strings.AvailableFeature(31) = "0" - success = True - Case "shiftkey" - Strings.AvailableFeature(18) = "1" - success = True - Case "username" - Strings.AvailableFeature(19) = "1" - success = True - Case "hostname" - Strings.AvailableFeature(20) = "1" - success = True - Case "rev" - Strings.AvailableFeature(21) = "1" - Strings.AvailableFeature(22) = "0" - success = True - Case "cowsay" - Strings.AvailableFeature(22) = "1" - success = True - Case "hhmm" - Strings.AvailableFeature(12) = "3" - Strings.AvailableFeature(23) = "1" - Strings.AvailableFeature(24) = "0" - success = True - Case "date" - Strings.AvailableFeature(24) = "1" - Strings.AvailableFeature(25) = "0" - success = True - Case "woy" - Strings.AvailableFeature(24) = "3" - Strings.AvailableFeature(25) = "1" - Strings.AvailableFeature(26) = "0" - success = True - Case "moy" - Strings.AvailableFeature(25) = "3" - Strings.AvailableFeature(26) = "1" - Strings.AvailableFeature(27) = "0" - success = True - Case "year" - Strings.AvailableFeature(26) = "3" - Strings.AvailableFeature(27) = "1" - Strings.AvailableFeature(28) = "0" - success = True - Case "mmyyyy" - Strings.AvailableFeature(27) = "3" - Strings.AvailableFeature(28) = "1" - Strings.AvailableFeature(29) = "0" - success = True - Case "generaldate" - Strings.AvailableFeature(28) = "3" - Strings.AvailableFeature(29) = "1" - success = True - Case "batchscript" - Strings.AvailableFeature(30) = "1" - success = True - Case "clipboard" - Strings.AvailableFeature(31) = "1" - success = True - End Select - If success = False Then - If IsCLI = True Then - NewLine("Shiftorium: Invalid command or feature already installed") - End If - Else - 'It will deduct the current codepoint to the modified codepoint and exporting it back to ComputerInfo(2) - Strings.ComputerInfo(4) = Strings.ComputerInfo(4) + 1 - TempCP = TempCP - Codepoint - Strings.ComputerInfo(2) = Convert.ToString(TempCP) - If IsCLI = True Then - NewLine("Feature has been install succesfully") - End If - End If - Else - If IsCLI = True Then - NewLine("Shiftorium: Insufficent Codepoint") - End If - End If - Case "1" - If IsCLI = True Then - NewLine("Shiftorium: Feature has already been installed") - End If - Case "2" - If IsCLI = True Then - NewLine("Shiftorium: Feature is not available") - End If - Case "3" - If IsCLI = True Then - NewLine("Shiftorium: Feature is already upgraded to a newer one") - End If - End Select - End Sub -End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/StoreManager/Shiftoriums.vb b/ShiftOS-TheRevival/Functions/InGame/StoreManager/Shiftoriums.vb new file mode 100644 index 0000000..89a1e77 --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/StoreManager/Shiftoriums.vb @@ -0,0 +1,684 @@ +Module Shiftoriums + Public prompt As String + + Public Sub Shiftorium_ListFeatures() + 'Shows available installable feature on Shiftorium + 'Only AvailableFeature that are in the value of 0 can be displayed in the list + NewLine("Shiftorium Available Feature(s)") + NewLine(Nothing) + If Strings.AvailableFeature(11) = "0" Then + NewLine("(key | 5 CP) ShiftOS Key") + Else + If Strings.AvailableFeature(0) = "0" Then + NewLine("(man | 10 CP) ShiftOS Help Manual") + Else + If Strings.AvailableFeature(19) = "0" Then + NewLine("(username | 15 CP) Custom Username") + End If + If Strings.AvailableFeature(20) = "0" Then + NewLine("(hostname | 15 CP) Custom hostname") + End If + End If + If Strings.AvailableFeature(1) = "0" Then + NewLine("(clear | 20 CP) Clear Terminal Screen") + Else + If Strings.AvailableFeature(2) = "0" Then + NewLine("(print | 25 CP) Print Terminal Screen") + Else + If Strings.AvailableFeature(3) = "0" Then + NewLine("(termdspdrv | 40 CP) Terminal Display Driver") + Else + If Strings.AvailableFeature(4) = "0" Then + NewLine("(infobar | 50 CP) Terminal InfoBar") + End If + If Strings.AvailableFeature(8) = "0" Then + NewLine("(shiftfetch | 55 CP) Shiftfetch") + End If + If Strings.AvailableFeature(10) = "0" Then + NewLine("(2bitcolor | 60 CP) 2-bit Color Support") + Else + If Strings.AvailableFeature(13) = "0" Then + NewLine("(rgb | 70 CP) Red, Green, and Blue") + Else + If Strings.AvailableFeature(14) = "0" Then + NewLine("(rgb2 | 75 CP) RGB Variant") + Else + If Strings.AvailableFeature(15) = "0" Then + NewLine("(4bitcolor | 80 CP) 4-bit Color Support") + Else + If Strings.AvailableFeature(16) = "0" Then + NewLine("(romdriver | 90 CP) Terminal Read-Only Memory Support") + Else + If Strings.AvailableFeature(17) = "0" Then + NewLine("(textpad | 100 CP) TextPad") + Else + If Strings.AvailableFeature(30) = "0" Then + NewLine("(batchscript | 100 CP) ShiftOS Batch Script Support") + End If + If Strings.AvailableFeature(31) = "0" Then + NewLine("(clipboard | 100 CP) Clipboard support") + End If + End If + End If + End If + End If + End If + End If + End If + If Strings.AvailableFeature(18) = "0" Then + NewLine("(shiftkey | 45 CP) ShiftKey") + End If + If Strings.AvailableFeature(21) = "0" Then + NewLine("(rev | 30 CP) Reverse String") + Else + If Strings.AvailableFeature(22) = "0" Then + NewLine("(cowsay | 50 CP) Cowsay") + End If + End If + End If + If Strings.AvailableFeature(5) = "0" Then + NewLine("(stime | 10 CP) Time by Seconds") + Else + If Strings.AvailableFeature(6) = "0" Then + NewLine("(mtime | 20 CP) Time by Minutes") + Else + If Strings.AvailableFeature(7) = "0" Then + NewLine("(htime | 30 CP) Time by Hours") + Else + If Strings.AvailableFeature(12) = "0" Then + NewLine("(pmam | 40 CP) PM and AM") + Else + If Strings.AvailableFeature(23) = "0" Then + NewLine("(hhmm | 50 CP) Time by Hours and Minutes") + Else + If Strings.AvailableFeature(24) = "0" Then + NewLine("(date | 70 CP) Date command") + Else + If Strings.AvailableFeature(25) = "0" Then + NewLine("(woy | 75 CP) Date by week of year") + Else + If Strings.AvailableFeature(26) = "0" Then + NewLine("(moy | 80 CP) Date by month of year") + Else + If Strings.AvailableFeature(27) = "0" Then + NewLine("(year | 85 CP) Date by year") + Else + If Strings.AvailableFeature(28) = "0" Then + NewLine("(mmyyyy | 90 CP) Date by month and year") + Else + If Strings.AvailableFeature(29) = "0" Then + NewLine("(generaldate | 95 CP) Date by general format") + End If + End If + End If + End If + End If + End If + End If + End If + End If + End If + End If + If Strings.AvailableFeature(9) = "0" Then + NewLine("(bc | 55 CP) Basic Calculator") + End If + End If + End If + End Sub + + Public Sub Shiftorium_InformationFeatures() + '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" + If Strings.AvailableFeature(0) = "0" Then + ManHeader(0) = "ShiftOS Help Manual (command: man)" + ManHeader(1) = "10 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Shows up any further help instruction on each command, its corresponding action and its example if necessary") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "clear" + If Strings.AvailableFeature(1) = "0" Then + ManHeader(0) = "Clear Terminal Screen (command: clear)" + ManHeader(1) = "20 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Clears the terminal screen" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "print" + If Strings.AvailableFeature(2) = "0" Then + ManHeader(0) = "Print Command (command: print)" + ManHeader(1) = "25 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Prints a corresponding text entered in the command" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "termdspdrv" + If Strings.AvailableFeature(3) = "0" Then + ManHeader(0) = "Terminal Display Driver" + ManHeader(1) = "40 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Display driver for ShiftOS' Terminal to utilize advantages such as Infobar, ASCII-based applications" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "infobar" + If Strings.AvailableFeature(4) = "0" Then + ManHeader(0) = "Terminal InfoBar" + ManHeader(1) = "50 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Panel bar at the bottom of the terminal to display basic informations" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "stime" + If Strings.AvailableFeature(5) = "0" Then + ManHeader(0) = "Time by Seconds" + ManHeader(1) = "10 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in seconds form since midnight" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "stime" + If Strings.AvailableFeature(6) = "0" Then + ManHeader(0) = "Time by Minutes" + ManHeader(1) = "20 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in minutes form since midnight" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "htime" + If Strings.AvailableFeature(7) = "0" Then + ManHeader(0) = "Time by Hours" + ManHeader(1) = "30 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in hours form since midnight" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "shiftfetch" + If Strings.AvailableFeature(8) = "0" Then + ManHeader(0) = "Shiftfetch" + ManHeader(1) = "55 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "ShiftOS port of Neofetch, A command-line system information tool" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "bc" + If Strings.AvailableFeature(9) = "0" Then + ManHeader(0) = "Basic Calculator" + ManHeader(1) = "55 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Basic Calculator for simple calculation" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "2bitcolor" + If Strings.AvailableFeature(10) = "0" Then + ManHeader(0) = "2-bit Color Support" + ManHeader(1) = "60 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds 2 colours (Dark Gray, Light Gray) supports to the terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "key" + If Strings.AvailableFeature(11) = "0" Then + ManHeader(0) = "ShiftOS Key" + ManHeader(1) = "5 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "An encryption key to unlock advanced terminal feature for ShiftOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "pmam" + If Strings.AvailableFeature(12) = "0" Then + ManHeader(0) = "PM and AM" + ManHeader(1) = "40 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in PM and AM format" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "rgb" + If Strings.AvailableFeature(13) = "0" Then + ManHeader(0) = "Red, Green, and Blue" + ManHeader(1) = "70 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds Red, Green, and Blue support to the Display Driver" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "rgb2" + If Strings.AvailableFeature(14) = "0" Then + ManHeader(0) = "RGB Variant" + ManHeader(1) = "75 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds lighter or darker variant of Red, Green, and Blue" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "4bitcolor" + If Strings.AvailableFeature(15) = "0" Then + ManHeader(0) = "4-bit Color Display" + ManHeader(1) = "80 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds to 16 colours support to the Display Driver" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "romdriver" + If Strings.AvailableFeature(16) = "0" Then + ManHeader(0) = "Terminal Read-Only Memory Driver" + ManHeader(1) = "90 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "ShiftOS Read-Only Memory support for ShiftOS such as writing and reading permanent memory such as HDD, SDD, etc." & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "textpad" + If Strings.AvailableFeature(17) = "0" Then + ManHeader(0) = "TextPad" + ManHeader(1) = "100 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "A simple text-editor for ShiftOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "shiftkey" + If Strings.AvailableFeature(18) = "0" Then + ManHeader(0) = "ShiftKey" + ManHeader(1) = "45 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Recall the previous command on terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "username" + If Strings.AvailableFeature(19) = "0" Then + ManHeader(0) = "Custom Username" + ManHeader(1) = "15 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Set custom username for ShfitOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "hostname" + If Strings.AvailableFeature(20) = "0" Then + ManHeader(0) = "Custom Hostname" + ManHeader(1) = "15 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Set custom hostname/computer name for ShfitOS" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "rev" + If Strings.AvailableFeature(21) = "0" Then + ManHeader(0) = "Reverse String" + ManHeader(1) = "30 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Reverse any text you entered in the terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "cowsay" + If Strings.AvailableFeature(22) = "0" Then + ManHeader(0) = "Cowsay" + ManHeader(1) = "50 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Make the ASCII cow say anything you want to" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "hhmm" + If Strings.AvailableFeature(23) = "0" Then + ManHeader(0) = "Time by Hours and Minutes" + ManHeader(1) = "50 CP" + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Shows time in Hours and Minutes format" & Environment.NewLine & Environment.NewLine & ManHeader(1) + Console.BadCommand = False + End If + Case "date" + If Strings.AvailableFeature(24) = "0" Then + ManHeader(0) = "Date command" + ManHeader(1) = "70 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Displays date in days format since first day of the year") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "woy" + If Strings.AvailableFeature(25) = "0" Then + ManHeader(0) = "Date by week of year" + ManHeader(1) = "75 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Displays date in week format since first week of the year") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "moy" + If Strings.AvailableFeature(26) = "0" Then + ManHeader(0) = "Date by month of year" + ManHeader(1) = "80 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Displays date in month format since first month of the year") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "year" + If Strings.AvailableFeature(27) = "0" Then + ManHeader(0) = "Date by year" + ManHeader(1) = "85 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Displays date in year format") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "mmyyyy" + If Strings.AvailableFeature(28) = "0" Then + ManHeader(0) = "Date by month and year" + ManHeader(1) = "90 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Displays date in month and year format") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "generaldate" + If Strings.AvailableFeature(29) = "0" Then + ManHeader(0) = "Date by general format" + ManHeader(1) = "95 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Displays date in DD/MM/YYYY format") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "batchscript" + If Strings.AvailableFeature(30) = "0" Then + ManHeader(0) = "ShiftOS Batch Script Support" + ManHeader(1) = "100 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Adds the supports for ShiftOS Batch Script") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case "clipboard" + If Strings.AvailableFeature(31) = "0" Then + ManHeader(0) = "Clipboard Support" + ManHeader(1) = "100 CP" + NewLine(ManHeader(0)) + NewLine(Nothing) + NewLine("Adds the supports for clipboard") + NewLine(Nothing) + NewLine(ManHeader(1)) + Console.BadCommand = False + End If + Case Else + Console.BadCommand = False + Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available" + End Select + End Sub + + Public Sub Shiftorium_DetectInstallFeatures() + NewLine("Installing feature...") + Select Case prompt + Case "man" + Shiftorium_InstallFeatures(True, "man", 0, 10) + Console.BadCommand = False + Case "clear" + Shiftorium_InstallFeatures(True, "clear", 1, 20) + Console.BadCommand = False + Case "print" + Shiftorium_InstallFeatures(True, "print", 2, 25) + Console.BadCommand = False + Case "termdspdrv" + Shiftorium_InstallFeatures(True, "termdspdrv", 3, 40) + Console.BadCommand = False + Case "infobar" + Shiftorium_InstallFeatures(True, "infobar", 4, 50) + Console.BadCommand = False + Case "stime" + Shiftorium_InstallFeatures(True, "stime", 5, 10) + Console.BadCommand = False + Case "mtime" + Shiftorium_InstallFeatures(True, "mtime", 6, 20) + Console.BadCommand = False + Case "htime" + Shiftorium_InstallFeatures(True, "htime", 7, 30) + Console.BadCommand = False + Case "shiftfetch" + Shiftorium_InstallFeatures(True, "shiftfetch", 8, 55) + Console.BadCommand = False + Case "bc" + Shiftorium_InstallFeatures(True, "bc", 9, 55) + Console.BadCommand = False + Case "2bitcolor" + Shiftorium_InstallFeatures(True, "2bitcolor", 10, 60) + Console.BadCommand = False + Case "key" + Shiftorium_InstallFeatures(True, "key", 11, 5) + Console.BadCommand = False + Case "pmam" + Shiftorium_InstallFeatures(True, "pmam", 12, 40) + Console.BadCommand = False + Case "rgb" + Shiftorium_InstallFeatures(True, "rgb", 13, 70) + Console.BadCommand = False + Case "rgb2" + Shiftorium_InstallFeatures(True, "rgb2", 14, 75) + Console.BadCommand = False + Case "4bitcolor" + Shiftorium_InstallFeatures(True, "4bitcolor", 15, 80) + Console.BadCommand = False + Case "romdriver" + Shiftorium_InstallFeatures(True, "romdriver", 16, 90) + Console.BadCommand = False + Case "textpad" + Shiftorium_InstallFeatures(True, "textpad", 17, 100) + Console.BadCommand = False + Case "shiftkey" + Shiftorium_InstallFeatures(True, "shiftkey", 18, 45) + Console.BadCommand = False + Case "username" + Shiftorium_InstallFeatures(True, "username", 19, 15) + Console.BadCommand = False + Case "hostname" + Shiftorium_InstallFeatures(True, "hostname", 20, 15) + Console.BadCommand = False + Case "rev" + Shiftorium_InstallFeatures(True, "rev", 21, 30) + Console.BadCommand = False + Case "cowsay" + Shiftorium_InstallFeatures(True, "cowsay", 22, 50) + Console.BadCommand = False + Case "hhmm" + Shiftorium_InstallFeatures(True, "hhmm", 23, 50) + Console.BadCommand = False + Case "date" + Shiftorium_InstallFeatures(True, "date", 24, 70) + Console.BadCommand = False + Case "woy" + Shiftorium_InstallFeatures(True, "woy", 25, 75) + Console.BadCommand = False + Case "moy" + Shiftorium_InstallFeatures(True, "moy", 26, 80) + Console.BadCommand = False + Case "year" + Shiftorium_InstallFeatures(True, "year", 27, 85) + Console.BadCommand = False + Case "mmyyyy" + Shiftorium_InstallFeatures(True, "mmyyyy", 28, 90) + Console.BadCommand = False + Case "generaldate" + Shiftorium_InstallFeatures(True, "generaldate", 29, 95) + Console.BadCommand = False + Case "batchscript" + Shiftorium_InstallFeatures(True, "batchscript", 30, 100) + Console.BadCommand = False + Case "clipboard" + Shiftorium_InstallFeatures(True, "clipboard", 31, 100) + Console.BadCommand = False + Case Else + Console.BadCommand = False + NewLine("Shiftorium: Bad command or not available") + End Select + End Sub + + Public Sub Shiftorium_InstallFeatures(IsCLI As Boolean, Feature As String, FeatureRow As Integer, Codepoint As Integer) + 'Import the current CP as an Integer + Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) + 'See what feature that are going to be installed + Select Case Strings.AvailableFeature(FeatureRow) + Case "0" + If TempCP >= Codepoint Then + Dim success As Boolean = False + Select Case Feature + Case "man" + Strings.AvailableFeature(0) = "1" + Strings.AvailableFeature(19) = "0" + Strings.AvailableFeature(20) = "0" + success = True + Case "clear" + Strings.AvailableFeature(1) = "1" + Strings.AvailableFeature(2) = "0" + Strings.AvailableFeature(5) = "0" + Strings.AvailableFeature(9) = "0" + success = True + Case "print" + Strings.AvailableFeature(2) = "1" + Strings.AvailableFeature(3) = "0" + Strings.AvailableFeature(18) = "0" + Strings.AvailableFeature(21) = "0" + success = True + Case "termdspdrv" + Strings.AvailableFeature(3) = "1" + Strings.AvailableFeature(4) = "0" + Strings.AvailableFeature(8) = "0" + Strings.AvailableFeature(10) = "0" + success = True + Case "infobar" + Strings.AvailableFeature(4) = "1" + success = True + Case "stime" + Strings.AvailableFeature(5) = "1" + Strings.AvailableFeature(6) = "0" + success = True + Case "mtime" + Strings.AvailableFeature(5) = "3" + Strings.AvailableFeature(6) = "1" + Strings.AvailableFeature(7) = "0" + success = True + Case "htime" + Strings.AvailableFeature(6) = "3" + Strings.AvailableFeature(7) = "1" + Strings.AvailableFeature(12) = "0" + success = True + Case "shiftfetch" + Strings.AvailableFeature(8) = "1" + success = True + Case "bc" + Strings.AvailableFeature(9) = "1" + success = True + Case "2bitcolor" + Strings.AvailableFeature(10) = "1" + Strings.AvailableFeature(13) = "0" + success = True + Case "key" + Strings.AvailableFeature(11) = "1" + Strings.AvailableFeature(0) = "0" + Strings.AvailableFeature(1) = "0" + success = True + Case "pmam" + Strings.AvailableFeature(7) = "3" + Strings.AvailableFeature(12) = "1" + Strings.AvailableFeature(23) = "0" + success = True + Case "rgb" + Strings.AvailableFeature(13) = "1" + Strings.AvailableFeature(14) = "0" + success = True + Case "rgb2" + Strings.AvailableFeature(14) = "1" + Strings.AvailableFeature(15) = "0" + success = True + Case "4bitcolor" + Strings.AvailableFeature(15) = "1" + Strings.AvailableFeature(16) = "0" + success = True + Case "romdriver" + Strings.AvailableFeature(16) = "1" + Strings.AvailableFeature(17) = "0" + success = True + Case "textpad" + Strings.AvailableFeature(17) = "1" + Strings.AvailableFeature(30) = "0" + Strings.AvailableFeature(31) = "0" + success = True + Case "shiftkey" + Strings.AvailableFeature(18) = "1" + success = True + Case "username" + Strings.AvailableFeature(19) = "1" + success = True + Case "hostname" + Strings.AvailableFeature(20) = "1" + success = True + Case "rev" + Strings.AvailableFeature(21) = "1" + Strings.AvailableFeature(22) = "0" + success = True + Case "cowsay" + Strings.AvailableFeature(22) = "1" + success = True + Case "hhmm" + Strings.AvailableFeature(12) = "3" + Strings.AvailableFeature(23) = "1" + Strings.AvailableFeature(24) = "0" + success = True + Case "date" + Strings.AvailableFeature(24) = "1" + Strings.AvailableFeature(25) = "0" + success = True + Case "woy" + Strings.AvailableFeature(24) = "3" + Strings.AvailableFeature(25) = "1" + Strings.AvailableFeature(26) = "0" + success = True + Case "moy" + Strings.AvailableFeature(25) = "3" + Strings.AvailableFeature(26) = "1" + Strings.AvailableFeature(27) = "0" + success = True + Case "year" + Strings.AvailableFeature(26) = "3" + Strings.AvailableFeature(27) = "1" + Strings.AvailableFeature(28) = "0" + success = True + Case "mmyyyy" + Strings.AvailableFeature(27) = "3" + Strings.AvailableFeature(28) = "1" + Strings.AvailableFeature(29) = "0" + success = True + Case "generaldate" + Strings.AvailableFeature(28) = "3" + Strings.AvailableFeature(29) = "1" + success = True + Case "batchscript" + Strings.AvailableFeature(30) = "1" + success = True + Case "clipboard" + Strings.AvailableFeature(31) = "1" + success = True + End Select + If success = False Then + If IsCLI = True Then + NewLine("Shiftorium: Invalid command or feature already installed") + End If + Else + 'It will deduct the current codepoint to the modified codepoint and exporting it back to ComputerInfo(2) + Strings.ComputerInfo(4) = Strings.ComputerInfo(4) + 1 + TempCP = TempCP - Codepoint + Strings.ComputerInfo(2) = Convert.ToString(TempCP) + If IsCLI = True Then + NewLine("Feature has been install succesfully") + End If + End If + Else + If IsCLI = True Then + NewLine("Shiftorium: Insufficent Codepoint") + End If + End If + Case "1" + If IsCLI = True Then + NewLine("Shiftorium: Feature has already been installed") + End If + Case "2" + If IsCLI = True Then + NewLine("Shiftorium: Feature is not available") + End If + Case "3" + If IsCLI = True Then + NewLine("Shiftorium: Feature is already upgraded to a newer one") + End If + End Select + End Sub +End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/Strings.vb b/ShiftOS-TheRevival/Functions/InGame/Strings.vb deleted file mode 100644 index 0bbada4..0000000 --- a/ShiftOS-TheRevival/Functions/InGame/Strings.vb +++ /dev/null @@ -1,118 +0,0 @@ -Public Class Strings - Public Shared OSInfo() As String - Public Shared ComputerInfo(6) As String - Public Shared IsFree As Boolean - Public Shared OnceInfo(8) As String - Public Shared AvailableFeature(31) As String - Public Shared CLIInterpreter As String - Public Shared SaveFile As String - Public Shared Achievement As String - - 'STRING CATEGORIZATION WRITING RULES! - 'THIS IS IN ORDER TO REMAIN COMPATIBLE WITH OLDER VERSIONS! - ' - 'General string : - '(Row Number) = Function/Subject (default value : default) - ' - 'Each have to placed in numerical order - 'If there's moved strings for newer version, example: - '0 = Computer Name (0.1) => OS Version (0.2) => Root Location (0.3), etc. - 'If there's removed strings for newer version, example: - '69 = Secret Easter Egg (removed in 0.420) - 'If there's repurposed strings for newer version after removed, example: - '5 = FreeRoam enabled? (removed in 0.4) => Story Mode State - ' - 'ALWAYS WRITE THE NOTES IN COMMENTS, THIS CLASS ONLY IS FOR STORING STRINGS AND DEPLOYING STRINGS TO DISK - - 'OSInfo Strings: - '0 = OSVersion (default : dependant) - ' - 'OnceInfo Strings: - '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) => moved to ComputerInfo(5) - '4 = RootDirectoryString (0.2.3) (default : !) - '5 = Terminal TrackPos (0.2.3) (default : 0) - '6 = GameMode (0.2.3) (dependant) - '7 = MaxWidth (0.2.4) (depentant) - '8 = MaxHeight (0.2.4) (depentant) - ' - 'ComputerInfo Strings: - '0 = Computer Name (0.1) (default : shiftos) - '1 = Username (0.1) (default : user) - '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) - '1 = CLEAR command [Clearing the screen] (0.2) (default : 0) - '2 = PRINT command [Printing a string] (0.2.2) (default : 0) - '3 = Terminal Display Driver [Dependencies for advanced terminal applications] (0.2.2) (default : 0) - '4 = Terminal InfoBar [A panel bar at the bottom of the terminal to show 'Time', 'User Session', 'Codepoint', 'Program running'] (0.2.2) (default : 0) - '5 = Time by Second [Showing time in seconds form since midnight] (0.2.2) (default : 0) - '6 = Time by Minutes [Showing time in minutes form since midnight] (0.2.2) (default : 0) - '7 = Time by Hours [Showing time in hours form since midnight] (0.2.2) (default : 0) - '8 = Shiftfetch [ShiftOS port of Neofetch, A command-line system information tool] (0.2.3) (default : 0) - '9 = bc [Basic Calculator for ShiftOS] (0.2.3) (default : 0) - '10 = 2-bit Color Display [Adds Dark Gray and Light Gray support to the Display Driver] (0.2.3) (default : 0) - '11 = ShiftOS Key [A key to unlock advanced features on ShiftOS] (0.2.3) (default : 0) - '12 = Time by PM and AM [Showing time in hours form since midnight] (0.2.3) (default : 0) - '13 = Red, Green, Blue [Adds Red, Green, and Blue support to the Display Driver] (0.2.3) (default : 0) - '14 = RGB Variant [Adds lighter or darker variant of Red, Green, and Blue] (0.2.3) (default : 0) - '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) - '21 = Reverse String [Reverse a text] (0.2.4) (default : 0) - '22 = Cowsay [Cowsay] (0.2.4) (default : 0) - '23 = Time by Hours and Minutes [Shows time in Hours and Minutes format] (0.2.5) (default : 0) - '24 = Date command [Shows date in days since first day of the year format] (0.2.5) (default : 0) - '25 = Date by week [Shows date in weeks since first week of the year format] (0.2.5) (default : 0) - '26 = Date by month [Shows date in months since first month of the year format] (0.2.5) (default : 0) - '27 = Date by year [Shows date in year format] (0.2.5) (default : 0) - '28 = Date by month and year [Shows date in MM/YYYY format] (0.2.5) (default : 0) - '29 = Date by general [Shows date in general DD/MM/YYYY format] (0.2.5) (default : 0) - '30 = Batch-file support for ShiftOS [Gives execution support for ShiftOS Script File (.scr)] (0.2.5) (default : 0) - '31 = Clipboard support for ShiftOS [Gives clipboard support for copy-pasting in ShiftOS] (0.2.6) (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) - '>>>Reverse String command (REV) (30 CP) - '>>>>Cowsay (50 CP) - '>>>>Fortune command (55 CP) - '>>>ShiftKey (ShOSKey) (45 CP) - '>>>Terminal Display Driver (TERMDSPDRV) (40 CP) - '>>>>Terminal InfoBar (INFOBAR) (50 CP) - '>>>>Shiftfetch (SHIFTFETCH) (55 CP) - '>>>>2-bit Color Display (2BITCOLOR) (60 CP) - '>>>>>Red, Green, Blue (rgb) (70 CP) - '>>>>>>RGB Variant (rgb2) (75 CP) - '>>>>>>>4-bit Color Display (4BITCOLOR) (80 CP) - '>>>>>>>>Terminal Read-Only Memory Driver (ROMDRIVER, DIR, MKDIR, RMDIR, CD, PWD) (90 CP) - '>>>>>>>>>TextPad (100 CP) - '>>>>>>>>>>Clipboard support (CLIPBOARD) (100 CP) - '>>>>>>>>>>ShiftOS Batch Script Support (BATCHSCRIPT) (100 CP) - '>>Basic Calculator (BC) (55 CP) - '>>Time by Seconds (TIME, STIME) (10 CP) - '>>>Time by Minutes (TIME, MTIME) (20 CP) - '>>>>Time by Hours (Time, HTIME) (30 CP) - '>>>>>PM and AM (Time, PMAM (40 CP)) - '>>>>>>Time by Hours and Minutes (Time, HHMM (50 CP)) - '>>>>>>>Date command (DATE (70 CP)) - '>>>>>>>>Date by week (DATE, WOY (75 CP)) - '>>>>>>>>>Date by month (DATE, MOY (80 CP)) - '>>>>>>>>>>Date by year (DATE, YEAR (85 CP)) - '>>>>>>>>>>>Date by month and year (DATE, MMYYYY (90 CP)) - '>>>>>>>>>>>>Date by general (DATE, GENERALDATE (95 CP)) -End Class diff --git a/ShiftOS-TheRevival/Functions/InGame/SystemManager/CodepointSystem.vb b/ShiftOS-TheRevival/Functions/InGame/SystemManager/CodepointSystem.vb new file mode 100644 index 0000000..6a76a28 --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/SystemManager/CodepointSystem.vb @@ -0,0 +1,11 @@ +Module CodepointSystem + Public Sub ChangeCP(Addition As Boolean, NeededCP As Integer) + Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) + If Addition = True Then + TempCP = TempCP + NeededCP + Else + TempCP = TempCP - NeededCP + End If + Strings.ComputerInfo(2) = Convert.ToString(TempCP) + End Sub +End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/SystemManager/ColorSystem.vb b/ShiftOS-TheRevival/Functions/InGame/SystemManager/ColorSystem.vb new file mode 100644 index 0000000..80f1c8f --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/SystemManager/ColorSystem.vb @@ -0,0 +1,165 @@ +Module ColorSystem + 'GUIDE to COLORS in TERMINAL + 'Using the same Hexadecimal numbering as what Command Prompt used to: + '0 = Black 8 = Gray + '1 = Blue 9 = Light Blue + '2 = Green A = Light Green + '3 = Aqua B = Light Aqua + '4 = Red C = Light Red + '5 = Purple D = Light Purple + '6 = Yellow E = Yellow + '7 = Dark Gray F = White + Public BgColor As Color + Public FgColor As Color + + Public Sub GetColor(App As String, Bg As String, Fg As String) + Select Case App + Case "terminal" + BgColor = Color.Black + FgColor = Color.White + Case "infobar" + BgColor = Color.White + FgColor = Color.Black + End Select + If Bg = Fg Then + NewLine("Background and Foreground Color cannot be same!") + Else + If Strings.AvailableFeature(10) = "1" Then + Select Case Bg + Case "0" + BgColor = Color.Black + Case "7" + BgColor = Color.Silver + Case "8" + BgColor = Color.Gray + Case "f" + BgColor = Color.White + Case "2", "9", "c" + If Strings.AvailableFeature(13) = "1" Then + Select Case Bg + Case "2" + BgColor = Color.Green + Case "9" + BgColor = Color.Blue + Case "c" + BgColor = Color.Red + End Select + Else + NewLine("One or two colors you selected is not available.") + End If + Case "1", "4", "a" + If Strings.AvailableFeature(14) = "1" Then + Select Case Bg + Case "1" + BgColor = Color.Navy + Case "4" + BgColor = Color.Maroon + Case "a" + BgColor = Color.Lime + End Select + Else + NewLine("One or two colors you selected is not available.") + End If + Case "3", "5", "6", "b", "d", "e" + If Strings.AvailableFeature(15) = "1" Then + Select Case Bg + Case "3" + BgColor = Color.Cyan + Case "5" + BgColor = Color.Magenta + Case "6" + BgColor = Color.Brown + Case "b" + BgColor = Color.Aqua + Case "d" + BgColor = Color.Fuchsia + Case "e" + BgColor = Color.Yellow + End Select + Else + NewLine("One or two colors you selected is not available.") + End If + Case Else + BgColor = Color.Black + End Select + Select Case Fg + Case "0" + FgColor = Color.Black + Case "7" + FgColor = Color.Silver + Case "8" + FgColor = Color.Gray + Case "f" + FgColor = Color.White + Case "2", "9", "c" + If Strings.AvailableFeature(13) = "1" Then + Select Case Fg + Case "2" + FgColor = Color.Green + Case "9" + FgColor = Color.Blue + Case "c" + FgColor = Color.Red + End Select + Else + NewLine("One or two colors you selected is not available.") + End If + Case "1", "4", "a" + If Strings.AvailableFeature(14) = "1" Then + Select Case Fg + Case "1" + FgColor = Color.Navy + Case "4" + FgColor = Color.Maroon + Case "a" + FgColor = Color.Lime + End Select + Else + NewLine("One or two colors you selected is not available.") + End If + Case "3", "5", "6", "b", "d", "e" + If Strings.AvailableFeature(15) = "1" Then + Select Case Fg + Case "3" + FgColor = Color.Cyan + Case "5" + FgColor = Color.Magenta + Case "6" + FgColor = Color.Brown + Case "b" + FgColor = Color.Aqua + Case "d" + FgColor = Color.Fuchsia + Case "e" + FgColor = Color.Yellow + End Select + Else + NewLine("One or two colors you selected is not available.") + End If + Case Else + FgColor = Color.White + End Select + Else + NewLine("Color is not supported for 1-bit Color Display") + Select Case App + Case "terminal" + BgColor = Color.Black + FgColor = Color.White + Case "infobar" + BgColor = Color.White + FgColor = Color.Black + End Select + End If + End If + Select Case App + Case "infobar" + Console.InfoBar.BackColor = BgColor + Console.InfoBar.ForeColor = FgColor + Strings.ComputerInfo(6) = Bg & Fg + Case "terminal" + Console.TextBox1.BackColor = BgColor + Console.TextBox1.ForeColor = FgColor + Strings.ComputerInfo(5) = Bg & Fg + End Select + End Sub +End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb b/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb new file mode 100644 index 0000000..9654185 --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb @@ -0,0 +1,15 @@ +Module Terminate + Public Sub TerminateShiftOS() + NewLine("Stopping the Window Manager...") + StopX() + Console_Full() + If Strings.OnceInfo(6) = "story" Then + NewLine("Saving game...") + SaveGame() + End If + Cursor.Show() + NewLine("Shutting down...") + ShiftOSMenu.Show() + Console.Close() + End Sub +End Module diff --git a/ShiftOS-TheRevival/Functions/InGame/Terminate.vb b/ShiftOS-TheRevival/Functions/InGame/Terminate.vb deleted file mode 100644 index 9654185..0000000 --- a/ShiftOS-TheRevival/Functions/InGame/Terminate.vb +++ /dev/null @@ -1,15 +0,0 @@ -Module Terminate - Public Sub TerminateShiftOS() - NewLine("Stopping the Window Manager...") - StopX() - Console_Full() - If Strings.OnceInfo(6) = "story" Then - NewLine("Saving game...") - SaveGame() - End If - Cursor.Show() - NewLine("Shutting down...") - ShiftOSMenu.Show() - Console.Close() - End Sub -End Module -- cgit v1.2.3