|
@@ -27,6 +27,8 @@ namespace ShipDecorations
|
|
|
Logger.Log("Ship Decorations v" + Info.Mod.Version);
|
|
Logger.Log("Ship Decorations v" + Info.Mod.Version);
|
|
|
Core.logger = Logger;
|
|
Core.logger = Logger;
|
|
|
|
|
|
|
|
|
|
+ QualitySettings.antiAliasing = 0;
|
|
|
|
|
+
|
|
|
var lightsPlatform = new ShopPlatform("Decorations").Register();
|
|
var lightsPlatform = new ShopPlatform("Decorations").Register();
|
|
|
|
|
|
|
|
lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableDecoItem("cBed.png", "iBed.png", "Bed"), 1000));
|
|
lightsPlatform.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreatePlacableDecoItem("cBed.png", "iBed.png", "Bed"), 1000));
|
|
@@ -77,7 +79,7 @@ namespace ShipDecorations
|
|
|
GadgetCoreAPI.AddCustomResource("prop/ScrapYard/component/engineGreen", engine);
|
|
GadgetCoreAPI.AddCustomResource("prop/ScrapYard/component/engineGreen", engine);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- foreach (var e in ShopPlatform.DefaultObjects.GetShopPlatformEntries())
|
|
|
|
|
|
|
+ foreach (var e in ShopPlatform.DefaultBlocks.GetShopPlatformEntries())
|
|
|
{
|
|
{
|
|
|
if (e.ItemID == 2400)
|
|
if (e.ItemID == 2400)
|
|
|
{
|
|
{
|
|
@@ -87,9 +89,45 @@ namespace ShipDecorations
|
|
|
|
|
|
|
|
ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateEngineItem("cBlueEngineBlock.png", "iBlueEngineBlock.png", "engineBlue", "Plasma Engine", "An engine for a ship.", "BlueEngineBlock"), 10));
|
|
ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateEngineItem("cBlueEngineBlock.png", "iBlueEngineBlock.png", "engineBlue", "Plasma Engine", "An engine for a ship.", "BlueEngineBlock"), 10));
|
|
|
ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateEngineItem("cYellowEngineBlock.png", "iYellowEngineBlock.png", "engineYellow", "Differential Engine", "An engine for a ship.", "YellowEngineBlock"), 10));
|
|
ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateEngineItem("cYellowEngineBlock.png", "iYellowEngineBlock.png", "engineYellow", "Differential Engine", "An engine for a ship.", "YellowEngineBlock"), 10));
|
|
|
- ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateOverrideEngineItem("cRedEngineBlock.png", "iRedEngineBlock.png", "engineRed", "Combustion Engine", "An engine for a ship.", "RedEngineBlock"), 10));
|
|
|
|
|
|
|
+ //ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateOverrideEngineItem("cRedEngineBlock.png", "iRedEngineBlock.png", "engineRed", "Combustion Engine", "An engine for a ship.", "RedEngineBlock"), 10));
|
|
|
ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateEngineItem("cGreenEngineBlock.png", "iGreenEngineBlock.png", "engineGreen", "Burst Engine", "An engine for a ship.", "GreenEngineBlock"), 10));
|
|
ShopPlatform.DefaultBlocks.AddShopPlatformEntry(new ShopPlatformEntry(ItemUtil.CreateEngineItem("cGreenEngineBlock.png", "iGreenEngineBlock.png", "engineGreen", "Burst Engine", "An engine for a ship.", "GreenEngineBlock"), 10));
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ SceneManager.sceneLoaded += OnSceneLoaded;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (scene.buildIndex == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+ var aa = GameObject.Find("Main Camera").GetComponent<AntialiasingAsPostEffect>();
|
|
|
|
|
+
|
|
|
|
|
+ //aa.enabled = true;
|
|
|
|
|
+ Component.DestroyImmediate(aa);
|
|
|
|
|
+ //var bloom = GameObject.Find("Main Camera").GetComponent<Bloom>();
|
|
|
|
|
+ //Component.DestroyImmediate(bloom);
|
|
|
|
|
+ var vig = GameObject.Find("Main Camera").GetComponent<Vignetting>();
|
|
|
|
|
+ Component.DestroyImmediate(vig);
|
|
|
|
|
+ var noise = GameObject.Find("Main Camera").GetComponent<NoiseEffect>();
|
|
|
|
|
+ Component.DestroyImmediate(noise);
|
|
|
|
|
+ var flare = GameObject.Find("Main Camera").GetComponent<Flare>();
|
|
|
|
|
+ Component.DestroyImmediate(flare);
|
|
|
|
|
+ //var camera = GameObject.Find("Main Camera").GetComponent<Camera>();
|
|
|
|
|
+ //camera.transform.rotation = Quaternion.EulerAngles(0.2f,0.2f,0);
|
|
|
|
|
+ //camera.useOcclusionCulling = false;
|
|
|
|
|
+ //camera.orthographic = false;
|
|
|
|
|
+ //camera.rect = new Rect(0, 0, 1, 1);
|
|
|
|
|
+ //camera.fieldOfView = 33;
|
|
|
|
|
+ //GameObject.Find("Main Camera").transform.localPosition = new Vector3(0, 0, -50);
|
|
|
|
|
+ //for(int i = 0; i < GameObject.Find("Main Camera").transform.GetChildCount(); i++)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // GameObject.Find("Main Camera").transform.GetChild(i).transform.localPosition = new Vector3(0, 0, -60);
|
|
|
|
|
+ //}
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Exception e) { Core.logger.LogConsole(e.Message); }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|