|
|
@@ -1,9 +1,9 @@
|
|
|
-using UnityEngine;
|
|
|
using GadgetCore.API;
|
|
|
-using System.Collections.Generic;
|
|
|
using ScrapYard.API;
|
|
|
using System.Collections;
|
|
|
using System.Reflection;
|
|
|
+using UnityEngine;
|
|
|
+using UnityEngine.SceneManagement;
|
|
|
|
|
|
namespace ScrapYard
|
|
|
{
|
|
|
@@ -70,7 +70,7 @@ namespace ScrapYard
|
|
|
scrapYardPlanet.OnGenerateWorld += ScrapYardGenerator.GenarateTown;
|
|
|
scrapYardPlanet.Register("Scrap Yard");
|
|
|
|
|
|
- new ItemInfo(ItemType.GENERIC, "Scrap Trophy", "", textureScrapTrophy).Register("Scrap Trophy");
|
|
|
+ new ItemInfo(ItemType.GENERIC, "Scrap Trophy", "A rusty trophy.\nUsed for purchasing\nspecial items.", textureScrapTrophy).Register("Scrap Trophy");
|
|
|
|
|
|
{ // Scrap Yard Bulding
|
|
|
var scrapYardShopBuilding = Object.Instantiate((GameObject)Resources.Load("prop/2501"));
|
|
|
@@ -266,11 +266,25 @@ namespace ScrapYard
|
|
|
ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(2107, 10));
|
|
|
ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(2108, 10));
|
|
|
ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(2403, 10));
|
|
|
+ ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(ItemRegistry.GetItemIDByRegistryName("Gadget Core:Crafter Block"), 10));
|
|
|
ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(2401, 1000));
|
|
|
ShopPlatform.DefaultObjects.AddShopPlatformEntry(new ShopPlatformEntry(2402, 1000));
|
|
|
|
|
|
ShopPlatform.DefaultWalls.AddShopPlatformEntry(new ShopPlatformEntry(2200, 50));
|
|
|
|
|
|
+ SceneManager.sceneLoaded += OnSceneLoaded;
|
|
|
+ }
|
|
|
+
|
|
|
+ internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
|
|
+ {
|
|
|
+ if (scene.buildIndex == 1)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var storageMenu = GameObject.Find("Ship").transform.Find("SHIPPLACES").transform.Find("mech").localPosition = new Vector3(-130f, -5.23f, 0.6f);
|
|
|
+ }
|
|
|
+ catch (System.Exception e) { Core.logger.LogError(e.Message); }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static readonly FieldInfo canInteractField = typeof(PlayerScript).GetField("canInteract", BindingFlags.NonPublic | BindingFlags.Instance);
|