blob: 73dd6c9f6689bbc0a471ac3e5d78fec292308a5a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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<int>(fs, Whoa.SerialisationOptions.None);
WriteLine($"You currently have {codepoints} codepoints.");
}
}
}
}
|