Zariteis vor 4 Jahren
Commit
eef3e9dfd6
68 geänderte Dateien mit 2309 neuen und 0 gelöschten Zeilen
  1. 512 0
      .gitignore
  2. 117 0
      API/ShopPlatform.cs
  3. 18 0
      API/ShopPlatformEntry.cs
  4. BIN
      Assets/01_space.ogg
  5. BIN
      Assets/aOldTecArmor.png
  6. BIN
      Assets/bOldTecArmor.png
  7. BIN
      Assets/bgNone.png
  8. BIN
      Assets/bgStars.png
  9. BIN
      Assets/brokenChest.png
  10. BIN
      Assets/brokenCrates1.png
  11. BIN
      Assets/brokenCrates2.png
  12. BIN
      Assets/brokenCrates3.png
  13. BIN
      Assets/brokenCrates4.png
  14. BIN
      Assets/brokenItemMod.png
  15. BIN
      Assets/brokenPirate1.png
  16. BIN
      Assets/brokenPirate2.png
  17. BIN
      Assets/brokenPirate3.png
  18. BIN
      Assets/brokenPirate4.png
  19. BIN
      Assets/brokenPirate5.png
  20. BIN
      Assets/brokenPirate6.png
  21. BIN
      Assets/brokenSliverHead.png
  22. BIN
      Assets/brokenSliverTail.png
  23. BIN
      Assets/brokenSliverbody.png
  24. BIN
      Assets/brokenTeleporter.png
  25. BIN
      Assets/dOldTecDroidBase.png
  26. BIN
      Assets/dOldTecDroidTop.png
  27. BIN
      Assets/hOldTecHelmet.png
  28. BIN
      Assets/iOldCore.png
  29. BIN
      Assets/iOldItemMod.png
  30. BIN
      Assets/iOldTec.png
  31. BIN
      Assets/iOldTecArmor.png
  32. BIN
      Assets/iOldTecDroid.png
  33. BIN
      Assets/iOldTecHelmet.png
  34. BIN
      Assets/iOldTecShield.png
  35. BIN
      Assets/oldChest.png
  36. BIN
      Assets/oldChestOpen.png
  37. BIN
      Assets/parallax.png
  38. BIN
      Assets/planetScrapYardPrev.png
  39. BIN
      Assets/planetShip.png
  40. BIN
      Assets/planetShipPrev.png
  41. BIN
      Assets/platform
  42. BIN
      Assets/recipesOldTec.png
  43. BIN
      Assets/scrapyardstand
  44. BIN
      Assets/shipAEntranceBG.png
  45. BIN
      Assets/shipAEntranceFG.png
  46. BIN
      Assets/shipAExitBG.png
  47. BIN
      Assets/shipAExitFG.png
  48. BIN
      Assets/shipAMainBG.png
  49. BIN
      Assets/shipAMainFG.png
  50. BIN
      Assets/signShip.png
  51. 21 0
      Core.cs
  52. 4 0
      Manifest.ini
  53. 1 0
      ModInfo.txt
  54. 74 0
      OldChestScript.cs
  55. 34 0
      Patches/Patch_Chunk_OnDestroy.cs
  56. 48 0
      Patches/Patch_Chunk_SpawnBiomeSlot.cs
  57. 47 0
      Patches/Patch_DroidManager_UA.cs
  58. 50 0
      Patches/Patch_ObjectScript_Die.cs
  59. 27 0
      Patches/Patch_PlanetRegistry_get_PlanetSelectorPages.cs
  60. 57 0
      Patches/Patch_SceneInjector_InjectIngame.cs
  61. 10 0
      Properties/AssemblyInfo.cs
  62. 8 0
      Properties/launchSettings.json
  63. 15 0
      README.txt
  64. 282 0
      ShipGenerator.cs
  65. 141 0
      ShipShopStandScript.cs
  66. 335 0
      Ships.cs
  67. 486 0
      Ships.csproj
  68. 22 0
      Ships.sln

+ 512 - 0
.gitignore

@@ -0,0 +1,512 @@
+### Csharp ###
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*[.json, .xml, .info]
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+### vs ###
+
+# User-specific files
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+
+# Mono auto generated files
+
+# Build results
+
+# Visual Studio 2015/2017 cache/options directory
+# Uncomment if you have tasks that create the project's static files in wwwroot
+
+# Visual Studio 2017 auto generated files
+
+# MSTest test Results
+
+# NUnit
+
+# Build Results of an ATL Project
+
+# Benchmark Results
+
+# .NET Core
+
+# StyleCop
+
+# Files built by Visual Studio
+
+# Chutzpah Test files
+
+# Visual C++ cache files
+
+# Visual Studio profiler
+
+# Visual Studio Trace Files
+
+# TFS 2012 Local Workspace
+
+# Guidance Automation Toolkit
+
+# ReSharper is a .NET coding add-in
+
+# TeamCity is a build add-in
+
+# DotCover is a Code Coverage Tool
+
+# AxoCover is a Code Coverage Tool
+
+# Coverlet is a free, cross platform Code Coverage Tool
+
+# Visual Studio code coverage results
+
+# NCrunch
+
+# MightyMoose
+
+# Web workbench (sass)
+
+# Installshield output folder
+
+# DocProject is a documentation generator add-in
+
+# Click-Once directory
+
+# Publish Web Output
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+
+# NuGet Packages
+# NuGet Symbol Packages
+# The packages folder can be ignored because of Package Restore
+# except build/, which is used as an MSBuild target.
+# Uncomment if necessary however generally it will be regenerated when needed
+# NuGet v3's project.json files produces more ignorable files
+
+# Microsoft Azure Build Output
+
+# Microsoft Azure Emulator
+
+# Windows Store app package directories and files
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+# but keep track of directories ending in .cache
+
+# Others
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+
+# RIA/Silverlight projects
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+
+# SQL Server files
+
+# Business Intelligence projects
+
+# Microsoft Fakes
+
+# GhostDoc plugin setting file
+
+# Node.js Tools for Visual Studio
+
+# Visual Studio 6 build log
+
+# Visual Studio 6 workspace options file
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+
+# Visual Studio LightSwitch build output
+
+# Paket dependency manager
+
+# FAKE - F# Make
+
+# CodeRush personal settings
+
+# Python Tools for Visual Studio (PTVS)
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+
+# Telerik's JustMock configuration file
+
+# BizTalk build output
+
+# OpenCover UI analysis results
+
+# Azure Stream Analytics local run output
+
+# MSBuild Binary and Structured Log
+
+# NVidia Nsight GPU debugger configuration file
+
+# MFractors (Xamarin productivity tool) working folder
+
+# Local History for Visual Studio
+
+# BeatPulse healthcheck temp database
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+
+# Ionide (cross platform F# VS Code tools) working folder

+ 117 - 0
API/ShopPlatform.cs

@@ -0,0 +1,117 @@
+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
+  }
+}

+ 18 - 0
API/ShopPlatformEntry.cs

@@ -0,0 +1,18 @@
+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;
+    }
+  }
+}

BIN
Assets/01_space.ogg


BIN
Assets/aOldTecArmor.png


BIN
Assets/bOldTecArmor.png


BIN
Assets/bgNone.png


BIN
Assets/bgStars.png


BIN
Assets/brokenChest.png


BIN
Assets/brokenCrates1.png


BIN
Assets/brokenCrates2.png


BIN
Assets/brokenCrates3.png


BIN
Assets/brokenCrates4.png


BIN
Assets/brokenItemMod.png


BIN
Assets/brokenPirate1.png


BIN
Assets/brokenPirate2.png


BIN
Assets/brokenPirate3.png


BIN
Assets/brokenPirate4.png


BIN
Assets/brokenPirate5.png


BIN
Assets/brokenPirate6.png


BIN
Assets/brokenSliverHead.png


BIN
Assets/brokenSliverTail.png


BIN
Assets/brokenSliverbody.png


BIN
Assets/brokenTeleporter.png


BIN
Assets/dOldTecDroidBase.png


BIN
Assets/dOldTecDroidTop.png


BIN
Assets/hOldTecHelmet.png


BIN
Assets/iOldCore.png


BIN
Assets/iOldItemMod.png


BIN
Assets/iOldTec.png


BIN
Assets/iOldTecArmor.png


BIN
Assets/iOldTecDroid.png


BIN
Assets/iOldTecHelmet.png


BIN
Assets/iOldTecShield.png


BIN
Assets/oldChest.png


BIN
Assets/oldChestOpen.png


BIN
Assets/parallax.png


BIN
Assets/planetScrapYardPrev.png


