Browse Source

[2.0.3.9] Removed ScrypYard API

Zariteis 4 years ago
parent
commit
866a6acb96
2 changed files with 0 additions and 135 deletions
  1. 0 117
      API/ShopPlatform.cs
  2. 0 18
      API/ShopPlatformEntry.cs

+ 0 - 117
API/ShopPlatform.cs

@@ -1,117 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace Ships.API
-{
-  public class ShopPlatform
-  {
-    public readonly ShopPlatformSpacingType Type;
-
-    public readonly string Title;
-
-    internal List<ShopPlatformEntry> Entries = new List<ShopPlatformEntry>();
-
-    internal static Dictionary<string, ShopPlatform> ShopPlatforms = new Dictionary<string, ShopPlatform>();
-
-    public static ShopPlatform DefaultObjects
-    {
-      get => ShopPlatforms["DefaultObjects"];
-    }
-
-    public static ShopPlatform DefaultBlocks
-    {
-      get => ShopPlatforms["DefaultBlocks"];
-    }
-
-    public static ShopPlatform DefaultWalls
-    {
-      get => ShopPlatforms["DefaultWalls"];
-    }
-
-    public ShopPlatform(string title, ShopPlatformSpacingType spacingType = ShopPlatformSpacingType.Normal)
-    {
-      this.Type = spacingType;
-      this.Title = title;
-    }
-
-    public virtual ShopPlatform Register()
-    {
-      return Register(this.Title);
-    }
-
-    public virtual ShopPlatform Register(string id)
-    {
-      if (ShopPlatforms.ContainsKey(id))
-        ShopPlatforms.Remove(id);
-
-      ShopPlatforms.Add(id, this);
-      return this;
-    }
-
-    public ShopPlatformSpacingType GetShopPlatformSpacingType()
-    {
-      return Type;
-    }
-
-    public void AddShopPlatformEntry(ShopPlatformEntry row)
-    {
-      foreach (var e in Entries)
-        if (e.CurrencyItemID == row.CurrencyItemID
-          && e.ItemID == row.ItemID
-          && e.Quantity == row.Quantity
-          && e.Price == row.Price)
-          return;
-      Entries.Add(row);
-    }
-
-    public void RemoveShopPlatformEntry(ShopPlatformEntry row)
-    {
-      Entries.Remove(row);
-    }
-
-    public ShopPlatformEntry[] GetShopPlatformEntries()
-    {
-      return Entries.ToArray();
-    }
-
-    public static ShopPlatform[] GetShopPlatforms()
-    {
-      return new List<ShopPlatform>(ShopPlatforms.Values).ToArray();
-    }
-
-    internal int GetSpacesPerRow()
-    {
-      int spaces = 0;
-      switch (Type)
-      {
-        case ShopPlatformSpacingType.Normal:
-          spaces = 7;
-          break;
-        case ShopPlatformSpacingType.Near:
-          spaces = 13;
-          break;
-        case ShopPlatformSpacingType.Far:
-          spaces = 3;
-          break;
-      }
-      return spaces;
-    }
-
-    internal int GetRowsNeeded()
-    {
-      return ((Entries.Count - 1) / GetSpacesPerRow()) + 1;
-    }
-
-    internal static void Reset()
-    {
-      ShopPlatforms = new Dictionary<string, ShopPlatform>();
-    }
-  }
-
-  public enum ShopPlatformSpacingType
-  {
-    Normal,
-    Near,
-    Far
-  }
-}

+ 0 - 18
API/ShopPlatformEntry.cs

@@ -1,18 +0,0 @@
-namespace Ships.API
-{
-  public class ShopPlatformEntry
-  {
-    public int ItemID { get; protected set; }
-    public int Price { get; protected set; }
-    public int Quantity { get; protected set; }
-    public int CurrencyItemID { get; protected set; }
-
-    public ShopPlatformEntry(int itemID, int price, int quantity = 1, int currencyItemID = 57)
-    {
-      this.ItemID = itemID;
-      this.Price = price;
-      this.CurrencyItemID = currencyItemID;
-      this.Quantity = quantity;
-    }
-  }
-}