Integrating Chapter 2 into the game and minor changes to check the story

This commit is contained in:
EverythingWindows 2022-11-23 21:30:54 +07:00
parent 2c4952012f
commit 537ba4982e
10 changed files with 110 additions and 30 deletions

View file

@ -1,4 +1,5 @@
Module ConsoleAPI Module ConsoleAPI
Public StayAtChapter As Boolean = False 'If this set to true, then intro for chapters are mostly going to be in
Public Sub Console_Windowed() Public Sub Console_Windowed()
Console.WindowState = FormWindowState.Normal Console.WindowState = FormWindowState.Normal

View file

@ -7,11 +7,11 @@ Module TerminalAPI
Public IsConsoleParent As Boolean Public IsConsoleParent As Boolean
Public Sub InitializeTerminal() Public Sub InitializeTerminal()
Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
Strings.OnceInfo(4) = "!"
If IsConsoleParent = True Then If IsConsoleParent = True Then
Console.TopMost = False Console.TopMost = False
Cursor.Hide() Cursor.Hide()
Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
Strings.OnceInfo(4) = "!"
Strings.OnceInfo(7) = Console.Width Strings.OnceInfo(7) = Console.Width
Strings.OnceInfo(8) = Console.Height Strings.OnceInfo(8) = Console.Height
If Strings.IsFree = True Then If Strings.IsFree = True Then
@ -22,22 +22,33 @@ Module TerminalAPI
Terminal_PrintPrompt() Terminal_PrintPrompt()
Terminal_AssignPrompt() Terminal_AssignPrompt()
Else Else
If Console.StayAtChapter = True Then If StayAtChapter = True Then
LoadGame() LoadGame()
Terminal_CheckFeature() CheckNextChapterEligibility()
Terminal_PrintPrompt() If NextChapter = True Then
Terminal_AssignPrompt() StayAtChapter = False
Else InitializeTerminal()
If Strings.ComputerInfo(3) = "0" Then
Console.TextBox1.ReadOnly = True
Console.StayAtChapter = True
Console.StoryOnlyTimer.Start()
Else Else
LoadGame()
Terminal_CheckFeature() Terminal_CheckFeature()
Terminal_PrintPrompt() Terminal_PrintPrompt()
Terminal_AssignPrompt() Terminal_AssignPrompt()
End If End If
Else
Select Case Strings.ComputerInfo(3)
Case 0
Console.TextBox1.ReadOnly = True
StayAtChapter = True
Console.StoryOnlyTimer.Start()
Case 1
Console.TextBox1.ReadOnly = True
StayAtChapter = True
Console.StoryOnlyTimer.Start()
Case Else
LoadGame()
Terminal_CheckFeature()
Terminal_PrintPrompt()
Terminal_AssignPrompt()
End Select
End If End If
End If End If
Else Else
@ -282,15 +293,21 @@ Module TerminalAPI
Case "shutdown", "shut down" Case "shutdown", "shut down"
TerminateShiftOS() TerminateShiftOS()
Case "startg" Case "startg"
Undeveloped() If Strings.AvailableFeature(35) = 1 Then
If IsStartG = False Then If IsStartG = False Then
StartG() StartG()
AdvancedCommand = False
NormalCommand()
End If
End If End If
Case "stopg" Case "stopg"
If IsStartG = True Then If Strings.AvailableFeature(35) = 1 Then
StopG() If IsStartG = True Then
StopG()
AdvancedCommand = False
NormalCommand()
End If
End If End If
Undeveloped()
Case "textpad" Case "textpad"
If Strings.AvailableFeature(17) = "1" Then If Strings.AvailableFeature(17) = "1" Then
TextPad_WarnFile() TextPad_WarnFile()

View file

@ -1,4 +1,18 @@
Module IntroStoryTell Module IntroStoryTell
Public NextChapter As Boolean
Public Sub CheckNextChapterEligibility()
Select Case Strings.ComputerInfo(3)
Case 0
If Strings.ComputerInfo(4) = 35 Then
Strings.ComputerInfo(3) = 1
NextChapter = True
Else
NextChapter = False
End If
End Select
End Sub
Public Sub StoryLineIntro(Timestamp As Integer) Public Sub StoryLineIntro(Timestamp As Integer)
Select Case Strings.ComputerInfo(3) Select Case Strings.ComputerInfo(3)
Case 0 Case 0
@ -65,6 +79,17 @@
NewLine("<null> : Once you able to afford it and installing it, there's a guide to use the window manager") NewLine("<null> : Once you able to afford it and installing it, there's a guide to use the window manager")
Case 600 Case 600
NewLine("<null> : Alright, I gotta go now and see you in the next progress.") NewLine("<null> : Alright, I gotta go now and see you in the next progress.")
Case 630
NewLine("<null> Disconnected")
Case 675
Console.StoryOnlyTimer.Stop()
Console.TextBox1.Text = Nothing
Console.TextBox1.ReadOnly = False
Strings.AvailableFeature(35) = 0
Terminal_CheckFeature()
Terminal_PrintPrompt()
Terminal_AssignPrompt()
TextRebind()
End Select End Select
End Select End Select
End Sub End Sub