BIN
Assets/planetShip.png


BIN
Assets/planetShipPrev.png


BIN
Assets/platform


BIN
Assets/recipesOldTec.png


BIN
Assets/scrapyardstand


BIN
Assets/shipAEntranceBG.png


BIN
Assets/shipAEntranceFG.png


BIN
Assets/shipAExitBG.png


BIN
Assets/shipAExitFG.png


BIN
Assets/shipAMainBG.png


BIN
Assets/shipAMainFG.png


BIN
Assets/signShip.png


+ 21 - 0
Core.cs

@@ -0,0 +1,21 @@
+using GadgetCore;
+using GadgetCore.API;
+using System.Collections.Generic;
+
+namespace Ships
+{
+  internal static class Core
+  {
+    public static GadgetLogger logger;
+    public static PlanetInfo shipPlanet;
+    public static bool shipPorterPlaced;
+    public static List<int> spawnObjects = new List<int>();
+
+    public static ItemInfo itemOldTex;
+
+    public static ItemInfo itemOldTexShield;
+    public static ItemInfo itemOldTexHelmet;
+    public static ItemInfo itemOldTexArmor;
+    public static ItemInfo itemOldTexDroid;
+  }
+}

+ 4 - 0
Manifest.ini

@@ -0,0 +1,4 @@
+[Metadata]
+Name=Ships
+Assembly=Ships.dll
+Dependencies=Recipe Menu Core

+ 1 - 0
ModInfo.txt

@@ -0,0 +1 @@
+A mod that adds ships that can be reaided.

+ 74 - 0
OldChestScript.cs

@@ -0,0 +1,74 @@
+using GadgetCore.API;
+using Ships;
+using System;
+using System.Collections;
+using UnityEngine;
+
+public class OldChestScript : MonoBehaviour
+{
+  private bool opened = false;
+
+  private void Awake()
+  {
+    base.name = "chest";
+  }
+
+  private void Start()
+  {
+  }
+
+  [RPC]
+  private void Open()
+  {
+    if (!this.opened)
+    {
+      this.opened = true;
+      base.GetComponent<NetworkView>().RPC("OpenMat", RPCMode.AllBuffered, new object[0]);
+      this.DropItems();
+    }
+  }
+
+  private void DropItems()
+  {
+    base.GetComponent<NetworkView>().RPC("DropLocal", RPCMode.All, new object[0]);
+  }
+
+  [RPC]
+  private void DropLocal()
+  {
+    if (Menuu.curAugment == 12)
+      StartCoroutine(DropLocalLoot());
+    StartCoroutine(DropLocalLoot());
+  }
+
+  private IEnumerator DropLocalLoot()
+  {
+    yield return new WaitForSeconds(0.2f);
+    var item = GadgetCoreAPI.EmptyItem();
+    item.id = Core.itemOldTex.GetID();
+    GadgetCoreAPI.DropItemLocal(gameObject.transform.position, item);
+    yield return new WaitForSeconds(0.2f);
+    GadgetCoreAPI.SpawnExp(gameObject.transform.position, 2);
+    yield return new WaitForSeconds(0.2f);
+    GadgetCoreAPI.SpawnExp(gameObject.transform.position, 10);
+    yield return new WaitForSeconds(0.2f);
+    GadgetCoreAPI.SpawnExp(gameObject.transform.position, 20);
+    yield break;
+  }
+
+  private static Texture2D textureOldChestOpen = GadgetCoreAPI.LoadTexture2D("oldChestOpen.png");
+
+  [RPC]
+  private void OpenMat()
+  {
+    Menuu.characterStat[8]++;
+    GameScript.cadetValue += 2;
+    base.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/chest"), Menuu.soundLevel / 10f);
+    base.GetComponent<Collider>().enabled = false;
+    Renderer renderer = gameObject.transform.GetChild(0).gameObject.GetComponentInChildren<Renderer>();
+    renderer.material = new Material(Shader.Find("Unlit/Transparent"))
+    {
+      mainTexture = textureOldChestOpen
+    };
+  }
+}

+ 34 - 0
Patches/Patch_Chunk_OnDestroy.cs

@@ -0,0 +1,34 @@
+using GadgetCore.API;
+using HarmonyLib;
+using UnityEngine;
+
+namespace Ships.Patches
+{
+  [HarmonyPatch(typeof(Chunk))]
+  [HarmonyPatch("OnDestroy")]
+  [HarmonyGadget("Ships")]
+  public static class Patch_Chunk_OnDestroyy
+  {
+    [HarmonyPrefix]
+    [HarmonyPriority(1010)]
+    public static void Prefix(Chunk __instance, ref GameObject[] ___networkStuff)
+    {
+      Core.shipPorterPlaced = false;
+      if (___networkStuff.Length > 40)
+      {
+        if (Network.isServer)
+        {
+          for (int i = 0; i < ___networkStuff.Length; i++)
+          {
+            if (___networkStuff[i])
+            {
+              Network.RemoveRPCs(___networkStuff[i].GetComponent<NetworkView>().viewID);
+              Network.Destroy(___networkStuff[i].gameObject);
+            }
+          }
+        }
+        ___networkStuff = new GameObject[40];
+      }
+    }
+  }
+}

+ 48 - 0
Patches/Patch_Chunk_SpawnBiomeSlot.cs

@@ -0,0 +1,48 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System.Collections;
+using System.Threading;
+using System.Windows.Threading;
+using UnityEngine;
+
+namespace Ships.Patches
+{
+
+  [HarmonyPatch(typeof(Chunk))]
+  [HarmonyPatch("SpawnBiomeSlot")]
+  [HarmonyGadget("Ships")]
+  public static class Patch_Chunk_SpawnBiomeSlot
+  {
+    [HarmonyPostfix]
+    public static bool Prefix(Chunk __instance, int a, int i, int mid, ref GameObject[] ___spawnSpot, ref GameObject[] ___spawnSpotMid, ref GameObject[] ___networkStuff, ref int ___temp)
+    {
+      Transform transform;
+      if (mid == 1)
+        transform = ___spawnSpotMid[i].transform;
+      else
+        transform = ___spawnSpot[i].transform;
+
+      int num = UnityEngine.Random.Range(0, 100);
+      if (num < 3 && !Core.shipPorterPlaced)
+      {
+        Core.shipPorterPlaced = true;
+        if (a == 0 || a == 1 || a == 2 || a == 3 || a == 4 || a == 5)
+        {
+          var portal = (GameObject)Network.Instantiate((GameObject)Resources.Load("portal"), transform.position + new Vector3(0, 1.5f - 0.05f, 0.2f), Quaternion.identity, 0);
+          portal.name = "portal/5/obj";
+          var iUA = portal.transform.GetChild(0).gameObject;
+          portal.GetComponent<NetworkView>().RPC("Activate", RPCMode.All, new object[0]);
+          iUA.GetComponent<NetworkView>().RPC("Set", RPCMode.AllBuffered, new object[] { Core.shipPlanet.GetID(), 0, 5 });
+          ___networkStuff[___temp] = portal;
+          ___temp++;
+          var crates = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenCrates1"), transform.position + new Vector3(2, 0, 0.2f), Quaternion.identity, 0);
+          ___networkStuff[___temp] = crates;
+          ___temp++;
+          return false;
+        }
+      }
+      return true;
+    }
+  }
+}

+ 47 - 0
Patches/Patch_DroidManager_UA.cs

@@ -0,0 +1,47 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System.Reflection;
+using UnityEngine;
+
+namespace Ships.Patches
+{
+
+  [HarmonyPatch(typeof(DroidManager))]
+  [HarmonyPatch("UA")]
+  [HarmonyGadget("Ships")]
+	[HarmonyPriority(1010)]
+	public static class Patch_DroidManager_UA
+	{
+		public static readonly MethodInfo RPCMethod = typeof(DroidManager).GetMethod("UA", BindingFlags.Public | BindingFlags.Instance);
+
+		[HarmonyPrefix]
+    public static bool Prefix(DroidManager __instance, ref int[] d, GameObject[] ___droid, GameObject[] ___droidHead, GameObject[] ___droidBody)
+		{
+			if (!GadgetNetwork.MatrixReady && GadgetNetwork.GetTimeSinceConnect() < GadgetNetwork.MatrixTimeout)
+			{
+				__instance.StartCoroutine(GadgetUtils.WaitAndInvoke(RPCMethod, GadgetNetwork.MatrixTimeout - GadgetNetwork.GetTimeSinceConnect(), () => GadgetNetwork.MatrixReady, __instance, d));
+				return false;
+			}
+			GadgetNetwork.ConvertIDToLocal(ItemRegistry.Singleton, ref d[0]);
+			GadgetNetwork.ConvertIDToLocal(ItemRegistry.Singleton, ref d[1]);
+			GadgetNetwork.ConvertIDToLocal(ItemRegistry.Singleton, ref d[2]);
+			for (int i = 0; i < 3; i++)
+			{
+				Core.logger.LogConsole(i + " " + d[i]);
+				if (d[i] >= 1000)
+				{
+					___droid[i].transform.parent = null;
+					___droid[i].SetActive(true);
+					___droidHead[i].GetComponent<Renderer>().material = GadgetCoreAPI.GetDroidHeadMaterial(d[i] - 1000);
+					___droidBody[i].GetComponent<Renderer>().material = GadgetCoreAPI.GetDroidBodyMaterial(d[i] - 1000);
+				}
+				else
+				{
+					___droid[i].SetActive(false);
+					___droid[i].transform.parent = __instance.transform;
+				}
+			}
+			return false;
+		}
+  }
+}

