aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs81
1 files changed, 71 insertions, 10 deletions
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 93a8add..50aa260 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -98,13 +98,25 @@ namespace ShiftOS.Engine
}
Thread.Sleep(350);
- Console.WriteLine("Initiating kernel...");
+ Console.WriteLine("ShiftKernel v0.4.2");
+ Console.WriteLine("(MIT) DevX 2017, Very Little Rights Reserved");
+ Console.WriteLine("");
+ Console.WriteLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR");
+ Console.WriteLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
+ Console.WriteLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
+ Console.WriteLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER");
+ Console.WriteLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,");
+ Console.WriteLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE");
+ Console.WriteLine("SOFTWARE.");
+ Console.WriteLine("");
Thread.Sleep(250);
- Console.WriteLine("Reading filesystem...");
+ Console.WriteLine("[init] Kernel boot complete.");
+ Console.WriteLine("[sfs] Loading SFS driver v3");
Thread.Sleep(100);
- Console.WriteLine("Reading configuration...");
+ Console.WriteLine("[sfs] 4096 blocks read.");
+ Console.WriteLine("[simpl-conf] Reading configuration files (global-3.conf)");
- Console.WriteLine("{CONNECTING_TO_MUD}");
+ Console.WriteLine("[inetd] Connecting to network...");
if (defaultConf.ConnectToMud == true)
{
@@ -113,7 +125,7 @@ namespace ShiftOS.Engine
{
//Connection successful! Stop waiting!
guidReceived = true;
- Console.WriteLine("Connection successful.");
+ Console.WriteLine("[inetd] Connection successful.");
};
try
@@ -125,20 +137,20 @@ namespace ShiftOS.Engine
{
Thread.Sleep(10);
}
- Console.WriteLine("GUID received - bootstrapping complete.");
+ Console.WriteLine("[inetd] DHCP GUID recieved, finished setup");
FinishBootstrap();
}
catch (Exception ex)
{
//No errors, this never gets called.
- Console.WriteLine("{ERROR}: " + ex.Message);
+ Console.WriteLine("[inetd] SEVERE: " + ex.Message);
Thread.Sleep(3000);
ServerManager.StartLANServer();
while (ServerManager.thisGuid == new Guid())
{
Thread.Sleep(10);
}
- Console.WriteLine("GUID received - bootstrapping complete.");
+ Console.WriteLine("[inetd] DHCP GUID recieved, finished setup");
FinishBootstrap();
}
}
@@ -196,7 +208,7 @@ namespace ShiftOS.Engine
Thread.Sleep(75);
Thread.Sleep(50);
- Console.WriteLine("{SYSTEM_INITIATED}");
+ Console.WriteLine("[usr-man] Accepting logins on local tty 1.");
Sysname:
bool waitingForNewSysName = false;
@@ -257,7 +269,7 @@ namespace ShiftOS.Engine
Password = "",
Permissions = UserPermissions.Root
});
- Console.WriteLine("No users found. Creating new user with username \"root\", with no password.");
+ Console.WriteLine("[usr-man] WARN: No users found. Creating new user with username \"root\", with no password.");
}
TerminalBackend.InStory = false;
@@ -293,7 +305,13 @@ namespace ShiftOS.Engine
{
if (progress == 0)
{
+<<<<<<< HEAD
+ string loginstr = CurrentSave.SystemName + " login: ";
+ string getuser = text.Remove(0, loginstr.Length);
+ if (CurrentSave.Users.FirstOrDefault(x => x.Username == getuser) == null)
+=======
if (!string.IsNullOrWhiteSpace(text))
+>>>>>>> origin/master
{
if (CurrentSave.Users.FirstOrDefault(x => x.Username == text) == null)
{
@@ -313,6 +331,11 @@ namespace ShiftOS.Engine
goback = true;
progress++;
}
+<<<<<<< HEAD
+ username = getuser;
+ progress++;
+=======
+>>>>>>> origin/master
}
else if (progress == 1)
{
@@ -337,6 +360,43 @@ namespace ShiftOS.Engine
Console.WriteLine(CurrentSave.SystemName + " login:");
while (progress == 0)
{
+<<<<<<< HEAD
+ string passwordstr = "password: ";
+ string getpass = text.Remove(0, passwordstr.Length);
+ var user = CurrentSave.Users.FirstOrDefault(x => x.Username == username);
+ if (user.Password == getpass)
+ {
+ Console.WriteLine("Welcome to ShiftOS.");
+ CurrentUser = user;
+ Thread.Sleep(2000);
+ progress++;
+ }
+ else
+ {
+ Console.WriteLine("Access denied.");
+ goback = true;
+ progress++;
+ }
+ TerminalBackend.TextSent -= ev;
+ }
+ };
+ TerminalBackend.TextSent += ev;
+
+ Console.Write(CurrentSave.SystemName + " login: ");
+ while(progress == 0)
+ {
+ Thread.Sleep(10);
+ }
+ if (goback)
+ goto Login;
+ Console.Write("password: ");
+ while (progress == 1)
+ Thread.Sleep(10);
+ if (goback)
+ goto Login;
+
+
+=======
Thread.Sleep(10);
}
if (goback)
@@ -347,6 +407,7 @@ namespace ShiftOS.Engine
if (goback)
goto Login;
}
+>>>>>>> origin/master
TerminalBackend.PrefixEnabled = true;
Shiftorium.LogOrphanedUpgrades = true;
Desktop.InvokeOnWorkerThread(new Action(() =>