story mode completed

This commit is contained in:
EverythingWindows 2022-11-03 04:28:19 +07:00
parent 0f683e5c35
commit ec630f54d6
10 changed files with 300 additions and 17 deletions

View file

@ -0,0 +1,48 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class IntroStory
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.OpacityPlay = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'OpacityPlay
'
'
'IntroStory
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Name = "IntroStory"
Me.ShowIcon = False
Me.ShowInTaskbar = False
Me.Text = "IntroStory"
Me.TopMost = True
Me.ResumeLayout(False)
End Sub
Friend WithEvents OpacityPlay As Timer
End Class

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="OpacityPlay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,35 @@
Public Class IntroStory
Dim TimerDisplay As Integer = 1
Private Sub IntroStory_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormBorderStyle = FormBorderStyle.None
WindowState = FormWindowState.Maximized
OpacityPlay.Start()
End Sub
Private Sub OpacityPlay_Tick(sender As Object, e As EventArgs) Handles OpacityPlay.Tick
Select Case TimerDisplay
Case 1, 5, 9, 13, 17
Visible = True
TimerDisplay = TimerDisplay + 1
Case 3, 7, 11, 15, 19
Visible = False
TimerDisplay = TimerDisplay + 1
Case 21
BackColor = Color.Black
Visible = True
Opacity = 0.1
TimerDisplay = 22
Case 22
If Opacity = 1 Then
Strings.ComputerInfo(3) = "0"
Strings.IsFree = False
Terminal.Show()
Close()
Else
Opacity = Opacity + 0.05
End If
Case Else
TimerDisplay = TimerDisplay + 1
End Select
End Sub
End Class

View file

@ -134,9 +134,11 @@ Partial Class ShiftOSMenu
Me.Controls.Add(Me.btn_Aboot) Me.Controls.Add(Me.btn_Aboot)
Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.Label1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False Me.MaximizeBox = False
Me.Name = "ShiftOSMenu" Me.Name = "ShiftOSMenu"
Me.ShowIcon = False Me.ShowIcon = False
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Main Menu" Me.Text = "Main Menu"
CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).EndInit()

View file

@ -57,7 +57,10 @@ Public Class ShiftOSMenu
btn_Aboot.Text = "Back" btn_Aboot.Text = "Back"
btn_Exit.Visible = False btn_Exit.Visible = False
Case "New Game" Case "New Game"
MsgBox("This feature is in development") Strings.IsFree = False
MsgBox("This feature is in development, be sure to watch out for bugs")
IntroStory.Show()
Close()
End Select End Select
End Sub End Sub

View file

@ -1,9 +1,8 @@
Public Class Strings Public Class Strings
Public Shared OSInfo() As String Public Shared OSInfo() As String
Public Shared ComputerInfo(2) As String Public Shared ComputerInfo(3) As String
Public Shared IsFree As Boolean Public Shared IsFree As Boolean
Public Shared OnceInfo(0) As String Public Shared OnceInfo(0) As String
Public Shared StoryChapter As Integer
Public Shared AvailableFeature(1) As String Public Shared AvailableFeature(1) As String
'STRING CATEGORIZATION WRITING RULES! 'STRING CATEGORIZATION WRITING RULES!
@ -32,6 +31,7 @@
'0 = Computer Name (0.1) (default : shiftos) '0 = Computer Name (0.1) (default : shiftos)
'1 = Username (0.1) (default : user) '1 = Username (0.1) (default : user)
'2 = Codepoint (0.2) (default : 0) '2 = Codepoint (0.2) (default : 0)
'3 = Story Chapter (0.2) (default : 0 for New Game)
' '
'AvailableFeature (Default is defined on the Story Mode, Free Mode automatically assigns every available feature to 1)Strings: 'AvailableFeature (Default is defined on the Story Mode, Free Mode automatically assigns every available feature to 1)Strings:
'0 = MAN command [Manual on each command] (0.2) (default : 0) '0 = MAN command [Manual on each command] (0.2) (default : 0)

View file

@ -1,9 +1,9 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Terminal Partial Class Terminal
Inherits System.Windows.Forms.Form Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list. 'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _ <System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean) Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try Try
If disposing AndAlso components IsNot Nothing Then If disposing AndAlso components IsNot Nothing Then
@ -20,9 +20,11 @@ Partial Class Terminal
'NOTE: The following procedure is required by the Windows Form Designer 'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer. 'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.TextBox1 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.StoryOnlyTimer = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout() Me.SuspendLayout()
' '
'TextBox1 'TextBox1
@ -38,6 +40,9 @@ Partial Class Terminal
Me.TextBox1.Size = New System.Drawing.Size(800, 450) Me.TextBox1.Size = New System.Drawing.Size(800, 450)
Me.TextBox1.TabIndex = 0 Me.TextBox1.TabIndex = 0
' '
'StoryOnlyTimer
'
'
'Terminal 'Terminal
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -52,4 +57,5 @@ Partial Class Terminal
End Sub End Sub
Friend WithEvents TextBox1 As TextBox Friend WithEvents TextBox1 As TextBox
Friend WithEvents StoryOnlyTimer As Timer
End Class End Class