+ 50 - 0
Patches/Patch_ObjectScript_Die.cs

@@ -0,0 +1,50 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System.Collections;
+using System.Threading;
+using System.Windows.Threading;
+using UnityEngine;
+
+namespace Ships.Patches
+{
+
+  [HarmonyPatch(typeof(ObjectScript))]
+  [HarmonyPatch("Die")]
+  [HarmonyGadget("Ships")]
+  public static class Patch_ObjectScript_Die
+  {
+    [HarmonyPostfix]
+    public static void Prefix(ObjectScript __instance, ref int ___id)
+    {
+
+      if (Network.isServer && Core.spawnObjects.Contains(___id))
+      {
+        if (Random.Range(0, 2) == 0)
+          __instance.StartCoroutine(SpawnMultiple(__instance.transform.position.x + 2, __instance.transform.position.y, 2, 1 + Random.Range(0, 3), "e/Ships/BrokenSliver", 0.1f));
+        else if (Random.Range(0, 10) == 0)
+        {
+          Item item = GadgetCoreAPI.EmptyItem();
+          item.id = Core.itemOldTex.GetID();
+          GadgetCoreAPI.SpawnItem(new Vector3(__instance.transform.position.x + 2, __instance.transform.position.y, 0.2f), item);
+        }
+      }
+    }
+    private static IEnumerator SpawnMultiple(float xBase, float yBase, float range, int amount, string name, float speed)
+    {
+      for (int i = 0; i < amount; i++)
+      {
+        int x = 0;
+        int y = 0;
+        if (range > 0)
+        {
+          x = Random.Range(-1 * (int)(range * 10), (int)(range * 10));
+          y = Random.Range(-1 * (int)(range * 10), (int)(range * 10));
+        }
+        Network.Instantiate(Resources.Load(name), new Vector3(xBase + x / 10f, yBase + 1.1f + y / 10f, 0f), Quaternion.identity, 0);
+        yield return new WaitForSeconds(speed);
+      }
+      yield break;
+    }
+  }
+}

+ 27 - 0
Patches/Patch_PlanetRegistry_get_PlanetSelectorPages.cs

@@ -0,0 +1,27 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System.Linq;
+using System.Reflection;
+
+namespace Ships.Patches
+{
+
+  [HarmonyPatch]
+  [HarmonyGadget("Ships_")]
+  public static class Patch_PlanetRegistry_get_PlanetSelectorPages
+  {
+
+    [HarmonyTargetMethod]
+    static MethodBase TargetMethod()
+    {
+      return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.API.PlanetRegistry"), "get_PlanetSelectorPages");
+    }
+
+    [HarmonyPrefix]
+    public static bool Prefix(ref int __result)
+    {
+      __result = ((PlanetRegistry.Singleton.AsEnumerable().Count(x => x.SelectorButtonMat != null) + 13) / 14) + 1;
+      return false;
+    }
+  }
+}

+ 57 - 0
Patches/Patch_SceneInjector_InjectIngame.cs

@@ -0,0 +1,57 @@
+using GadgetCore;
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Reflection.Emit;
+using UnityEngine;
+
+namespace Ships.Patches
+{
+
+  [HarmonyPatch]
+  [HarmonyGadget("Ships_")]
+  public static class Patch_SceneInjector_InjectIngame
+  {
+
+    [HarmonyTargetMethod]
+    static MethodBase TargetMethod()
+    {
+      return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.SceneInjector"), "InjectIngame");
+    }
+
+    [HarmonyTranspiler]
+    public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator gen)
+    {
+      var p = TranspilerHelper.CreateProcessor(instructions, gen);
+      {
+        var ilRefs = p.FindAllRefsByInsns(new List<CodeInstruction>(new CodeInstruction[] {
+          new CodeInstruction(OpCodes.Ldloc_0)
+        , new CodeInstruction(OpCodes.Ldc_I4_1)
+        , new CodeInstruction(OpCodes.Sub)
+        }));
+        MethodInfo changeListMethod = typeof(Patch_SceneInjector_InjectIngame).GetMethod("ChangeList");
+        foreach (var ilRef in ilRefs)
+        {
+          p.InjectHook(ilRef, changeListMethod);
+        }
+      }
+      return p.Insns;
+    }
+
+    private static FieldInfo selectorPlanetsField = typeof(PlanetRegistry).GetField("selectorPlanets");
+    private static FieldInfo planetButtonIconsField = typeof(PlanetRegistry).GetField("planetButtonIcons");
+
+    public static void ChangeList()
+    {
+      List<PlanetInfo> list = Registry<PlanetRegistry, PlanetInfo, PlanetType>.Singleton.ToList<PlanetInfo>();
+      foreach (var info in list)
+        if (info.GetID() == Core.shipPlanet.GetID())
+          list.Remove(info);
+      selectorPlanetsField.SetValue(null, list.ToArray());
+    }
+  }
+}

+ 10 - 0
Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using static Ships.Ships;
+
+[assembly: AssemblyProduct("Ships")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("Ships")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("A mod that adds ships that can be reaided.")] //This is a short description for your mod's assembly.
+[assembly: AssemblyCompany("")] //Set this to your name/nickname and/or website
+[assembly: AssemblyCopyright("© 2021 Zariteis. All rights reserved.")] //Set this to your copyright name.
+[assembly: AssemblyVersion(MOD_VERSION)]
+[assembly: AssemblyFileVersion(MOD_VERSION)]

+ 8 - 0
Properties/launchSettings.json

@@ -0,0 +1,8 @@
+{
+  "profiles": {
+    "Ships": {
+      "commandName": "Executable",
+      "executablePath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Roguelands\\Roguelands.exe"
+    }
+  }
+}

+ 15 - 0
README.txt

@@ -0,0 +1,15 @@
+In addition to changing all references to "Template" this and that to a more appropriate name,
+you need to add a file called "GamePaths.xml" to the folder ABOVE where you put this template, with the following content:
+
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+  <PropertyGroup>
+    <!-- Set this full path to your game folder. Must contain a slash at the end. -->
+    <GamePath>C:\Program Files (x86)\Steam\steamapps\common\Roguelands\</GamePath>
+
+    <!-- Set this partial path to the game's Managed folder. Must contain a slash at the end. -->
+    <ManagedFolder>Roguelands_Data\Managed\</ManagedFolder>
+  </PropertyGroup>
+</Project>
+
+Note that `GamePath` may need to be changed, depending on the nature of your installation.

+ 282 - 0
ShipGenerator.cs

