aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-23 14:53:10 -0400
committerMichael <[email protected]>2017-04-23 14:53:10 -0400
commite833a9bf2751f16d8614af9aa20f5b9bec3d81a8 (patch)
tree2bed17163caeb9f417394d91b741d6c7d6766a8c /ShiftOS_TheReturn
parentba0ae29bbb7eee83c5a4969316d97b43b5f18ba0 (diff)
downloadshiftos_thereturn-e833a9bf2751f16d8614af9aa20f5b9bec3d81a8.tar.gz
shiftos_thereturn-e833a9bf2751f16d8614af9aa20f5b9bec3d81a8.tar.bz2
shiftos_thereturn-e833a9bf2751f16d8614af9aa20f5b9bec3d81a8.zip
FUCKTONS OF SHIFTORIUM WORK
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/Command.cs2
-rw-r--r--ShiftOS_TheReturn/Commands.cs2
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs2
-rw-r--r--ShiftOS_TheReturn/ShiftOS.Engine.csproj1
-rw-r--r--ShiftOS_TheReturn/ShiftnetSite.cs46
-rw-r--r--ShiftOS_TheReturn/Shiftorium.cs6
6 files changed, 53 insertions, 6 deletions
diff --git a/ShiftOS_TheReturn/Command.cs b/ShiftOS_TheReturn/Command.cs
index c6d58e1..09cf206 100644
--- a/ShiftOS_TheReturn/Command.cs
+++ b/ShiftOS_TheReturn/Command.cs
@@ -104,7 +104,7 @@ namespace ShiftOS.Engine
/// <summary>
/// Gets whether the dependent upgrade(s) are installed.
/// </summary>
- public bool Installed
+ public virtual bool Installed
{
get
{
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs
index 0257f11..ce94030 100644
--- a/ShiftOS_TheReturn/Commands.cs
+++ b/ShiftOS_TheReturn/Commands.cs
@@ -612,7 +612,7 @@ shiftorium.buy{{upgrade:""{upg.ID}""}}");
cat = args["cat"].ToString();
}
- Dictionary<string, int> upgrades = new Dictionary<string, int>();
+ Dictionary<string, long> upgrades = new Dictionary<string, long>();
int maxLength = 5;
IEnumerable<ShiftoriumUpgrade> upglist = Shiftorium.GetAvailable();
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 998c60d..3e68a70 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -223,7 +223,7 @@ namespace ShiftOS.Engine
public static event EmptyEventHandler GameReady;
- public static void TransferCodepointsToVoid(int amount)
+ public static void TransferCodepointsToVoid(long amount)
{
CurrentSave.Codepoints -= amount;
NotificationDaemon.AddNotification(NotificationType.CodepointsSent, amount);
diff --git a/ShiftOS_TheReturn/ShiftOS.Engine.csproj b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
index b6ff903..f7b730f 100644
--- a/ShiftOS_TheReturn/ShiftOS.Engine.csproj
+++ b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
@@ -124,6 +124,7 @@
<Compile Include="SaveSystem.cs" />
<Compile Include="Scripting.cs" />
<Compile Include="ServerManager.cs" />
+ <Compile Include="ShiftnetSite.cs" />
<Compile Include="Shiftorium.cs" />
<Compile Include="Skinning.cs" />
<Compile Include="Story.cs" />
diff --git a/ShiftOS_TheReturn/ShiftnetSite.cs b/ShiftOS_TheReturn/ShiftnetSite.cs
new file mode 100644
index 0000000..5460171
--- /dev/null
+++ b/ShiftOS_TheReturn/ShiftnetSite.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShiftOS.Engine
+{
+ public interface IShiftnetSite
+ {
+ void Setup();
+ void OnSkinLoad();
+ void OnUpgrade();
+
+ event Action<string> GoToUrl;
+ event Action GoBack;
+ }
+
+ /// <summary>
+ /// Marks a shiftnet site as a fundamental, and will make it display on the homepage.
+ /// </summary>
+ public class ShiftnetFundamentalAttribute : Attribute
+ {
+
+ }
+
+ public interface IShiftnetClient
+ {
+ void NavigateToUrl(string url);
+ void RefreshSite();
+ }
+
+ public class ShiftnetSiteAttribute : Attribute
+ {
+ public ShiftnetSiteAttribute(string url, string name, string description)
+ {
+ Url = url;
+ Name = name;
+ Description = description;
+ }
+
+ public string Url { get; private set; }
+ public string Name { get; private set; }
+ public string Description { get; private set; }
+ }
+}
diff --git a/ShiftOS_TheReturn/Shiftorium.cs b/ShiftOS_TheReturn/Shiftorium.cs
index 43ea13a..c46aed0 100644
--- a/ShiftOS_TheReturn/Shiftorium.cs
+++ b/ShiftOS_TheReturn/Shiftorium.cs
@@ -85,7 +85,7 @@ namespace ShiftOS.Engine
return GetDefaults().Where(x => x.Category == cat).FirstOrDefault(x => x.Installed == false) == null;
}
- public static bool Buy(string id, int cost)
+ public static bool Buy(string id, long cost)
{
if(SaveSystem.CurrentSave.Codepoints >= cost)
{
@@ -188,7 +188,7 @@ namespace ShiftOS.Engine
}
- public static int GetCPValue(string id)
+ public static long GetCPValue(string id)
{
foreach(var upg in GetDefaults())
{
@@ -316,7 +316,7 @@ namespace ShiftOS.Engine
{
public string Name { get; set; }
public string Description { get; set; }
- public int Cost { get; set; }
+ public long 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; }