View file

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="StoryOnlyTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View file

@ -1,9 +1,13 @@
Public Class Terminal Imports System.IO
Public Class Terminal
Public command As String Public command As String
Public DefaultPrompt As String Public DefaultPrompt As String
Public TrackPos As Integer Public TrackPos As Integer
Public AdvancedCommand As Boolean Public AdvancedCommand As Boolean
Public BadCommand As Boolean Public BadCommand As Boolean
Public DisplayStory As Integer
Public StoryToTell As String
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormBorderStyle = FormBorderStyle.None FormBorderStyle = FormBorderStyle.None
@ -15,7 +19,16 @@
PrintPrompt() PrintPrompt()
AssignPrompt() AssignPrompt()
Else Else
If Strings.ComputerInfo(3) = "0" Then
TextBox1.ReadOnly = True
StoryOnlyTimer.Start()
Else
Strings.ComputerInfo(0) = "shiftos"
Strings.ComputerInfo(1) = "user"
Strings.ComputerInfo(2) = 0
PrintPrompt()
AssignPrompt()
End If
End If End If
TextBox1.Select(TextBox1.TextLength, 0) TextBox1.Select(TextBox1.TextLength, 0)
TextBox1.ScrollToCaret() TextBox1.ScrollToCaret()
@ -215,17 +228,17 @@
BadCommand = False BadCommand = False
End If End If
End If End If
If command Like "print *" Then If command Like "print *" Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & command.Substring(6) TextBox1.Text = TextBox1.Text & Environment.NewLine & command.Substring(6)
Dim printed As String = command.Replace("print ", "") Dim printed As String = command.Replace("print ", "")
''It has the same issue, only displays in lowercase ''It has the same issue, only displays in lowercase
'TextBox1.Text = TextBox1.Text & Environment.NewLine & printed 'TextBox1.Text = TextBox1.Text & Environment.NewLine & printed
BadCommand = False BadCommand = False
End If
AdvancedCommand = False
End If End If
AdvancedCommand = False
End If
If BadCommand = True Then If BadCommand = True Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Bad command or wrong file name" TextBox1.Text = TextBox1.Text & Environment.NewLine & "Bad command or wrong file name"
End If End If
End Sub End Sub
@ -310,4 +323,45 @@
TextBox1.Select(TextBox1.TextLength, 0) TextBox1.Select(TextBox1.TextLength, 0)
TextBox1.ScrollToCaret() TextBox1.ScrollToCaret()
End Sub 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
TextBox1.Text = "Connected to <null>"
Case 25
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: Hey there, Unknown user!"
Case 40
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: You have been selected for an unvolentary test on my experimental operating system, ShiftOS"
Case 90
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: ShiftOS is an operating system that purposes itself to evolve itself as the time progresses"
Case 140
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: I will add features into the operating system as you use it"
Case 170
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: Currently ShiftOS didn't have that much function aside from a command line with little command"
Case 190
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: I'll install ShiftOS now on your system"
Case 215
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null>: I will come back and contact you later on when the time is necessary, see you!"
Case 250
TextBox1.Text = TextBox1.Text & Environment.NewLine & "<null> Disconnected"
Case 275
TextBox1.Text = "Installing ShiftOS..."
Case 350
TextBox1.Text = "ShiftOS Installed, The computer will restart in a few seconds"
Case 400
TextBox1.Text = Nothing
TextBox1.ReadOnly = False
Strings.ComputerInfo(0) = "shiftos"
Strings.ComputerInfo(1) = "user"
Strings.ComputerInfo(2) = 0
PrintPrompt()
AssignPrompt()
TextBox1.Select(TextBox1.TextLength, 0)
TextBox1.ScrollToCaret()
End Select
End Select
DisplayStory = DisplayStory + 1
End Sub
End Class End Class

View file

@ -99,6 +99,12 @@
<Compile Include="MainForms\BugSlap.vb"> <Compile Include="MainForms\BugSlap.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="MainForms\IntroStory.Designer.vb">
<DependentUpon>IntroStory.vb</DependentUpon>
</Compile>
<Compile Include="MainForms\IntroStory.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForms\Shiftoriums.vb" /> <Compile Include="MainForms\Shiftoriums.vb" />
<Compile Include="MainForms\ShiftOSMenu.vb"> <Compile Include="MainForms\ShiftOSMenu.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
@ -136,6 +142,9 @@
<EmbeddedResource Include="MainForms\BugSlap.resx"> <EmbeddedResource Include="MainForms\BugSlap.resx">
<DependentUpon>BugSlap.vb</DependentUpon> <DependentUpon>BugSlap.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="MainForms\IntroStory.resx">
<DependentUpon>IntroStory.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForms\Terminal.resx"> <EmbeddedResource Include="MainForms\Terminal.resx">
<DependentUpon>Terminal.vb</DependentUpon> <DependentUpon>Terminal.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>