From c81573594f509177214bbc9b64427c8aabdc30a6 Mon Sep 17 00:00:00 2001 From: AShifter Date: Sat, 25 Nov 2017 08:59:48 -0700 Subject: Add SaveSystem, FullScreen Terminal and stuff Git had a horrible seizure and removed our repo but Alex-TIMEHACK helped us get it back. --- ShiftOS.Main/Terminal/Commands/codepoints.cs | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ShiftOS.Main/Terminal/Commands/codepoints.cs (limited to 'ShiftOS.Main/Terminal/Commands/codepoints.cs') diff --git a/ShiftOS.Main/Terminal/Commands/codepoints.cs b/ShiftOS.Main/Terminal/Commands/codepoints.cs new file mode 100644 index 0000000..73dd6c9 --- /dev/null +++ b/ShiftOS.Main/Terminal/Commands/codepoints.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static ShiftOS.Engine.SaveSystem; +using System.IO; + +namespace ShiftOS.Main.Terminal.Commands +{ + public class codepoints : TerminalCommand + { + public override string Name { get; } = "codepoints"; + public override string Summary { get; } = "Shows your current amount of codepoints."; + public override string Usage { get; } = "codepoints"; + public override bool Unlocked { get; set; } = true; + + public override void Run(params string[] parameters) + { + if (parameters.Length > 0) + { + WriteLine($"sbash: unexpected token: {parameters.First()}"); + } + + using (var fs = File.OpenRead(dataDir + "\\userCodePoints.whoa")) + { + int codepoints = Whoa.Whoa.DeserialiseObject(fs, Whoa.SerialisationOptions.None); + WriteLine($"You currently have {codepoints} codepoints."); + } + } + } +} + -- cgit v1.2.3