View file

@ -3,7 +3,7 @@
Public Shared ComputerInfo(7) As String Public Shared ComputerInfo(7) As String
Public Shared IsFree As Boolean Public Shared IsFree As Boolean
Public Shared OnceInfo(8) As String Public Shared OnceInfo(8) As String
Public Shared AvailableFeature(35) As String Public Shared AvailableFeature(37) As String
Public Shared CLIInterpreter As String Public Shared CLIInterpreter As String
Public Shared SaveFile As String Public Shared SaveFile As String
Public Shared Achievement As String Public Shared Achievement As String
@ -50,6 +50,8 @@
'7 = Window Manager (0.2.7) (default : 0) '7 = Window Manager (0.2.7) (default : 0)
' '
'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: '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:
'Chapter 1
'
'0 = MAN command [Manual on each command] (0.2) (default : 0) '0 = MAN command [Manual on each command] (0.2) (default : 0)
'1 = CLEAR command [Clearing the screen] (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) '2 = PRINT command [Printing a string] (0.2.2) (default : 0)
@ -86,6 +88,10 @@
'33 = Unzip command [Ability to extract file in a zip file] (default : 0) '33 = Unzip command [Ability to extract file in a zip file] (default : 0)
'34 = MathQuiz [Simple arithmatical question game to get codepoint] (default : 0) '34 = MathQuiz [Simple arithmatical question game to get codepoint] (default : 0)
' '
'Chapter 2 for ShiftOS
'35 = Dual Window Manager [Simple Window Manager for ShiftOS] (default : 0)
'36 = Shifter [Customization program for ShiftOS, DuWM version] (default : 0)
'
'Features bought hierarchy : 'Features bought hierarchy :
' '
'Chapter 1: 'Chapter 1:
@ -128,7 +134,6 @@
' '
'Chpater 2: 'Chpater 2:
'>Dual Window Manager (200 CP) '>Dual Window Manager (200 CP)
'>>Console Scrollbra (200 CP)
'>>DuWM RGB Support (225 CP) '>>DuWM RGB Support (225 CP)
'>>>DuWM 16 Colors Support (275 CP) '>>>DuWM 16 Colors Support (275 CP)
'>>Shifter (250 CP) '>>Shifter (250 CP)

View file

@ -6,6 +6,7 @@
'Only AvailableFeature that are in the value of 0 can be displayed in the list 'Only AvailableFeature that are in the value of 0 can be displayed in the list
NewLine("Shiftorium Available Feature(s)") NewLine("Shiftorium Available Feature(s)")
NewLine(Nothing) NewLine(Nothing)
'This is for Chapter 1 features of ShiftOS
If Strings.AvailableFeature(11) = 0 Then If Strings.AvailableFeature(11) = 0 Then
NewLine("(key | 5 CP) ShiftOS Key") NewLine("(key | 5 CP) ShiftOS Key")
Else Else
@ -134,6 +135,10 @@
End If End If
End If End If
End If End If
'This is for Chapter 2 packages for ShiftOS
If Strings.AvailableFeature(35) = 0 Then
NewLine("(duwm | 200 CP) Dual Window Manager")
End If
End Sub End Sub
Public Sub Shiftorium_InformationFeatures() Public Sub Shiftorium_InformationFeatures()
@ -435,6 +440,17 @@
NewLine(ManHeader(1)) NewLine(ManHeader(1))
NormalCommand() NormalCommand()
End If End If
Case "duwm"
If Strings.AvailableFeature(35) = 0 Then
ManHeader(0) = "Dual Window Manager"
ManHeader(1) = "200 CP"
NewLine(ManHeader(0))
NewLine(Nothing)
NewLine("Simple tiling window manager for ShiftOS")
NewLine(Nothing)
NewLine(ManHeader(1))
NormalCommand()
End If
Case Else Case Else
NormalCommand() NormalCommand()
Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available" Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
@ -549,6 +565,10 @@
Case "mathquiz" Case "mathquiz"
Shiftorium_InstallFeatures(True, "mathquiz", 34, 60) Shiftorium_InstallFeatures(True, "mathquiz", 34, 60)
NormalCommand() NormalCommand()
'Chapter 2 packages
Case "duwm"
Shiftorium_InstallFeatures(True, "duwm", 35, 200)
NormalCommand()
Case Else Case Else
NormalCommand() NormalCommand()
NewLine("Shiftorium: Bad command or not available") NewLine("Shiftorium: Bad command or not available")
@ -712,6 +732,10 @@
Case "mathquiz" Case "mathquiz"
Strings.AvailableFeature(34) = "1" Strings.AvailableFeature(34) = "1"
success = True success = True
'Chapter 2 packages
Case "duwm"
Strings.AvailableFeature(35) = "1"
success = True
End Select End Select
If success = False Then If success = False Then
If IsCLI = True Then If IsCLI = True Then

View file

