Optimization on Intro Story

This commit is contained in:
EverythingWindows 2022-11-17 10:56:11 +07:00
parent 415ee1e40d
commit e08f5e8e55
4 changed files with 57 additions and 51 deletions

View file

@ -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 <null>")
Case 25
NewLine("<null>: Hey there, Unknown user!")
Case 60
NewLine("<null>: Congratulaions! You have been involuntarily selected for a test on my experimental operating system, ShiftOS.")
Case 125
NewLine("<null>: ShiftOS is an operating system that will evolve itself as you use it as I progressively add more features into ShiftOS.")
Case 160
NewLine("<null>: Currently ShiftOS isn't much from a basic command-line operating system.")
Case 210
NewLine("<null>: I don't wish to reveal my indentity at this point in time.")
Case 270
NewLine("<null>: I will install ShiftOS on your system once I leave while I work on... something else.")
Case 335
NewLine("<null>: Once you have ShiftOS rich feature enough, I will come back to you. In the mean time, goodbye!")
Case 400
NewLine("<null> 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

View file

@ -1,19 +1,19 @@
Imports System.IO
Public Class Console
Public TrackPos As Integer
Public DefaultPrompt As String
Public BadCommand As Boolean
Public DisplayStory As Integer
Public StoryToTell As String
Public ChangeInterpreter As Boolean = False
Public CurrentInterpreter As String = "terminal"
Public CurrentDirectory As String
Public Pseudodir As String
Public StayAtChapter As Boolean = False
Public ToolBarUse As Boolean = False
Public ReleaseCursor As Boolean = False
Public ShOSKey As String
Public TrackPos As Integer 'Tracking the position of the caret in order to not bypass the user@hostname string
Public DefaultPrompt As String 'Default prompt to display in ShiftOS, usually it's user@hostname
Public BadCommand As Boolean 'Detect if it's a bad command or not
Public DisplayStory As Integer 'Keep record for displaying the DevX's or other's monologue
Public StoryToTell As String 'Which chapter that you're going to be in
Public ChangeInterpreter As Boolean = False 'Default interpreter is Terminal, if it's changed to True, there'll be other program used by Console
Public CurrentInterpreter As String = "terminal" 'Shows what program is using Console
Public CurrentDirectory As String 'Current Directory for ShiftOS Explorer
Public Pseudodir As String 'Pseudo-directory for ShiftFS
Public StayAtChapter As Boolean = False 'If this set to true, then intro for chapters are mostly going to be in
Public ToolBarUse As Boolean = False 'Either any program is using ToolBar or not
Public ReleaseCursor As Boolean = False 'Release cursor from TrackPos
Public ShOSKey As String 'DOSKEY tracking string for ShiftOS
Private Sub Console_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Console_Full()
@ -233,44 +233,7 @@ Public Class Console
End Sub
Private Sub StoryOnlyTimer_Tick(sender As Object, e As EventArgs) Handles StoryOnlyTimer.Tick
Select Case Strings.ComputerInfo(3)
Case "0"
Select Case DisplayStory
Case 5
ResetLine("Connected to <null>")
Case 25
NewLine("<null>: Hey there, Unknown user!")
Case 60
NewLine("<null>: Congratulaions! You have been involuntarily selected for a test on my experimental operating system, ShiftOS.")
Case 125
NewLine("<null>: ShiftOS is an operating system that will evolve itself as you use it as I progressively add more features into ShiftOS.")
Case 160
NewLine("<null>: Currently ShiftOS isn't much from a basic command-line operating system.")
Case 210
NewLine("<null>: I don't wish to reveal my indentity at this point in time.")
Case 270
NewLine("<null>: I will install ShiftOS on your system once I leave while I work on... something else.")
Case 335
NewLine("<null>: Once you have ShiftOS rich feature enough, I will come back to you. In the mean time, goodbye!")
Case 400
NewLine("<null> Disconnected")
Case 430
ResetLine("Installing ShiftOS...")
Case 550
ResetLine("ShiftOS Installed, The computer will restart in a few seconds")
Case 600
StoryOnlyTimer.Stop()
TextBox1.Text = Nothing
TextBox1.ReadOnly = False
Strings.ComputerInfo(0) = "shiftos"
Strings.ComputerInfo(1) = "user"
CheckFeature()
Terminal_PrintPrompt()
Terminal_AssignPrompt()
TextBox1.Select(TextBox1.TextLength, 0)
TextBox1.ScrollToCaret()
End Select
End Select
StoryLineIntro(DisplayStory)
DisplayStory = DisplayStory + 1
End Sub

View file

@ -173,6 +173,7 @@ Public Class ShiftOSMenu
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\version.txt", My.Resources.CurrentVersion)
End If
CheckUpdate()
End If
End Sub

View file

@ -133,6 +133,7 @@
<Compile Include="MainForms\IntroStory.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Functions\InGame\IntroStoryTell.vb" />
<Compile Include="MainForms\SaveLoadSystem.vb" />
<Compile Include="Functions\InGame\Shiftoriums.vb" />
<Compile Include="MainForms\ShiftOSMenu.vb">