aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/Commands.cs4
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs4
-rw-r--r--ShiftOS_TheReturn/Scripting.cs4
-rw-r--r--ShiftOS_TheReturn/ServerManager.cs2
-rw-r--r--ShiftOS_TheReturn/Shiftorium.cs10
5 files changed, 12 insertions, 12 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs
index b97cd1d..ec89539 100644
--- a/ShiftOS_TheReturn/Commands.cs
+++ b/ShiftOS_TheReturn/Commands.cs
@@ -311,7 +311,7 @@ namespace ShiftOS.Engine
if (args.ContainsKey("amount"))
try
{
- long codepointsToAdd = Convert.ToInt64(args["amount"].ToString());
+ ulong codepointsToAdd = Convert.ToUInt64(args["amount"].ToString());
SaveSystem.CurrentSave.Codepoints += codepointsToAdd;
return true;
}
@@ -639,7 +639,7 @@ shiftorium.buy{{upgrade:""{upg.ID}""}}");
cat = args["cat"].ToString();
}
- Dictionary<string, long> upgrades = new Dictionary<string, long>();
+ Dictionary<string, ulong> upgrades = new Dictionary<string, ulong>();
int maxLength = 5;
IEnumerable<ShiftoriumUpgrade> upglist = Shiftorium.GetAvailable();
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index d1b92fd..395db85 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -480,7 +480,7 @@ namespace ShiftOS.Engine
/// Deducts a set amount of Codepoints from the save file... and sends them to a place where they'll never be seen again.
/// </summary>
/// <param name="amount">The amount of Codepoints to deduct.</param>
- public static void TransferCodepointsToVoid(long amount)
+ public static void TransferCodepointsToVoid(ulong amount)
{
if (amount < 0)
throw new ArgumentOutOfRangeException("We see what you did there. Trying to pull Codepoints from the void? That won't work.");
@@ -584,7 +584,7 @@ namespace ShiftOS.Engine
/// </summary>
/// <param name="who">The character name</param>
/// <param name="amount">The amount of Codepoints.</param>
- public static void TransferCodepointsFrom(string who, long amount)
+ public static void TransferCodepointsFrom(string who, ulong amount)
{
if (amount < 0)
throw new ArgumentOutOfRangeException("We see what you did there... You can't just give a fake character Codepoints like that. It's better if you transfer them to the void.");
diff --git a/ShiftOS_TheReturn/Scripting.cs b/ShiftOS_TheReturn/Scripting.cs
index 61c6676..5021f50 100644
--- a/ShiftOS_TheReturn/Scripting.cs
+++ b/ShiftOS_TheReturn/Scripting.cs
@@ -444,7 +444,7 @@ end");
/// Retrieves the user's Codepoints from the save file.
/// </summary>
/// <returns>The user's Codepoints.</returns>
- public long getCodepoints() { return SaveSystem.CurrentSave.Codepoints; }
+ public ulong getCodepoints() { return SaveSystem.CurrentSave.Codepoints; }
/// <summary>
/// Run a command in the Terminal.
@@ -462,7 +462,7 @@ end");
/// Adds the specified amount of Codepoints to the save flie.
/// </summary>
/// <param name="cp">The codepoints to add.</param>
- public void addCodepoints(int cp)
+ public void addCodepoints(uint cp)
{
if (cp > 100 || cp <= 0)
{
diff --git a/ShiftOS_TheReturn/ServerManager.cs b/ShiftOS_TheReturn/ServerManager.cs
index abb674d..1439c0d 100644
--- a/ShiftOS_TheReturn/ServerManager.cs
+++ b/ShiftOS_TheReturn/ServerManager.cs
@@ -246,7 +246,7 @@ Ping: {ServerManager.DigitalSocietyPing} ms
var args = JsonConvert.DeserializeObject<Dictionary<string, object>>(msg.Contents);
if(args["username"] as string == SaveSystem.CurrentUser.Username)
{
- SaveSystem.CurrentSave.Codepoints += (long)args["amount"];
+ SaveSystem.CurrentSave.Codepoints += (ulong)args["amount"];
Desktop.InvokeOnWorkerThread(new Action(() =>
{
Infobox.Show($"MUD Control Centre", $"Someone bought an item in your shop, and they have paid {args["amount"]}, and as such, you have been granted these Codepoints.");
diff --git a/ShiftOS_TheReturn/Shiftorium.cs b/ShiftOS_TheReturn/Shiftorium.cs
index bd7105f..975939f 100644
--- a/ShiftOS_TheReturn/Shiftorium.cs
+++ b/ShiftOS_TheReturn/Shiftorium.cs
@@ -112,7 +112,7 @@ namespace ShiftOS.Engine
/// <param name="id">The upgrade ID to buy</param>
/// <param name="cost">The amount of Codepoints to deduct</param>
/// <returns>True if the upgrade was installed successfully, false if the user didn't have enough Codepoints or the upgrade wasn' found.</returns>
- public static bool Buy(string id, long cost)
+ public static bool Buy(string id, ulong cost)
{
if (SaveSystem.CurrentSave.Codepoints >= cost)
{
@@ -365,7 +365,7 @@ namespace ShiftOS.Engine
/// </summary>
/// <param name="id">The upgrade ID to search</param>
/// <returns>The codepoint value.</returns>
- public static long GetCPValue(string id)
+ public static ulong GetCPValue(string id)
{
foreach (var upg in GetDefaults())
{
@@ -520,7 +520,7 @@ namespace ShiftOS.Engine
{
public string Name { get; set; }
public string Description { get; set; }
- public long Cost { get; set; }
+ public ulong Cost { get; set; }
public string ID { get { return (this.Id != null ? this.Id : (Name.ToLower().Replace(" ", "_"))); } }
public string Id { get; set; }
public string Category { get; set; }
@@ -536,7 +536,7 @@ namespace ShiftOS.Engine
public class ShiftoriumUpgradeAttribute : RequiresUpgradeAttribute
{
- public ShiftoriumUpgradeAttribute(string name, long cost, string desc, string dependencies, string category) : base(name.ToLower().Replace(" ", "_"))
+ public ShiftoriumUpgradeAttribute(string name, ulong cost, string desc, string dependencies, string category) : base(name.ToLower().Replace(" ", "_"))
{
Name = name;
Description = desc;
@@ -547,7 +547,7 @@ namespace ShiftOS.Engine
public string Name { get; private set; }
public string Description { get; private set; }
- public long Cost { get; private set; }
+ public ulong Cost { get; private set; }
public string Dependencies { get; private set; }
public string Category { get; private set; }
}