Browse Source

[2.0.5.2] moved the enum and moved the object registration

Zariteis 4 years ago
parent
commit
a438d04ac6
3 changed files with 9 additions and 9 deletions
  1. 5 0
      API/ShopPlatform.cs
  2. 0 7
      API/ShopPlatformEntryType.cs
  3. 4 2
      ScrapYard.cs

+ 5 - 0
API/ShopPlatform.cs

@@ -115,4 +115,9 @@ namespace ScrapYard.API
     Near,
     Far
   }
+
+  public enum ShopPlatformEntryType
+  {
+    Item, Chip
+  }
 }

+ 0 - 7
API/ShopPlatformEntryType.cs

@@ -1,7 +0,0 @@
-namespace ScrapYard.API
-{
-  public enum ShopPlatformEntryType
-  {
-    Item, Chip
-  }
-}

+ 4 - 2
ScrapYard.cs

@@ -245,7 +245,6 @@ namespace ScrapYard
         scrapYardStand.SetActive(false);
         scrapYardStand.AddComponent<ScrapYardShopStandScript>();
         scrapYardStand.name = "scrapyardstand";
-        GadgetCoreAPI.AddCustomResource("prop/ScrapYard/stand", scrapYardStand);
 
         scrapYardStand.transform.GetChild(0).GetComponent<Renderer>().material = new Material(Shader.Find("Unlit/Transparent"))
         {
@@ -257,6 +256,8 @@ namespace ScrapYard
           mainTexture = GadgetCoreAPI.LoadTexture2D("scrapYardStandInfo.png")
         };
 
+        GadgetCoreAPI.AddCustomResource("prop/ScrapYard/stand", scrapYardStand);
+
         ItemInfo tileItem = new ItemInfo(ItemType.GENERIC, "scrapyardstand", "Degug item.", null as Texture2D).Register();
         TileInfo tile = new TileInfo(TileType.INTERACTIVE, null as Texture2D, new GameObject("scrapyardstand"), tileItem);
         int tileID = TileRegistry.Singleton.Register(tile, "scrapyardstand");
@@ -270,7 +271,6 @@ namespace ScrapYard
         scrapYardStand.SetActive(false);
         scrapYardStand.AddComponent<ScrapYardShopStandChipScript>();
         scrapYardStand.name = "scrapyardstandchip";
-        GadgetCoreAPI.AddCustomResource("prop/ScrapYard/standchip", scrapYardStand);
 
         scrapYardStand.transform.GetChild(0).GetComponent<Renderer>().material = new Material(Shader.Find("Unlit/Transparent"))
         {
@@ -282,6 +282,8 @@ namespace ScrapYard
           mainTexture = GadgetCoreAPI.LoadTexture2D("scrapYardStandInfo.png")
         };
 
+        GadgetCoreAPI.AddCustomResource("prop/ScrapYard/standchip", scrapYardStand);
+
         ItemInfo tileItem = new ItemInfo(ItemType.GENERIC, "scrapyardstandchip", "Degug item.", null as Texture2D).Register();
         TileInfo tile = new TileInfo(TileType.INTERACTIVE, null as Texture2D, new GameObject("scrapyardstandchip"), tileItem);
         int tileID = TileRegistry.Singleton.Register(tile, "scrapyardstandchip");