@ -11,7 +11,6 @@ Public Class Console
Public CurrentInterpreter As String 'Shows what program is using Console Public CurrentInterpreter As String 'Shows what program is using Console
Public CurrentDirectory As String 'Current Directory for ShiftOS Explorer Public CurrentDirectory As String 'Current Directory for ShiftOS Explorer
Public Pseudodir As String 'Pseudo-directory for ShiftFS 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 ToolBarUse As Boolean = False 'Either any program is using ToolBar or not
Public ReleaseCursor As Boolean = False 'Release cursor from TrackPos Public ReleaseCursor As Boolean = False 'Release cursor from TrackPos
Public ShOSKey As String 'DOSKEY tracking string for ShiftOS Public ShOSKey As String 'DOSKEY tracking string for ShiftOS

View file

@ -52,6 +52,7 @@ Partial Class Uni_KnowledgeInput
Me.cmb_Category.Name = "cmb_Category" Me.cmb_Category.Name = "cmb_Category"
Me.cmb_Category.Size = New System.Drawing.Size(266, 31) Me.cmb_Category.Size = New System.Drawing.Size(266, 31)
Me.cmb_Category.TabIndex = 1 Me.cmb_Category.TabIndex = 1
Me.cmb_Category.Text = "Select Category"
' '
'Panel1 'Panel1
' '
@ -66,14 +67,19 @@ Partial Class Uni_KnowledgeInput
' '
'txt_InputWord 'txt_InputWord
' '
Me.txt_InputWord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txt_InputWord.Font = New System.Drawing.Font("Comic Sans MS", 12.0!) Me.txt_InputWord.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
Me.txt_InputWord.Location = New System.Drawing.Point(302, 74) Me.txt_InputWord.Location = New System.Drawing.Point(292, 73)
Me.txt_InputWord.Name = "txt_InputWord" Me.txt_InputWord.Name = "txt_InputWord"
Me.txt_InputWord.Size = New System.Drawing.Size(470, 30) Me.txt_InputWord.Size = New System.Drawing.Size(470, 30)
Me.txt_InputWord.TabIndex = 2 Me.txt_InputWord.TabIndex = 2
' '
'lst_Guessed 'lst_Guessed
' '
Me.lst_Guessed.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lst_Guessed.Font = New System.Drawing.Font("Comic Sans MS", 12.0!) Me.lst_Guessed.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
Me.lst_Guessed.FormattingEnabled = True Me.lst_Guessed.FormattingEnabled = True
Me.lst_Guessed.ItemHeight = 23 Me.lst_Guessed.ItemHeight = 23

View file

@ -1,13 +1,15 @@
Public Class Uni_KnowledgeInput Public Class Uni_KnowledgeInput
Dim PrevWidthTxt_InputWord As Integer Dim PrevWidthTxt_InputWord As Integer = 470
Private Sub Uni_KnowledgeInput_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Uni_KnowledgeInput_Load(sender As Object, e As EventArgs) Handles MyBase.Load
PrevWidthTxt_InputWord = txt_InputWord.Width cmb_Category.Items.Remove("Animals")
End Sub End Sub
Private Sub Uni_KnowledgeInput_Resize(sender As Object, e As EventArgs) Handles MyBase.Resize Private Sub txt_InputWord_TextChanged(sender As Object, e As KeyEventArgs) Handles txt_InputWord.KeyDown
'Dim Txt_InputTextWidthRatio As Double = (txt_InputWord.Width / PrevWidthTxt_InputWord) Select Case e.KeyCode
'txt_InputWord.Width = txt_InputWord.Width * Txt_InputTextWidthRatio Case Keys.Enter
'PrevWidthTxt_InputWord = txt_InputWord.Width lst_Guessed.Items.Add(txt_InputWord.Text)
txt_InputWord.Text = Nothing
End Select
End Sub End Sub
End Class End Class

View file

@ -28,6 +28,7 @@ Public Class ShiftOSMenu
Try Try
Strings.IsFree = True Strings.IsFree = True
Strings.OnceInfo(6) = "free" Strings.OnceInfo(6) = "free"
IsConsoleParent = True
FreeRoamMode() FreeRoamMode()
Console.Show() Console.Show()
Close() Close()
@ -40,7 +41,8 @@ Public Class ShiftOSMenu
Case "Continue" Case "Continue"
Strings.IsFree = False Strings.IsFree = False
Strings.OnceInfo(6) = "story" Strings.OnceInfo(6) = "story"
Console.StayAtChapter = True IsConsoleParent = True
StayAtChapter = True
Console.Show() Console.Show()
Close() Close()
Case "No" Case "No"

View file

@ -13,7 +13,6 @@
Strings.ProcessID(DuWM_PID) = 0 Strings.ProcessID(DuWM_PID) = 0
End If End If
If Strings.ProcessID(DuWM_PID) = 0 Then If Strings.ProcessID(DuWM_PID) = 0 Then
'MsgBox(Convert.ToString(ChildForm))
DuWM_CurrentProcess = DuWM_CurrentProcess - 1 DuWM_CurrentProcess = DuWM_CurrentProcess - 1
DuWM_ChangeLayout = True DuWM_ChangeLayout = True
DuWM_WMCheck.Stop() DuWM_WMCheck.Stop()