@@ -0,0 +1,282 @@
+using GadgetCore.API;
+using Ships.API;
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using UnityEngine;
+
+namespace Ships
+{
+  internal enum ShipGeneratorObjectPoolType
+  {
+    SmallObject = 0,
+    LargeObject = 1,
+    FlyingEnemy = 2,
+    BrokenItemMod = 3,
+    BrokenChest = 4,
+    OldChest = 5
+  }
+
+  public class ShipGenerator
+  {
+    private static readonly FieldInfo chunksField = typeof(SpawnerScript).GetField("chunks", BindingFlags.NonPublic | BindingFlags.Instance);
+    private static readonly Material materialaBackLight = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("parallax.png") };
+    private static readonly Material materialaParalex0 = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("bg0.png") };
+    private static readonly Material materialaParalex1 = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("bg1.png") };
+    private static readonly Material materialaParalex2 = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("bg2.png") };
+    private static readonly Material materialaParalex3 = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("bg3.png") };
+
+    private static readonly Material materialaParalexStars = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("bgStars.png") };
+    private static readonly Material materialaParalexNone = new Material(Shader.Find("Unlit/Transparent")) { mainTexture = GadgetCoreAPI.LoadTexture2D("bgNone.png") };
+
+    public static readonly FieldInfo networkStuffField = typeof(Chunk).GetField("networkStuff", BindingFlags.NonPublic | BindingFlags.Instance);
+    public static readonly FieldInfo tempField = typeof(Chunk).GetField("temp", BindingFlags.NonPublic | BindingFlags.Instance);
+
+    public static void Genarate(SpawnerScript s, int[] param)
+    {
+      try
+      {
+        GameScript.isTown = false;
+        if (GameScript.districtLevel % 2 != 0)
+        {
+          GameScript.districtLevel++;
+        }
+
+        spawnLocations.Clear();
+
+        s.backLights.SetActive(true);
+        s.mainLight.SetActive(false);
+        s.backLights.GetComponent<Renderer>().material = materialaBackLight;
+        //s.mainLight.GetComponentInChildren<Light>().color = new Color(0.05f, 0.05f, 0.05f, 0.1f);
+
+        s.bg[0].GetComponent<Renderer>().material = materialaParalexStars;
+        s.bg[1].GetComponent<Renderer>().material = materialaParalexNone;
+        s.bg[2].GetComponent<Renderer>().material = materialaParalexNone;
+        s.bg[3].GetComponent<Renderer>().material = materialaParalexNone;
+
+        var chunks = (GameObject[])chunksField.GetValue(s);
+        var num = 0;
+
+        chunks[num] = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("z/Ships/ShipAEntrance"), new Vector3((float)(218 + 0 * 128), 0f, 5f), Quaternion.Euler(0f, 180f, 180f));
+        num++;
+        chunks[num] = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("z/Ships/ShipAMain"), new Vector3((float)(218 + 0.75 * 128), 0f, 5f), Quaternion.Euler(0f, 180f, 180f));
+        num++;
+
+        spawnLocations.Add(new int[] { 7, 7, 2 });
+        spawnLocations.Add(new int[] { 10, 7, 2 });
+        spawnLocations.Add(new int[] { 16, 7, 2 });
+        spawnLocations.Add(new int[] { 17, 4, 2 });
+
+        Add4(4, 0);
+        Add4(4, 5);
+        Add4Floor(4, -5);
+
+        Add4(10, 0);
+        Add4(10, 5);
+        Add4Floor(10, -5);
+
+        Add4(20, 0);
+        Add4(20, 5);
+        Add4Floor(20, -5);
+
+        Add4(26, 0);
+        Add4(26, 5);
+        Add4Floor(26, -5);
+
+        chunks[num] = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("z/Ships/ShipAMain"), new Vector3((float)(218 + 1.75 * 128), 0f, 5f), Quaternion.Euler(0f, 180f, 180f));
+        num++;
+
+        spawnLocations.Add(new int[] { 7 + 32, 7, (int)ShipGeneratorObjectPoolType.FlyingEnemy });
+        spawnLocations.Add(new int[] { 10 + 32, 7, (int)ShipGeneratorObjectPoolType.FlyingEnemy });
+        spawnLocations.Add(new int[] { 16 + 32, 7, (int)ShipGeneratorObjectPoolType.FlyingEnemy });
+        spawnLocations.Add(new int[] { 17 + 32, 4, (int)ShipGeneratorObjectPoolType.FlyingEnemy });
+
+        Add4(4 + 32, 0);
+        Add4(4 + 32, 5);
+        Add4Floor(4 + 32, -5);
+
+        Add4(10 + 32, 0);
+        Add4(10 + 32, 5);
+        Add4Floor(10 + 32, -5);
+
+        Add4(20 + 32, 0);
+        Add4(20 + 32, 5);
+        Add4Floor(20 + 32, -5);
+
+        Add4(26 + 32, 0);
+        Add4(26 + 32, 5);
+        Add4Floor(26 + 32, -5);
+
+        chunks[num] = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("z/Ships/ShipAExit"), new Vector3((float)(218 + 2.5 * 128), 0f, 5f), Quaternion.Euler(0f, 180f, 180f));
+        num++;
+
+        if (Network.isServer)
+        {
+          chunks[num] = new GameObject("chunk");
+          var chunk = chunks[num].AddComponent<Chunk>();
+          PopulateTown(chunk);
+          num++;
+        }
+      }
+      catch (System.Exception e) { Core.logger.LogConsole(e); }
+    }
+
+    private static void Add4(int x, int y)
+    {
+      var r = random.Next(8);
+      switch (r)
+      {
+        case 0:
+          spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+          break;
+        case 1:
+          spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+          break;
+        case 2:
+          spawnLocations.Add(new int[] { x + 0, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          spawnLocations.Add(new int[] { x + 3, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          break;
+        case 3:
+          spawnLocations.Add(new int[] { x + 0, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          spawnLocations.Add(new int[] { x + 3, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          break;
+        case 4:
+          spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          spawnLocations.Add(new int[] { x + 3, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          break;
+        case 5:
+          spawnLocations.Add(new int[] { x + 0, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          break;
+        case 6:
+          if (random.Next(2) == 0)
+          {
+            spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.BrokenItemMod });
+            spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.BrokenChest });
+          }
+          else
+          {
+            spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.BrokenChest });
+            spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.BrokenItemMod });
+          }
+          break;
+        case 7:
+          if (random.Next(2) == 0)
+          {
+            spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+            spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.OldChest });
+          }
+          else
+          {
+            spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.OldChest });
+            spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.SmallObject });
+          }
+          break;
+      }
+    }
+    private static void Add4Floor(int x, int y)
+    {
+      if (random.Next(2) == 0)
+        Add4(x, y);
+      else
+      {
+        var r = random.Next(5);
+        switch (r)
+        {
+          case 0:
+            spawnLocations.Add(new int[] { x + 0, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            break;
+          case 1:
+            spawnLocations.Add(new int[] { x + 3, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            break;
+          case 2:
+            spawnLocations.Add(new int[] { x + 0, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            spawnLocations.Add(new int[] { x + 3, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            break;
+          case 3:
+            spawnLocations.Add(new int[] { x + 1, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            spawnLocations.Add(new int[] { x + 3, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            break;
+          case 4:
+            spawnLocations.Add(new int[] { x + 0, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            spawnLocations.Add(new int[] { x + 2, y, (int)ShipGeneratorObjectPoolType.LargeObject });
+            break;
+        }
+      }
+    }
+
+    private static List<int[]> spawnLocations = new List<int[]>();
+    private static System.Random random = new System.Random();
+
+    public static void PopulateTown(Chunk chunk)
+    {
+      var networkStuff = new GameObject[400];
+      networkStuffField.SetValue(chunk, networkStuff);
+
+      try
+      {
+
+        int temp = (int)tempField.GetValue(chunk);
+
+        networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenTeleporter"), new Vector3(248f - 4 * 1, -4f + 0.118f, 0.3f), Quaternion.identity, 0);
+        temp++;
+
+
+        foreach (var e in spawnLocations)
+        {
+          switch ((ShipGeneratorObjectPoolType)e[2])
+          {
+            case ShipGeneratorObjectPoolType.SmallObject:
+              if (random.Next(30) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenItemMod"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(4) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenCrates1"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(3) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenCrates2"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(2) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenCrates3"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenCrates4"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              break;
+            case ShipGeneratorObjectPoolType.LargeObject:
+              if (random.Next(6) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenPirate1"), new Vector3(248f + 4 * e[0], -5.75f + 0.118f + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(5) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenPirate2"), new Vector3(248f + 4 * e[0], -5.75f + 0.118f + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(4) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenPirate3"), new Vector3(248f + 4 * e[0], -5.75f + 0.118f + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(3) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenPirate4"), new Vector3(248f + 4 * e[0], -5.75f + 0.118f + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else if (random.Next(2) == 0)
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenPirate5"), new Vector3(248f + 4 * e[0], -5.75f + 0.118f + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              else
+                networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenPirate6"), new Vector3(248f + 4 * e[0], -5.75f + 0.118f + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              break;
+            case ShipGeneratorObjectPoolType.FlyingEnemy:
+              Network.Instantiate(Resources.Load("e/Ships/BrokenSliver"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 1.1f + 4 * e[1], 0f), Quaternion.identity, 0);
+              break;
+            case ShipGeneratorObjectPoolType.BrokenItemMod:
+              networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenItemMod"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              break;
+            case ShipGeneratorObjectPoolType.BrokenChest:
+              networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/BrokenChest"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              break;
+            case ShipGeneratorObjectPoolType.OldChest:
+              networkStuff[temp] = (GameObject)Network.Instantiate(Resources.Load("obj/Ships/OldChest"), new Vector3(248f + 4 * e[0], -8f + 0.118f * 4 + 4 * e[1], 0.2f), Quaternion.identity, 0);
+              break;
+          }
+          if (networkStuff[temp] != null)
+            temp++;
+        }
+      }
+      catch (Exception e) { Core.logger.LogError(e); }
+
+      GameScript.endPortal[3] = (GameObject)Network.Instantiate((GameObject)Resources.Load("portal"), new Vector3(248f + 4 * 38 + 128, -6.118f, 0f), Quaternion.identity, 0);
+      GameScript.endPortalUA[3] = GameScript.endPortal[3].transform.GetChild(0).gameObject;
+      GameScript.endPortal[3].GetComponent<NetworkView>().RPC("Activate", RPCMode.All, new object[0]);
+      GameScript.endPortalUA[3].GetComponent<NetworkView>().RPC("Set", RPCMode.AllBuffered, new object[] { 0, 0, 0 });
+    }
+  }
+}

+ 141 - 0
ShipShopStandScript.cs

@@ -0,0 +1,141 @@
+using GadgetCore.API;
+using System.Collections;
+using System.Reflection;
+using UnityEngine;
+
+namespace Ships
+{
+  public class ShipShopStandScript : MonoBehaviour
+  {
+    public static readonly FieldInfo inventoryField = typeof(GameScript).GetField("inventory", BindingFlags.NonPublic | BindingFlags.Instance);
+
+    private void Awake()
+    {
+      UpdateUI();
+    }
+
+    [RPC]
+    private void Set(int itemID, int price, int quantity, int currencyItemID)
+    {
+      this.itemID = ItemRegistry.Singleton.ConvertIDToLocal(itemID);
+      this.currencyItemID = ItemRegistry.Singleton.ConvertIDToLocal(currencyItemID);
+      this.price = price;
+      this.quantity = quantity;
+      UpdateUI();
+    }
+
+    internal void StartCallSet(int itemID, int price, int quantity, int currencyItemID)
+    {
+      StartCoroutine(CallSet(itemID, price, quantity, currencyItemID));
+    }
+
+    private IEnumerator CallSet(int itemID, int price, int quantity, int currencyItemID)
+    {
+      yield return new WaitForSeconds(0.1f);
+      itemID = ItemRegistry.Singleton.ConvertIDToHost(itemID);
+      currencyItemID = ItemRegistry.Singleton.ConvertIDToHost(currencyItemID);
+      gameObject.GetComponent<NetworkView>().RPC("Set", RPCMode.AllBuffered, new object[] { itemID, price, quantity, currencyItemID });
+      yield break;
+    }
+
+    private void UpdateUI()
+    {
+      gameObject.transform.GetChild(1).GetComponent<Animation>().Play("animationStand");
+      gameObject.transform.GetChild(1).GetComponent<Renderer>().material = (Material)Resources.Load("i/i" + itemID);
+      gameObject.transform.GetChild(2).GetChild(1).GetComponent<Renderer>().material = (Material)Resources.Load("i/i" + currencyItemID);
+
+      ItemInfo info = ItemRegistry.GetItem(itemID);
+
+      string title = (quantity > 1 ? quantity + "x " : "") + info.Name;
+
+      gameObject.transform.GetChild(2).GetChild(0).GetComponent<TextMesh>().text = title;
+      gameObject.transform.GetChild(2).GetChild(0).GetChild(0).GetComponent<TextMesh>().text = title;
+      gameObject.transform.GetChild(2).GetChild(2).GetComponent<TextMesh>().text = "" + price;
+      gameObject.transform.GetChild(2).GetChild(2).GetChild(0).GetComponent<TextMesh>().text = "" + price;
+    }
+
+    private void OnTriggerEnter(Collider c)
+    {
+      if (c.gameObject.layer == 8)
+      {
+        gameObject.transform.GetChild(2).gameObject.SetActive(true);
+      }
+    }
+
+    private void OnTriggerExit(Collider c)
+    {
+      if (c.gameObject.layer == 8)
+      {
+        gameObject.transform.GetChild(2).gameObject.SetActive(false);
+      }
+    }
+
+    private int GetItemAmount(GameScript gameScript, int id)
+    {
+      if (id == 0) return 0;
+      int num = 0;
+      Item[] inventory = (Item[])inventoryField.GetValue(gameScript);
+      for (int i = 0; i < 45; i++)
+      {
+        if (inventory[i].id == id)
+        {
+          num += inventory[i].q;
+        }
+      }
+      return num;
+    }
+
+    private void RemoveItemAmount(GameScript gameScript, int id, int amount)
+    {
+      Item[] inventory = (Item[])inventoryField.GetValue(gameScript);
+      for (int i = 0; i < 45; i++)
+      {
+        if (inventory[i].id == id)
+        {
+          if (amount - inventory[i].q > 0)
+          {
+            amount -= inventory[i].q;
+            inventory[i] = gameScript.EmptyItem();
+            gameScript.RefreshSlot(i);
+          }
+          else
+          {
+            if (amount - inventory[i].q == 0)
+            {
+              inventory[i] = gameScript.EmptyItem();
+              gameScript.RefreshSlot(i);
+              break;
+            }
+            inventory[i].q -= amount;
+            gameScript.RefreshSlot(i);
+            break;
+          }
+        }
+      }
+    }
+
+    private void Request()
+    {
+      var gameScript = (GameScript)Camera.main.GetComponent("GameScript");
+      int num = GetItemAmount(gameScript, currencyItemID);
+
+      if (num >= price)
+      {
+        base.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/purchase"), Menuu.soundLevel / 10f);
+        RemoveItemAmount(gameScript, currencyItemID, price);
+        Item item = new Item(itemID, quantity, 0, 0, 0, new int[3], new int[3]);
+        GadgetCoreAPI.SpawnItem(base.transform.position, item);
+      }
+      else
+      {
+        GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("txtError"), MenuScript.player.transform.position, Quaternion.identity);
+        gameObject.SendMessage("InitError", "Insufficient Currency!");
+      }
+    }
+
+    public int itemID = 1;
+    public int price = 1;
+    public int quantity = 1;
+    public int currencyItemID = 1;
+  }
+}

+ 335 - 0
Ships.cs

@@ -0,0 +1,335 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using RecipeMenuCore.API;
+using Ships.API;
+using System.Collections;
+using System.Reflection;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+
+namespace Ships
+{
+  [Gadget("Ships", LoadAfter: new string[] { "RecipeMenuCore" }, Dependencies: new string[] { "RecipeMenuCore" })]
+  public class Ships : Gadget<Ships>
+  {
+    public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
+    public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
+
+    protected override void LoadConfig()
+    {
+      Config.Load();
+
+      string fileVersion = Config.ReadString("ConfigVersion", CONFIG_VERSION, comments: "The Config Version (not to be confused with mod version)");
+
+      if (fileVersion != CONFIG_VERSION)
+      {
+        Config.Reset();
+        Config.WriteString("ConfigVersion", CONFIG_VERSION, comments: "The Config Version (not to be confused with mod version)");
+      }
+
+      Config.Save();
+    }
+
+    public override string GetModDescription()
+    {
+      return "A mod that adds ships that can be reaided.";
+    }
+
+    protected override void Initialize()
+    {
+      Logger.Log("Ships v" + Info.Mod.Version);
+      Core.logger = Logger;
+
+      Texture2D texturePlanetIcon = GadgetCoreAPI.LoadTexture2D("planetShip.png");
+      Texture2D texturePlanetPrevIcon = GadgetCoreAPI.LoadTexture2D("planetShipsPrev.png");
+      Texture2D texturePortalSign = GadgetCoreAPI.LoadTexture2D("signShip.png");
+
+      Texture2D textureBG = GadgetCoreAPI.LoadTexture2D("bgShips.png");
+      Texture2D textureBGExtension = GadgetCoreAPI.LoadTexture2D("bgShipsExtension.png");
+      Texture2D textureBGTop = GadgetCoreAPI.LoadTexture2D("bgShipsTop.png");
+
+      Texture2D textureParalex = GadgetCoreAPI.LoadTexture2D("parallax.png");
+      Texture2D textureParalex0 = GadgetCoreAPI.LoadTexture2D("bShipsbg0.png");
+      Texture2D textureParalex1 = GadgetCoreAPI.LoadTexture2D("bShipsbg1.png");
+      Texture2D textureParalex2 = GadgetCoreAPI.LoadTexture2D("bShipsbg2.png");
+      Texture2D textureParalex3 = GadgetCoreAPI.LoadTexture2D("bShipsbg3.png");
+
+      Texture2D textureEntrance = GadgetCoreAPI.LoadTexture2D("entranceShips.png");
+      Texture2D textureSmallSide = GadgetCoreAPI.LoadTexture2D("sideSmallShips.png");
+      Texture2D textureBigSide = GadgetCoreAPI.LoadTexture2D("sideBigShips.png");
+
+      Texture2D textureMid0 = GadgetCoreAPI.LoadTexture2D("midShipsChunk0.png");
+      Texture2D textureMid1 = GadgetCoreAPI.LoadTexture2D("midShipsChunk1.png");
+
+      Texture2D textureScrapTrophy = GadgetCoreAPI.LoadTexture2D("iScrapTrophy.png");
+
+      AudioClip audioShip = GadgetCoreAPI.LoadAudioClip("01_space.ogg");
+
+      Core.shipPlanet = new PlanetInfo(PlanetType.SPECIAL, "Ship", new GadgetCore.Util.Tuple<int, int>[] { new GadgetCore.Util.Tuple<int, int>(1, 100) }, audioShip);
+      var scrapYardPlanet = Core.shipPlanet;
+      scrapYardPlanet.SetPortalInfo(texturePortalSign, texturePlanetPrevIcon, texturePlanetIcon);
+      scrapYardPlanet.SetBackgroundInfo(textureParalex, textureParalex0, textureParalex1, textureParalex2, textureParalex3);
+      scrapYardPlanet.SetTerrainInfo(textureEntrance, textureBG, textureMid0, textureMid1, textureBigSide, textureSmallSide);
+
+      scrapYardPlanet.OnGenerateWorld += ShipGenerator.Genarate;
+      scrapYardPlanet.OnGenerateTown += ShipGenerator.Genarate;
+      scrapYardPlanet.Register("Ship");
+
+      scrapYardPlanet.PortalUses = -1;
+
+      Texture2D textureShipAEntranceFG = GadgetCoreAPI.LoadTexture2D("shipAEntranceFG.png");
+      Texture2D textureShipAEntranceBG = GadgetCoreAPI.LoadTexture2D("shipAEntranceBG.png");
+      CreateShipPart("ShipAEntrance", textureShipAEntranceFG, textureShipAEntranceBG, new int[][] {
+        new int[] { 11, 5, 5, 1}
+      , new int[] { 11, 5, 1, 6}
+      , new int[] { 11, 10, 5, 1}
+      }, new int[][] { }, 16, 16);
+
+      Texture2D textureShipAMainFG = GadgetCoreAPI.LoadTexture2D("shipAMainFG.png");
+      Texture2D textureShipAMainBG = GadgetCoreAPI.LoadTexture2D("shipAMainBG.png");
+      CreateShipPart("ShipAMain", textureShipAMainFG, textureShipAMainBG, new int[][] {
+        new int[] { 0, 0, 32, 1}
+      , new int[] { 0, 15, 32, 1}
+      , new int[] { 0, 0, 1, 6}
+      , new int[] { 31, 0, 1, 6}
+      , new int[] { 0, 10, 1, 6}
+      , new int[] { 31, 10, 1, 6}
+      , new int[] { 3, 5, 4, 1}
+      , new int[] { 9, 5, 4, 1}
+      , new int[] { 19, 5, 4, 1}
+      , new int[] { 25, 5, 4, 1}
+      , new int[] { 3, 10, 4, 1}
+      , new int[] { 9, 10, 4, 1}
+      , new int[] { 19, 10, 4, 1}
+      , new int[] { 25, 10, 4, 1}
+      }, new int[][] {
+        new int[] { 3, 7, 0 }
+      , new int[] { 6, 7, 1 }
+      , new int[] { 25, 7, 1 }
+      , new int[] { 28, 7, 0 }
+      });
+
+      Texture2D textureShipAExitFG = GadgetCoreAPI.LoadTexture2D("shipAExitFG.png");
+      Texture2D textureShipAExitBG = GadgetCoreAPI.LoadTexture2D("shipAExitBG.png");
+      CreateShipPart("ShipAExit", textureShipAExitFG, textureShipAExitBG, new int[][] {
+        new int[] { 0, 5, 10, 1}
+      , new int[] { 0, 10, 13, 1}
+      , new int[] { 10, 6, 2, 1}
+      , new int[] { 12, 7, 1, 4}
+      }, new int[][] {
+        new int[] { 5, 7, 0 }
+      }, 16, 16);
+
+      CreateObject("BrokenTeleporter", GadgetCoreAPI.LoadTexture2D("brokenTeleporter.png"), true);
+
+      CreateBrakableObject("BrokenPirate1", GadgetCoreAPI.LoadTexture2D("brokenPirate1.png"), true);
+      CreateBrakableObject("BrokenPirate2", GadgetCoreAPI.LoadTexture2D("brokenPirate2.png"), true);
+      CreateBrakableObject("BrokenPirate3", GadgetCoreAPI.LoadTexture2D("brokenPirate3.png"), true);
+      CreateBrakableObject("BrokenPirate4", GadgetCoreAPI.LoadTexture2D("brokenPirate4.png"), true);
+      CreateBrakableObject("BrokenPirate5", GadgetCoreAPI.LoadTexture2D("brokenPirate5.png"), true);
+      CreateBrakableObject("BrokenPirate6", GadgetCoreAPI.LoadTexture2D("brokenPirate6.png"), true);
+
+      CreateBrakableObject("BrokenCrates1", GadgetCoreAPI.LoadTexture2D("brokenCrates1.png"));
+      CreateBrakableObject("BrokenCrates2", GadgetCoreAPI.LoadTexture2D("brokenCrates2.png"));
+      CreateBrakableObject("BrokenCrates3", GadgetCoreAPI.LoadTexture2D("brokenCrates3.png"));
+      CreateBrakableObject("BrokenCrates4", GadgetCoreAPI.LoadTexture2D("brokenCrates4.png"));
+      CreateBrakableObject("BrokenItemMod", GadgetCoreAPI.LoadTexture2D("brokenItemMod.png"));
+      CreateBrakableObject("BrokenChest", GadgetCoreAPI.LoadTexture2D("brokenChest.png"));
+
+      CreateSliverEnemy("BrokenSliver", GadgetCoreAPI.LoadTexture2D("brokenSliverHead.png"), GadgetCoreAPI.LoadTexture2D("brokenSliverBody.png"), GadgetCoreAPI.LoadTexture2D("brokenSliverTail.png"));
+
+      ItemInfo itemInfo = new ItemInfo(ItemType.GENERIC, "port5", "", null as Texture2D).Register("port5");
+      TileInfo tile = new TileInfo(TileType.INTERACTIVE, null as Texture2D, new GameObject("port5"), itemInfo).Register("port5");
+
+      CreateOldChest("OldChest", GadgetCoreAPI.LoadTexture2D("oldChest.png"));
+
+
+      Core.itemOldTex = new ItemInfo(ItemType.GENERIC, "Old Tec", "Some peace of old\ntechnology", GadgetCoreAPI.LoadTexture2D("iOldTec.png"));
+      ItemRegistry.Singleton.Register(Core.itemOldTex, "oldtec");
+
+
+      Core.itemOldTexShield = new ItemInfo(ItemType.OFFHAND, "Old Tec Shield", "", GadgetCoreAPI.LoadTexture2D("iOldTecShield.png"), Stats: new EquipStats(1, 1, 1, 1, 3, 0),
+         HeldTex: GadgetCoreAPI.LoadTexture2D("iOldTecShield.png"));
+      ItemRegistry.Singleton.Register(Core.itemOldTexShield, "oldtecshield");
+
+      Core.itemOldTexHelmet = new ItemInfo(ItemType.HELMET, "Old Tec Helmet", "", GadgetCoreAPI.LoadTexture2D("iOldTecHelmet.png"), Stats: new EquipStats(1, 1, 1, 1, 3, 0),
+         HeadTex: GadgetCoreAPI.LoadTexture2D("hOldTecHelmet.png"));
+      ItemRegistry.Singleton.Register(Core.itemOldTexHelmet, "oldtechelmet");
+
+      Core.itemOldTexArmor = new ItemInfo(ItemType.ARMOR, "Old Tec Armor", "", GadgetCoreAPI.LoadTexture2D("iOldTecArmor.png"), Stats: new EquipStats(1, 1, 1, 1, 3, 0),
+         BodyTex: GadgetCoreAPI.LoadTexture2D("bOldTecArmor.png"), ArmTex: GadgetCoreAPI.LoadTexture2D("aOldTecArmor.png"));
+      ItemRegistry.Singleton.Register(Core.itemOldTexArmor, "oldtecarmor");
+
+      Core.itemOldTexDroid = new ItemInfo(ItemType.DROID, "Old Tec Droid", "", GadgetCoreAPI.LoadTexture2D("iOldTecDroid.png"), Stats: new EquipStats(1, 1, 1, 1, 3, 0),
+         BodyTex: GadgetCoreAPI.LoadTexture2D("dOldTecDroidBase.png"), HeadTex: GadgetCoreAPI.LoadTexture2D("dOldTecDroidTop.png"));
+      ItemRegistry.Singleton.Register(Core.itemOldTexDroid, "oldtecdroid");
+
+      var recipePage = new RecipePage(RecipePageType.UniversalCrafter, "Old Tec", GadgetCoreAPI.LoadTexture2D("recipesOldTec")).Register();
+      recipePage.AddRecipePageEntry(new RecipePageEntry(Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 133, Core.itemOldTexShield.GetID(), allwaysShowInput: true));
+      recipePage.AddRecipePageEntry(new RecipePageEntry(Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 123, Core.itemOldTexHelmet.GetID(), allwaysShowInput: true));
+      recipePage.AddRecipePageEntry(new RecipePageEntry(Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 103, Core.itemOldTexArmor.GetID(), allwaysShowInput: true));
+      recipePage.AddRecipePageEntry(new RecipePageEntry(Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 113, Core.itemOldTexDroid.GetID(), allwaysShowInput: true));
+
+      var universalCrafter = ((CraftMenuInfo)MenuRegistry.Singleton["Gadget Core:Crafter Menu"]);
+      universalCrafter.AddCraftPerformer(CraftMenuInfo.CreateSimpleCraftPerformer(
+        Tuple.Create(new int[] { Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 133 }, new Item(Core.itemOldTexShield.GetID(), 1, 0, 0, 0, new int[3], new int[3]), 0)));
+      universalCrafter.AddCraftPerformer(CraftMenuInfo.CreateSimpleCraftPerformer(
+       Tuple.Create(new int[] { Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 123 }, new Item(Core.itemOldTexHelmet.GetID(), 1, 0, 0, 0, new int[3], new int[3]), 0)));
+      universalCrafter.AddCraftPerformer(CraftMenuInfo.CreateSimpleCraftPerformer(
+        Tuple.Create(new int[] { Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 103 }, new Item(Core.itemOldTexArmor.GetID(), 1, 0, 0, 0, new int[3], new int[3]), 0)));
+      universalCrafter.AddCraftPerformer(CraftMenuInfo.CreateSimpleCraftPerformer(
+        Tuple.Create(new int[] { Core.itemOldTex.GetID(), Core.itemOldTex.GetID(), 113 }, new Item(Core.itemOldTexDroid.GetID(), 1, 0, 0, 0, new int[3], new int[3]), 0)));
+
+      tile.OnInteract += Tile_OnInteract;
+    }
+
+    private IEnumerator Tile_OnInteract()
+    {
+      InstanceTracker.PlayerScript.Portal(5);
+      yield break;
+    }
+
+    private void CreateShipPart(string name, Texture texture, Texture textureBG, int[][] collisions, int[][] lamp, int tileW = 32, int tileH = 16)
+    {
+      var gameObject = Object.Instantiate((GameObject)Resources.Load("z/chunk"));
+      gameObject.transform.localScale = new Vector3(tileW * 2, tileH * 2, 1);
+
+      var rendererBody = gameObject.GetComponentInChildren<Renderer>();
+      rendererBody.material = new Material(Shader.Find("Transparent/Diffuse"))
+      {
+        mainTexture = texture
+      };
+
+      for (int i = 0; i < 6; i++)
+        GameObject.DestroyImmediate(gameObject.transform.GetChild(0).gameObject);
+      for (int i = 0; i < 16; i++)
+        GameObject.DestroyImmediate(gameObject.transform.GetChild(1).gameObject);
+
+      for (int i = 0; i < 7; i++)
+        GameObject.DestroyImmediate(gameObject.transform.GetChild(0).GetChild(0).gameObject);
+
+      Component.DestroyImmediate(gameObject.GetComponent<Chunk>());
+
+      var bgRenderObject = GameObject.Instantiate(gameObject);
+      for (int i = 0; i < bgRenderObject.transform.childCount; i++)
+        GameObject.DestroyImmediate(bgRenderObject.transform.GetChild(0).gameObject);
+
+      bgRenderObject.transform.SetParent(gameObject.transform);
+      bgRenderObject.transform.localScale = new Vector3(1, 1, 1);
+      bgRenderObject.transform.localPosition = new Vector3(0, 0, -0.3f);
+      var rendererBG = bgRenderObject.GetComponent<Renderer>();
+      rendererBG.material = new Material(Shader.Find("Transparent/Diffuse"))
+      {
+        mainTexture = textureBG
+      };
+
+      GameObject root = gameObject.transform.GetChild(0).gameObject;
+      GameObject inst = root.transform.GetChild(0).gameObject;
+
+      for (int i = 0; i < collisions.Length; i++)
+      {
+        GameObject entry = GameObject.Instantiate(inst);
+
+        entry.transform.SetParent(root.transform);
+
+        int[] coll = collisions[i];
+
+        float w = coll[2] * (2.0f / tileW);
+        float h = coll[3] * (2.0f / tileH);
+
+        float x = coll[0] * (2.0f / tileW) + w / 2;
+        float y = coll[1] * (2.0f / tileH) + h / 2;
+
+        entry.transform.localScale = new Vector3(w, h, 1);
+        entry.transform.localPosition = new Vector3(x - 1, y - 1, 0);
+      }
+
+      for (int i = 0; i < lamp.Length; i++)
+      {
+        int[] coll = lamp[i];
+
+        float w = (2.0f / tileW);
+        float h = (2.0f / tileH);
+        int type = coll[2];
+
+        float x = coll[0] * (2.0f / tileW) + w / 2;
+        float y = coll[1] * (2.0f / tileH) + h / 2;
+
+        GameObject entry = null;
+
+        if (type == 0)
+          entry = Object.Instantiate<GameObject>((GameObject)Resources.Load("prop/" + 2401));
+        if (type == 1)
+          entry = Object.Instantiate<GameObject>((GameObject)Resources.Load("prop/" + 2402));
+
+        entry.transform.SetParent(root.transform);
+
+        entry.transform.localScale = new Vector3(w / 4, h / 4, 1);
+        entry.transform.localPosition = new Vector3(x - 1, y - 1, -1);
+      }
+
+      GameObject.DestroyImmediate(gameObject.transform.GetChild(0).GetChild(0).gameObject);
+
+      GadgetCoreAPI.AddCustomResource("z/Ships/" + name, gameObject);
+    }
+
+    private void CreateObject(string name, Texture2D texture, bool large = false)
+    {
+      GameObject gameObject = Object.Instantiate<GameObject>((GameObject)Resources.Load("prop/2501"));
+      Renderer renderer = gameObject.GetComponentInChildren<Renderer>();
+      renderer.material = new Material(Shader.Find("Unlit/Transparent"))
+      {
+        mainTexture = texture
+      };
+      if (large)
+        gameObject.transform.localScale = new Vector3(gameObject.transform.localScale.x * 2, gameObject.transform.localScale.y * 2, 1);
+      GadgetCoreAPI.AddCustomResource("obj/Ships/" + name, gameObject);
+    }
+
+    private void CreateBrakableObject(string name, Texture2D texture, bool large = false, ObjectType type = ObjectType.ORE)
+    {
+      var i = new ObjectInfo(type, new Item(57, 1, 0, 0, 0, new int[3], new int[3]), 16, texture).Register(name);
+      if (large)
+      {
+        var t = i.Object.transform.GetChild(0);
+        t.localScale = new Vector3(4, 4, 1);
+      }
+      GadgetCoreAPI.AddCustomResource("obj/Ships/" + name, i.Object);
+      Core.spawnObjects.Add(i.GetID());
+    }
+
+    private void CreateSliverEnemy(string name, Texture2D textureHead, Texture2D textureBody, Texture2D textureTail)
+    {
+      GameObject gameObject = Object.Instantiate<GameObject>((GameObject)Resources.Load("e/sliver"));
+      Renderer rendererHead = gameObject.transform.GetChild(4).GetChild(0).GetChild(0).GetComponentInChildren<Renderer>();
+      rendererHead.material = new Material(Shader.Find("Unlit/Transparent"))
+      {
+        mainTexture = textureHead
+      };
+      Renderer rendererBody = gameObject.transform.GetChild(4).GetChild(0).GetChild(1).GetComponentInChildren<Renderer>();
+      rendererBody.material = new Material(Shader.Find("Unlit/Transparent"))
+      {
+        mainTexture = textureBody
+      };
+      Renderer rendererTail = gameObject.transform.GetChild(4).GetChild(0).GetChild(2).GetComponentInChildren<Renderer>();
+      rendererTail.material = new Material(Shader.Find("Unlit/Transparent"))
+      {
+        mainTexture = textureTail
+      };
+      GadgetCoreAPI.AddCustomResource("e/Ships/" + name, gameObject);
+    }
+
+    private void CreateOldChest(string name, Texture texture)
+    {
+      GameObject gameObject = Object.Instantiate<GameObject>((GameObject)Resources.Load("obj/chest"));
+      Renderer renderer = gameObject.transform.GetChild(0).gameObject.GetComponentInChildren<Renderer>();
+      renderer.material = new Material(Shader.Find("Unlit/Transparent"))
+      {
+        mainTexture = texture
+      };
+      Component.DestroyImmediate(gameObject.GetComponent<ChestScript>());
+      gameObject.AddComponent<OldChestScript>();
+      GadgetCoreAPI.AddCustomResource("obj/Ships/" + name, gameObject);
+    }
+  }
+}

+ 486 - 0
Ships.csproj

@@ -0,0 +1,486 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+  <ImportGroup>
+    <Import Project="../GamePaths.xml" />
+  </ImportGroup>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProjectGuid>{91AB81DE-EAEE-47D1-93DD-541179208219}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Ships</RootNamespace>
+    <AssemblyName>Ships</AssemblyName>
+    <TargetFrameworks>net35</TargetFrameworks>
+    <FileAlignment>512</FileAlignment>
+    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+    <Configurations>Release</Configurations>
+    <Authors>Zariteis</Authors>
+    <ApplicationIcon />
+    <StartupObject />
+    <Platforms>x86</Platforms>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net35|x86'">
+    <NoWarn>1701;1702</NoWarn>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Remove="%2a%2a\**" />
+    <EmbeddedResource Remove="%2a%2a\**" />
+    <None Remove="%2a%2a\**" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Remove="Assets\a16.png" />
+    <None Remove="Assets\d17b.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="0Harmony">
+      <HintPath>$(GamePath)$(ManagedFolder)0Harmony.dll</HintPath>
+      <SpecificVersion>false</SpecificVersion>
+      <Private>false</Private>
+      <RequiredTargetFramework>net35</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>$(GamePath)$(ManagedFolder)Assembly-CSharp.dll</HintPath>
+      <SpecificVersion>false</SpecificVersion>
+      <RequiredTargetFramework>net35</RequiredTargetFramework>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="GadgetCore">
+      <HintPath>$(GamePath)$(ManagedFolder)GadgetCore.dll</HintPath>
+      <SpecificVersion>false</SpecificVersion>
+      <RequiredTargetFramework>net35</RequiredTargetFramework>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="RecipeMenuCore">
+      <HintPath>..\RecipeMenuCore\Release\RecipeMenuCore.dll</HintPath>
+      <Private>false</Private>
+      <SpecificVersion>false</SpecificVersion>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>$(GamePath)$(ManagedFolder)UnityEngine.dll</HintPath>
+      <SpecificVersion>false</SpecificVersion>
+      <RequiredTargetFramework>net35</RequiredTargetFramework>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="ModInfo.txt">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <UsingTask TaskName="GetFileVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+    <ParameterGroup>
+      <AssemblyPath ParameterType="System.String" Required="true" />
+      <Version ParameterType="System.String" Output="true" />
+      <TrimmedVersion ParameterType="System.String" Output="true" />
+    </ParameterGroup>
+    <Task>
+      <Using Namespace="System.Diagnostics" />
+      <Using Namespace="System.Text" />
+      <Using Namespace="System.Linq" />
+      <Code Type="Fragment" Language="cs">
+        <![CDATA[
+      this.Version = FileVersionInfo.GetVersionInfo(this.AssemblyPath).FileVersion;  
+      this.TrimmedVersion = this.Version.Split('.').TakeWhile(x => !x.Equals("0")).Aggregate(new StringBuilder(), (a, b) => { if (a.Length > 0) a.Append("."); a.Append(b); return a; }).ToString();
+      if (this.TrimmedVersion.IndexOf('.') == -1) this.TrimmedVersion += ".0";
+    ]]>
+      </Code>
+    </Task>
+  </UsingTask>
+  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
+    <GetFileVersion AssemblyPath="$(TargetPath)">
+      <Output TaskParameter="Version" PropertyName="ModFullVersion" />
+      <Output TaskParameter="TrimmedVersion" PropertyName="AssemblyFileVersion" />
+    </GetFileVersion>
+    <ItemGroup>
+      <OldZip Include="$(TargetDir)$(AssemblyName)_v*.zip" />
+      <OldZip Include="$(GamePath)GadgetCore\Mods\$(AssemblyName)_v*.zip" />
+    </ItemGroup>
+    <Delete Files="@(OldZip)" />
+    <MakeDir Directories="$(TargetDir)..\BuildCache\" />
+    <ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(TargetDir)..\BuildCache\$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+    <Copy SourceFiles="$(TargetDir)..\BuildCache\$(AssemblyName)_v$(AssemblyFileVersion).zip" DestinationFiles="$(TargetDir)$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+    <RemoveDir Directories="$(TargetDir)..\BuildCache\" />
+    <MakeDir Directories="$(GamePath)GadgetCore\Mods\" />
+    <Copy SourceFiles="$(TargetDir)$(AssemblyName)_v$(AssemblyFileVersion).zip" DestinationFiles="$(GamePath)GadgetCore\Mods\$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+    <Message Importance="High" Text="Mod Exported to $(GamePath)GadgetCore\Mods\$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+  </Target>
+  <ItemGroup>
+    <None Update="Assets\01_space.ogg">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\aOldTecArmor.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgNone.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgScrapYardExtension.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgScrapYardTop.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgShips.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgShipsExtension.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgShipsTop.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgStars.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bOldTecArmor.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenChest.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenCrates1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenCrates2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenCrates3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenCrates4.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenItemMod.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate4.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate5.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenPirate6.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenSliverbody.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenSliverHead.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenSliverTail.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\brokenTeleporter.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bShipsbg0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bShipsbg1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bShipsbg2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bShipsbg3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cGreenLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\charBG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cOrangeLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cPlatform.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cPurpleLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cWhiteLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cYellowLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\dOldTecDroidBase.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\dOldTecDroidTop.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\entranceScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\entranceShips.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\First\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\hOldTecHelmet.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iAirCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iEarthCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iFireCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iGreenLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldItemMod.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldTec.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldTecArmor.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldTecDroid.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldTecHelmet.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOldTecShield.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOrangeLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iPlatform.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iPurpleLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iScrapTrophy.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iWaterCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iWhiteLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iYellowLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\merchantBody.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\merchantHead.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\merchantPortrait.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\metalPlatform.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\metalPlatformClean.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midCoverChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midHiddenChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midShipsChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midShipsChunk1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\oldChest.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\oldChestOpen.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\parallax.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetScrapYardPrev.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetScrapYard_old.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetShip.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetShipPrev.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetShips.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetShipsPrev.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetSpacePrev.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\platform">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\recipesOldTec.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\rockPlatform.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\scrapyardstand">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\scrapYardStand.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\scrapYardStandInfo.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shipAEntranceBG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shipAEntranceFG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shipAExitBG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shipAExitFG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shipAMainBG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shipAMainFG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shopStand.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\shopStand_old.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideBigShips.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sidesmallShips.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signShip.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signShips.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Manifest.ini">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System">
+      <Private>false</Private>
+      <SpecificVersion>true</SpecificVersion>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Data">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Drawing">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.IO.Compression.FileSystem">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Numerics">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Runtime.Serialization">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Xml">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Xml.Linq">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+</Project>

+ 22 - 0
Ships.sln

@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31205.134
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ships", "Ships.csproj", "{91AB81DE-EAEE-47D1-93DD-541179208219}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{91AB81DE-EAEE-47D1-93DD-541179208219}.Release|x86.ActiveCfg = Release|x86
+		{91AB81DE-EAEE-47D1-93DD-541179208219}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {FA4A3404-09B6-4951-A5C2-5FAEB4A683AB}
+	EndGlobalSection
+EndGlobal