Zariteis 4 years ago
commit
2667a4c7f7
100 changed files with 3577 additions and 0 deletions
  1. 512 0
      .gitignore
  2. BIN
      CombatChipChest/Assets/cCombatSimulator.png
  3. BIN
      CombatChipChest/Assets/iCombatSimulator.png
  4. BIN
      CombatChipChest/Assets/menuCombatSimulator.png
  5. BIN
      CombatChipChest/Assets/menucombat
  6. 57 0
      CombatChipChest/CombatChipChest.cs
  7. 215 0
      CombatChipChest/CombatChipChest.csproj
  8. 95 0
      CombatChipChest/CombatChipStore.cs
  9. 21 0
      CombatChipChest/Core.cs
  10. 29 0
      CombatChipChest/ItemUtil.cs
  11. 3 0
      CombatChipChest/Manifest.ini
  12. 19 0
      CombatChipChest/MenuOpenEventScript.cs
  13. 1 0
      CombatChipChest/ModInfo.txt
  14. 29 0
      CombatChipChest/Patches/Patch_GameScript_HoverCombatChip.cs
  15. 22 0
      CombatChipChest/Patches/Patch_GameScript_LoadGame.cs
  16. 22 0
      CombatChipChest/Patches/Patch_GameScript_SaveGame.cs
  17. 195 0
      CombatChipChest/Patches/Patch_GameScript_Update.cs
  18. 10 0
      CombatChipChest/Properties/AssemblyInfo.cs
  19. 8 0
      CombatChipChest/Properties/launchSettings.json
  20. 15 0
      CombatChipChest/README.txt
  21. BIN
      First/Assets/cGreenLamp.png
  22. BIN
      First/Assets/cOrangeLamp.png
  23. BIN
      First/Assets/cPlatform.png
  24. BIN
      First/Assets/cPurpleLamp.png
  25. BIN
      First/Assets/cWhiteLamp.png
  26. BIN
      First/Assets/cYellowLamp.png
  27. BIN
      First/Assets/charBG.png
  28. BIN
      First/Assets/iAirCore.png
  29. BIN
      First/Assets/iCore.png
  30. BIN
      First/Assets/iEarthCore.png
  31. BIN
      First/Assets/iFireCore.png
  32. BIN
      First/Assets/iGreenLamp.png
  33. BIN
      First/Assets/iOrangeLamp.png
  34. BIN
      First/Assets/iPlatform.png
  35. BIN
      First/Assets/iPurpleLamp.png
  36. BIN
      First/Assets/iWaterCore.png
  37. BIN
      First/Assets/iWhiteLamp.png
  38. BIN
      First/Assets/iYellowLamp.png
  39. BIN
      First/Assets/one
  40. 24 0
      First/Core.cs
  41. 62 0
      First/First.cs
  42. 202 0
      First/First.csproj
  43. 56 0
      First/ItemUtil.cs
  44. 3 0
      First/Manifest.ini
  45. 1 0
      First/ModInfo.txt
  46. 77 0
      First/Patches/Patch_Chunk_GeneratePlatforms.cs
  47. 55 0
      First/Patches/Patch_GameScript_GatherLoot.cs
  48. 51 0
      First/Patches/Patch_GameScript_InitializeGatherStorage.cs
  49. 54 0
      First/Patches/Patch_KylockeStand_Awake.cs
  50. 11 0
      First/Properties/AssemblyInfo.cs
  51. 8 0
      First/Properties/launchSettings.json
  52. 15 0
      First/README.txt
  53. 10 0
      GamePaths.xml
  54. 16 0
      LoopPortal/Core.cs
  55. 30 0
      LoopPortal/LoopPortal.cs
  56. 143 0
      LoopPortal/LoopPortal.csproj
  57. 3 0
      LoopPortal/Manifest.ini
  58. 2 0
      LoopPortal/ModInfo.txt
  59. 38 0
      LoopPortal/Patches/Patch_EntranceScript_SpawnEndPortal.cs
  60. 28 0
      LoopPortal/Patches/Patch_PlayerScript_Interact.cs
  61. 30 0
      LoopPortal/Patches/Patch_SpawnerScript_DestroyWorld.cs
  62. 10 0
      LoopPortal/Properties/AssemblyInfo.cs
  63. 8 0
      LoopPortal/Properties/launchSettings.json
  64. 15 0
      LoopPortal/README.txt
  65. 25 0
      ModSyncClient/ModSync/ModSync.sln
  66. 6 0
      ModSyncClient/ModSync/ModSync/App.config
  67. 9 0
      ModSyncClient/ModSync/ModSync/App.xaml
  68. 17 0
      ModSyncClient/ModSync/ModSync/App.xaml.cs
  69. 22 0
      ModSyncClient/ModSync/ModSync/MainWindow.xaml
  70. 282 0
      ModSyncClient/ModSync/ModSync/MainWindow.xaml.cs
  71. 104 0
      ModSyncClient/ModSync/ModSync/ModSync.csproj
  72. 18 0
      ModSyncClient/ModSync/ModSync/NotifyProperty.cs
  73. 55 0
      ModSyncClient/ModSync/ModSync/Properties/AssemblyInfo.cs
  74. 71 0
      ModSyncClient/ModSync/ModSync/Properties/Resources.Designer.cs
  75. 117 0
      ModSyncClient/ModSync/ModSync/Properties/Resources.resx
  76. 30 0
      ModSyncClient/ModSync/ModSync/Properties/Settings.Designer.cs
  77. 7 0
      ModSyncClient/ModSync/ModSync/Properties/Settings.settings
  78. 4 0
      ModSyncClient/ModSync/ModSync/packages.config
  79. BIN
      MonsterNests/Assets/bugspotBig.png
  80. BIN
      MonsterNests/Assets/goldenShroom.png
  81. BIN
      MonsterNests/Assets/spiderEgg.png
  82. 19 0
      MonsterNests/Core.cs
  83. 29 0
      MonsterNests/EnemyObjectInfo.cs
  84. 3 0
      MonsterNests/Manifest.ini
  85. 1 0
      MonsterNests/ModInfo.txt
  86. 64 0
      MonsterNests/MonsterNests.cs
  87. 323 0
      MonsterNests/MonsterNests.csproj
  88. 51 0
      MonsterNests/Patches/Patch_Chunk_SpawnBiomeSlot.cs
  89. 82 0
      MonsterNests/Patches/Patch_ObjectScript_Die.cs
  90. 10 0
      MonsterNests/Properties/AssemblyInfo.cs
  91. 8 0
      MonsterNests/Properties/launchSettings.json
  92. 15 0
      MonsterNests/README.txt
  93. BIN
      MoreLights/Assets/cGreenLamp.png
  94. BIN
      MoreLights/Assets/cOrangeLamp.png
  95. BIN
      MoreLights/Assets/cPurpleLamp.png
  96. BIN
      MoreLights/Assets/cWhiteLamp.png
  97. BIN
      MoreLights/Assets/cYellowLamp.png
  98. BIN
      MoreLights/Assets/iGreenLamp.png
  99. BIN
      MoreLights/Assets/iOrangeLamp.png
  100. BIN
      MoreLights/Assets/iPurpleLamp.png

+ 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

BIN
CombatChipChest/Assets/cCombatSimulator.png


BIN
CombatChipChest/Assets/iCombatSimulator.png


BIN
CombatChipChest/Assets/menuCombatSimulator.png


BIN
CombatChipChest/Assets/menucombat


+ 57 - 0
CombatChipChest/CombatChipChest.cs

@@ -0,0 +1,57 @@
+using UnityEngine;
+using GadgetCore.API;
+using System.Collections;
+using System;
+using UnityEngine.SceneManagement;
+
+namespace CombatChipChest
+{
+  [Gadget("CombatChipChest")]
+  public class CombatChipChest : Gadget<CombatChipChest>
+  {
+    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.Reset();
+      Config.Save();
+    }
+
+    public override string GetModDescription()
+    {
+      return "A mod that adds a combat chip chest block for your ship.";
+    }
+
+    protected override void Initialize()
+    {
+      Logger.Log("Combat Chip Chest v" + Info.Mod.Version);
+      Core.logger = Logger;
+
+      var tile = ItemUtil.CreatePlacableItem("cCombatSimulator.png", "iCombatSimulator.png", "Combat Chest");
+      Core.itemCombatChipChestId = tile.Item.GetID();
+
+      Core.npcID = tile.GetID();
+
+      var asset = GadgetCoreAPI.LoadAssetBundle("menucombat");
+
+      var menuCombat = UnityEngine.Object.Instantiate((GameObject)asset.LoadAsset("assets/resources/menucombat.prefab"));
+      menuCombat.transform.localPosition = new Vector3(0, 0, -3);
+
+      menuCombat.AddComponent<MenuOpenEventScript>();
+
+      Core.menu = new MenuInfo(MenuType.CHIP, menuCombat, tile);
+      Core.menu.Register("Combat Chip Chest");
+
+      SceneManager.sceneLoaded += OnSceneLoaded;
+    }
+
+    internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
+    {
+      if (scene.buildIndex == 1)
+      {
+        GadgetCoreAPI.CreateMarketStand(ItemRegistry.GetItem(Core.itemCombatChipChestId), new Vector2(-138f - 1 * 4, -7.49f), 100);
+      }
+    }
+  }
+}

+ 215 - 0
CombatChipChest/CombatChipChest.csproj

@@ -0,0 +1,215 @@
+<?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>CombatChipChest</RootNamespace>
+    <AssemblyName>CombatChipChest</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>
+    <Reference Include="0Harmony">
+      <HintPath>$(GamePath)$(ManagedFolder)0Harmony.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>$(GamePath)$(ManagedFolder)Assembly-CSharp.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="GadgetCore">
+      <HintPath>$(GamePath)$(ManagedFolder)GadgetCore.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>$(GamePath)$(ManagedFolder)UnityEngine.dll</HintPath>
+      <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\cCombatSimulator.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\First\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iAirCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iCombatSimulator.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\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\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\menucombat">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\menuCombatSimulator.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\one">
+      <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>

+ 95 - 0
CombatChipChest/CombatChipStore.cs

@@ -0,0 +1,95 @@
+using GadgetCore.API;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using UnityEngine;
+
+namespace CombatChipChest
+{
+  public class CombatChipStore
+  {
+    public CombatChipStore(int size, string id)
+    {
+      m_ChipIDs = new int[size];
+      _id = id;
+    }
+
+    private string _id;
+
+    private int[] m_ChipIDs;
+
+    public int[] ChipIDs
+    {
+      get { return m_ChipIDs; }
+      set { m_ChipIDs = value; }
+    }
+
+    public void Save()
+    {
+      for (int i = 0; i < m_ChipIDs.Length; i++)
+      {
+        PreviewLabs.PlayerPrefs.SetInt("customChipsStore:" + _id + ":" + i, m_ChipIDs[i]);
+      }
+    }
+
+    public void Load()
+    {
+      for (int i = 0; i < m_ChipIDs.Length; i++)
+      {
+        m_ChipIDs[i] = PreviewLabs.PlayerPrefs.GetInt("customChipsStore:" + _id + ":" + i, 0);
+      }
+    }
+    public void UpdateLatestUI()
+    {
+      UpdateUI(lastUsed);
+    }
+    private GameObject lastUsed;
+    public void UpdateUI(GameObject menu)
+    {
+      lastUsed = menu;
+      var gameScript = (GameScript)Camera.main.GetComponent("GameScript");
+      try
+      {
+        for (int i = 0; i < menu.transform.childCount; i++)
+        {
+          var obj = menu.transform.GetChild(i).gameObject;
+          int number;
+
+          if (obj.name.Length > "combat_storage_slot".Length && int.TryParse(obj.name.Substring("combat_storage_slot".Length), out number))
+          {
+            obj.GetComponent<Renderer>().material = (Material)Resources.Load("cc/cc" + m_ChipIDs[number]);
+          }
+        }
+      }
+      catch (Exception e)
+      {
+        Core.logger.LogConsole(e.Message);
+      }
+    }
+
+    public void UpdateText(int id)
+    {
+      if (lastUsed != null)
+      {
+        var txtChipName = lastUsed.transform.FindChild("txtTitle").gameObject.GetComponent<TextMesh>();
+        txtChipName.text = GadgetCoreAPI.GetChipName(id);
+
+        var txtDesc = lastUsed.transform.FindChild("txtDesc").gameObject.GetComponent<TextMesh>();
+        txtDesc.text = GadgetCoreAPI.GetChipDesc(id);
+
+        var gameScript = (GameScript)Camera.main.GetComponent("GameScript");
+        var txtCost = lastUsed.transform.FindChild("txtCost").gameObject.GetComponent<TextMesh>();
+        int chipCost =  gameScript.GetChipCost(id);
+
+        if (chipCost == -1 && txtChipName.text != string.Empty)
+          txtCost.text = "Passive";
+        else if (chipCost > 0)
+          txtCost.text = chipCost + " Mana";
+        else
+          txtCost.text = string.Empty;
+      }
+    }
+  }
+}

+ 21 - 0
CombatChipChest/Core.cs

@@ -0,0 +1,21 @@
+using GadgetCore;
+using GadgetCore.API;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnityEngine;
+
+namespace CombatChipChest
+{
+  internal static class Core
+  {
+    public static int itemCombatChipChestId = -1;
+    public static int npcID = -1;
+    public static MenuInfo menu = null;
+
+    public static CombatChipStore combatChipStore = new CombatChipStore(16, "CombatChipChest");
+
+    public static GadgetLogger logger;
+  }
+}

+ 29 - 0
CombatChipChest/ItemUtil.cs

@@ -0,0 +1,29 @@
+using UnityEngine;
+using GadgetCore.API;
+
+namespace CombatChipChest
+{
+  public static class ItemUtil
+  {
+    public static TileInfo CreatePlacableItem(string tileImgPath, string itemImgPath, string name)
+    {
+
+      Texture2D textureTile = GadgetCoreAPI.LoadTexture2D(tileImgPath);
+      Texture2D textureItem = GadgetCoreAPI.LoadTexture2D(itemImgPath);
+
+      GameObject gameObject = Object.Instantiate(GadgetCoreAPI.GetPlaceableNPCResource(2100));
+      gameObject.name = name;
+      Renderer renderer = gameObject.GetComponentInChildren<Renderer>();
+      renderer.material = new Material(Shader.Find("Unlit/Transparent"))
+      {
+        mainTexture = textureTile
+      };
+
+      ItemInfo itemInfo = new ItemInfo(ItemType.GENERIC, name, "", textureItem, -1, default, null, null, null, null);
+      itemInfo.Register(name);
+      var tile = new TileInfo(TileType.INTERACTIVE, textureTile, gameObject, itemInfo);
+      tile.Register(name);
+      return tile;
+    }
+  }
+}

+ 3 - 0
CombatChipChest/Manifest.ini

@@ -0,0 +1,3 @@
+[Metadata]
+Name=Combat Chip Chest
+Assembly=CombatChipChest.dll

+ 19 - 0
CombatChipChest/MenuOpenEventScript.cs

@@ -0,0 +1,19 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System;
+using System.Collections;
+using System.Threading;
+using System.Windows.Threading;
+using UnityEngine;
+
+namespace CombatChipChest
+{
+  public class MenuOpenEventScript : MonoBehaviour
+  {
+    void OnEnable()
+    {
+      Core.combatChipStore.UpdateUI(gameObject);
+    }
+  }
+}

+ 1 - 0
CombatChipChest/ModInfo.txt

@@ -0,0 +1 @@
+A mod that adds a combat chip chest block for your ship.

+ 29 - 0
CombatChipChest/Patches/Patch_GameScript_HoverCombatChip.cs

@@ -0,0 +1,29 @@
+using GadgetCore;
+using GadgetCore.API;
+using HarmonyLib;
+using System;
+using System.Reflection;
+using UnityEngine;
+
+namespace CombatChipChest.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("HoverCombatChip")]
+  [HarmonyGadget("CombatChipChest")]
+  public static class Patch_GameScript_HoverCombatChip
+  {
+    [HarmonyPrefix]
+    public static void Prefix(GameScript __instance, int slot , int[] ___combatChips)
+    {
+      try
+      {
+        if (slot <= 5)
+        {
+          Core.combatChipStore.UpdateText(___combatChips[slot]);
+        }
+      }
+      catch { }
+    }
+  }
+}

+ 22 - 0
CombatChipChest/Patches/Patch_GameScript_LoadGame.cs

@@ -0,0 +1,22 @@
+using GadgetCore;
+using GadgetCore.API;
+using HarmonyLib;
+using System;
+using System.Reflection;
+using UnityEngine;
+
+namespace CombatChipChest.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("LoadGame")]
+  [HarmonyGadget("CombatChipChest")]
+  public static class Patch_GameScript_LoadGame
+  {
+    [HarmonyPrefix]
+    public static void Prefix(GameScript __instance)
+    {
+      Core.combatChipStore.Load();
+    }
+  }
+}

+ 22 - 0
CombatChipChest/Patches/Patch_GameScript_SaveGame.cs

@@ -0,0 +1,22 @@
+using GadgetCore;
+using GadgetCore.API;
+using HarmonyLib;
+using System;
+using System.Reflection;
+using UnityEngine;
+
+namespace CombatChipChest.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("SaveGame")]
+  [HarmonyGadget("CombatChipChest")]
+  public static class Patch_GameScript_SaveGame
+  {
+    [HarmonyPrefix]
+    public static void Prefix(GameScript __instance, int dood)
+    {
+      Core.combatChipStore.Save();
+    }
+  }
+}

+ 195 - 0
CombatChipChest/Patches/Patch_GameScript_Update.cs

@@ -0,0 +1,195 @@
+using GadgetCore;
+using GadgetCore.API;
+using HarmonyLib;
+using System;
+using System.Reflection;
+using UnityEngine;
+
+namespace CombatChipChest.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("Update")]
+  [HarmonyGadget("CombatChipChest")]
+  public static class Patch_GameScript_Update
+  {
+    [HarmonyPrefix]
+    public static void Prefix(GameScript __instance, ref Item ___holdingItem, ref int ___curhoveringstat, ref bool ___holdingCombatChip, bool ___exitingcombatmode)
+    {
+      try
+      {
+        if (MenuScript.player)
+        {
+          if (GameScript.inventoryOpen)
+          {
+            var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
+            RaycastHit hit;
+            if (Physics.Raycast(ray, out hit, 5f))
+            {
+              if (hit.transform.gameObject.name.StartsWith("combat_storage_slot"))
+              {
+                var slot = int.Parse(hit.transform.gameObject.name.Substring("combat_storage_slot".Length));
+                HoverCombatChipChest(__instance, slot, ref ___curhoveringstat);
+              }
+            }
+          }
+          if (!GameScript.pausing && Input.GetMouseButtonDown(0) && GameScript.inventoryOpen)
+          {
+            var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
+            RaycastHit hit;
+            if (Physics.Raycast(ray, out hit, 7f))
+            {
+              if (hit.transform.gameObject.name.StartsWith("combat_storage_slot"))
+              {
+                var slot = int.Parse(hit.transform.gameObject.name.Substring("combat_storage_slot".Length));
+                if (slot >= 0 && slot < 16)
+                {
+                  if (___holdingItem.id != 0)
+                  {
+                    if (Core.combatChipStore.ChipIDs[slot] != ___holdingItem.id)
+                    {
+                      if (Core.combatChipStore.ChipIDs[slot] == 0)
+                      {
+                        Place(__instance, slot, ref ___holdingItem, ref ___holdingCombatChip);
+                      }
+                      else
+                      {
+                        Swap(__instance, slot, ref ___holdingItem);
+                      }
+                    }
+                  }
+                  else if (Core.combatChipStore.ChipIDs[slot] != 0)
+                  {
+                    Select(__instance, slot, ref ___holdingItem, ref ___holdingCombatChip, ___exitingcombatmode);
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+      catch (Exception e) { Core.logger.LogConsole(e.Message); }
+    }
+
+    public static void HoverCombatChipChest(GameScript __instance, int slot, ref int ___curhoveringstat)
+    {
+      try
+      {
+        if (slot >= 0 && slot < 16)
+        {
+
+          if (slot != ___curhoveringstat)
+          {
+            ___curhoveringstat = slot;
+            if (Core.combatChipStore.ChipIDs[slot] != 0)
+            {
+              __instance.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/hover"), Menuu.soundLevel / 10f);
+            }
+          }
+          Core.combatChipStore.UpdateText(Core.combatChipStore.ChipIDs[slot]);
+        }
+      }
+      catch { }
+    }
+
+    private static void Swap(GameScript __instance, int slot, ref Item ___holdingItem)
+    {
+      try
+      {
+        if (slot >= 0 && slot < 16)
+        {
+          if (slot >= 0 && slot < 16)
+          {
+            __instance.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/CLICK1"), Menuu.soundLevel / 10f);
+            int id = ___holdingItem.id;
+
+            ___holdingItem.id = Core.combatChipStore.ChipIDs[slot];
+
+            Core.combatChipStore.ChipIDs[slot] = id;
+
+            __instance.RefreshCombatChipMenu();
+            __instance.RefreshHoldingSlot();
+
+            Core.combatChipStore.UpdateLatestUI();
+
+            __instance.UpdateHP();
+            __instance.UpdateMana();
+          }
+        }
+      }
+      catch (Exception e) { Core.logger.LogConsole(e.Message); }
+    }
+
+    private static void Select(GameScript __instance, int slot, ref Item ___holdingItem, ref bool ___holdingCombatChip, bool ___exitingcombatmode)
+    {
+      try
+      {
+        if (slot >= 0 && slot < 16)
+        {
+          if (!___exitingcombatmode)
+          {
+            __instance.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/CLICK1"), Menuu.soundLevel / 10f);
+            
+            ___holdingItem = __instance.EmptyItem();
+
+            ___holdingCombatChip = true;
+            
+            ___holdingItem.id = Core.combatChipStore.ChipIDs[slot];
+            
+            Core.combatChipStore.ChipIDs[slot] = 0;
+            
+            __instance.RefreshCombatChipMenu();
+            __instance.RefreshHoldingSlot();
+            
+            Core.combatChipStore.UpdateLatestUI();
+            
+            __instance.UpdateHP();
+            __instance.UpdateMana();
+          }
+        }
+      }
+      catch (Exception e) { Core.logger.LogConsole(e.Message); }
+    }
+
+    private static void Place(GameScript __instance, int slot, ref Item ___holdingItem, ref bool ___holdingCombatChip)
+    {
+      try
+      {
+        if (slot >= 0 && slot < 16)
+        {
+          __instance.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/CLICK1"), Menuu.soundLevel / 10f);
+
+          Core.combatChipStore.ChipIDs[slot] = ___holdingItem.id;
+
+          ___holdingItem = __instance.EmptyItem();
+          __instance.RefreshCombatChipMenu();
+          ___holdingCombatChip = false;
+          __instance.RefreshHoldingSlot();
+          Core.combatChipStore.UpdateLatestUI();
+
+          __instance.UpdateHP();
+          __instance.UpdateMana();
+        }
+      }
+      catch (Exception e) { Core.logger.LogConsole(e.Message); }
+    }
+
+    private static void set(GameScript __instance, string prop, object o)
+    {
+      var field = typeof(GameScript).GetField(prop, BindingFlags.NonPublic | BindingFlags.Instance);
+      field.SetValue(__instance, o);
+    }
+
+    private static T get<T>(GameScript __instance, string prop)
+    {
+      var field = typeof(GameScript).GetField(prop, BindingFlags.NonPublic | BindingFlags.Instance);
+      return (T)field.GetValue(__instance);
+    }
+
+    private static object call(GameScript __instance, string meth, object[] o = null)
+    {
+      MethodInfo dynMethod = __instance.GetType().GetMethod(meth, BindingFlags.NonPublic | BindingFlags.Instance);
+      return dynMethod.Invoke(__instance, o ?? new object[0]);
+    }
+  }
+}

+ 10 - 0
CombatChipChest/Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using static CombatChipChest.CombatChipChest;
+
+[assembly: AssemblyProduct("Combat Chip Simulator Mod")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("Combat Chip Simulator")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("A Gadget mod for Roguelands, adding a Combat Chip Simulator.")] //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
CombatChipChest/Properties/launchSettings.json

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

+ 15 - 0
CombatChipChest/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.

BIN
First/Assets/cGreenLamp.png


BIN
First/Assets/cOrangeLamp.png


BIN
First/Assets/cPlatform.png


BIN
First/Assets/cPurpleLamp.png


BIN
First/Assets/cWhiteLamp.png


BIN
First/Assets/cYellowLamp.png


BIN
First/Assets/charBG.png


BIN
First/Assets/iAirCore.png


BIN
First/Assets/iCore.png


BIN
First/Assets/iEarthCore.png


BIN
First/Assets/iFireCore.png


BIN
First/Assets/iGreenLamp.png


BIN
First/Assets/iOrangeLamp.png


BIN
First/Assets/iPlatform.png


BIN
First/Assets/iPurpleLamp.png


BIN
First/Assets/iWaterCore.png


BIN
First/Assets/iWhiteLamp.png


BIN
First/Assets/iYellowLamp.png


BIN
First/Assets/one


+ 24 - 0
First/Core.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace First
+{
+  internal static class Core
+  {
+    public static int itemID = -1;
+
+    public static int itemWaterCoreId = -1;
+    public static int itemAirCoreId = -1;
+    public static int itemFireCoreId = -1;
+    public static int itemEarthCoreId = -1;
+
+    public static int itemGreenLampId = -1;
+    public static int itemYellowLampId = -1;
+    public static int itemPurpleLampId = -1;
+    public static int itemOrangeLampId = -1;
+
+    public static int itemWhiteLampId = -1;
+  }
+}

+ 62 - 0
First/First.cs

@@ -0,0 +1,62 @@
+using UnityEngine;
+using GadgetCore.API;
+
+namespace First
+{
+  [Gadget("First")]
+  public class First : Gadget<First>
+  {
+    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)");
+      }
+
+      // Do stuff with `Config`
+
+      Config.Save();
+    }
+
+    public override string GetModDescription()
+    {
+      return "This is a new description."; // TODO: Change this
+    }
+
+    protected override void Initialize()
+    {
+      Logger.Log("First v" + Info.Mod.Version);
+
+      Material copy = new Material((Material)Resources.Load("mat/planet0"));
+      copy.mainTexture = GadgetCoreAPI.LoadTexture2D("charBG.png");
+      GadgetCoreAPI.AddCustomResource("mat/planet0", copy);
+
+      //int id = ItemUtil.CreateDefaultItem("iCore.png", "Water Core");
+      //Core.itemID = id;
+      Core.itemWaterCoreId = ItemUtil.CreateDefaultItem("iWaterCore.png", "Water Core");
+      Core.itemAirCoreId = ItemUtil.CreateDefaultItem("iAirCore.png", "Air Core");
+      Core.itemFireCoreId = ItemUtil.CreateDefaultItem("iFireCore.png", "Fire Core");
+      Core.itemEarthCoreId = ItemUtil.CreateDefaultItem("iEarthCore.png", "Earth Core");
+
+      //Core.itemGreenLampId = ItemUtil.CreatePlacableItem("cGreenLamp.png", "iGreenLamp.png", 2401, "Green Lamp", "Green Lamp Object", "Green Lamp");
+      Core.itemGreenLampId = ItemUtil.CreatePlacableLightItem("cGreenLamp.png", "iGreenLamp.png", "Green Light", new Color(0.1f, 0.6f, 0, 1));
+      Core.itemYellowLampId = ItemUtil.CreatePlacableLightItem("cYellowLamp.png", "iYellowLamp.png", "Yellow Light", new Color(0.9f, 0.75f, 0, 1));
+      Core.itemOrangeLampId = ItemUtil.CreatePlacableLightItem("cOrangeLamp.png", "iOrangeLamp.png", "Orange Light", new Color(0.7f, 0.15f, 0, 1));
+      Core.itemPurpleLampId = ItemUtil.CreatePlacableLightItem("cPurpleLamp.png", "iPurpleLamp.png", "Purple Light", new Color(0.5f, 0, 0.6f, 1));
+      Core.itemWhiteLampId = ItemUtil.CreatePlacableLightItem("cWhiteLamp.png", "iWhiteLamp.png", "White Light", new Color(0.8f, 0.8f, 0.8f, 1));
+
+      Core.itemID = ItemUtil.CreatePlacableItem("cPlatform.png", "iPlatform.png", 2501, "Platform", "Platform Object", "Platform");
+
+      PlanetInfo scrapYardPlanetInfo = new PlanetInfo(PlanetType.SPECIAL, "Scrap Yard", new GadgetCore.Util.Tuple<int, int>[0]).Register("Scrap Yard");
+      PlanetRegistry.SetVanillaExitPortalWeight(0, scrapYardPlanetInfo.GetID(), 1000);
+    }
+  }
+}

+ 202 - 0
First/First.csproj

@@ -0,0 +1,202 @@
+<?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>First</RootNamespace>
+    <AssemblyName>First</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>
+    <Reference Include="0Harmony">
+      <HintPath>$(GamePath)$(ManagedFolder)0Harmony.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>$(GamePath)$(ManagedFolder)Assembly-CSharp.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="GadgetCore">
+      <HintPath>$(GamePath)$(ManagedFolder)GadgetCore.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>$(GamePath)$(ManagedFolder)UnityEngine.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+  </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\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\First\one">
+      <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\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\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\one">
+      <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>

+ 56 - 0
First/ItemUtil.cs

@@ -0,0 +1,56 @@
+using UnityEngine;
+using GadgetCore.API;
+
+namespace First
+{
+  public static class ItemUtil
+  {
+    public static int CreatePlacableItem(string tileImgPath, string itemImgPath, int tileId, string itemName, string tileName, string name)
+    {
+
+      Texture2D texture2D = GadgetCoreAPI.LoadTexture2D(tileImgPath, false);
+      Texture2D texture2D2 = GadgetCoreAPI.LoadTexture2D(itemImgPath, false);
+      GameObject gameObject = Object.Instantiate<GameObject>((GameObject)Resources.Load("prop/" + tileId));
+      //gameObject.transform.localScale = new Vector3(0.3333f, 0.3333f);
+
+      gameObject.layer = 11;
+
+      BoxCollider collider = gameObject.AddComponent<BoxCollider>();
+      //collider.transform.localScale = new Vector3(3, 3);
+
+
+
+      ItemInfo itemInfo = new ItemInfo(0, name, "", texture2D2, 500, default(EquipStats), null, null, null, null);
+      itemInfo.Register(name, -1, false);
+      new TileInfo(TileType.SOLID, texture2D, gameObject, itemInfo).Register(name, -1, false);
+      return itemInfo.GetID();
+    }
+
+    public static int CreatePlacableLightItem(string tileImgPath, string itemImgPath, string name, Color color)
+    {
+
+      Texture2D texture2D = GadgetCoreAPI.LoadTexture2D(tileImgPath, false);
+      Texture2D texture2D2 = GadgetCoreAPI.LoadTexture2D(itemImgPath, false);
+
+      GameObject gameObject = Object.Instantiate<GameObject>((GameObject)Resources.Load("prop/" + 2401));
+      try
+      {
+        gameObject.GetComponentInChildren<Light>().color = color;
+      }
+      catch { }
+
+      ItemInfo itemInfo = new ItemInfo(0, name, "", texture2D2, 500, default(EquipStats), null, null, null, null);
+      itemInfo.Register(name, -1, false);
+      new TileInfo(TileType.NONSOLID, texture2D, gameObject, itemInfo).Register(name, -1, false);
+      return itemInfo.GetID();
+    }
+
+    public static int CreateDefaultItem(string itemImgPath, string name, int value = 20)
+    {
+      Texture2D texture2D2 = GadgetCoreAPI.LoadTexture2D(itemImgPath, false);
+      ItemInfo itemInfo = new ItemInfo(ItemType.GENERIC, name, "", texture2D2, value, default(EquipStats), null, null, null, null);
+      itemInfo.Register(name, -1, false);
+      return itemInfo.GetID();
+    }
+  }
+}

+ 3 - 0
First/Manifest.ini

@@ -0,0 +1,3 @@
+[Metadata]
+Name=First
+Assembly=First.dll

+ 1 - 0
First/ModInfo.txt

@@ -0,0 +1 @@
+Insert the description for your mod here!

+ 77 - 0
First/Patches/Patch_Chunk_GeneratePlatforms.cs

@@ -0,0 +1,77 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+
+namespace First.Patches
+{
+  [HarmonyPatch(typeof(Chunk))]
+  [HarmonyPatch("GeneratePlatforms")]
+  [HarmonyGadget("First")]
+  public static class Patch_Chunk_GeneratePlatforms
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(Chunk __instance)
+    {
+      int type = UnityEngine.Random.Range(0, 4);
+      if (type < 3)
+      {
+        for (int i = 0; i < 5; i++)
+        {
+          if (UnityEngine.Random.Range(0, 2) == 0)
+          {
+            Network.Instantiate(Resources.Load("plat/plat1"), GetPlatPos(i, __instance.transform.position), Quaternion.identity, 0);
+          }
+        }
+      }
+      else
+      {
+        for (int i = 0; i < 5; i++)
+        {
+          if (UnityEngine.Random.Range(0, 2) == 0)
+          {
+            Network.Instantiate(Resources.Load("plat/platMove"), GetPlatPos(i, __instance.transform.position), Quaternion.identity, 0);
+          }
+        }
+      }
+      // Add code to run before `MethodName` is called.
+      return false; // Return false to prevent the vanilla method from running.
+    }
+
+
+    // Token: 0x0600013F RID: 319 RVA: 0x0001AB44 File Offset: 0x00018F44
+    private static Vector3 GetPlatPos(int i, Vector3 position)
+    {
+      Vector3 result = new Vector3(0f, 0f, 0f);
+      float num = (float)UnityEngine.Random.Range(-10, 11) * 0.7f;
+      float num2 = (float)UnityEngine.Random.Range(-7, 8) * 0.7f;
+      switch (i)
+      {
+        case 0:
+          result = new Vector3(position.x - 16f + num, position.y + 16f + num2, 5f);
+          break;
+        case 1:
+          result = new Vector3(position.x + 16f + num, position.y + 16f + num2, 5f);
+          break;
+        case 2:
+          result = new Vector3(position.x + 16f + num, position.y - 16f + num2, 5f);
+          break;
+        case 3:
+          result = new Vector3(position.x - 16f + num, position.y - 16f + num2, 5f);
+          break;
+        case 4:
+          result = new Vector3(position.x + num * 2f, position.y + num2, 5f);
+          break;
+      }
+      return result;
+    }
+
+    /*
+        [HarmonyPostfix]
+        public static void Postfix(ClassName __instance)
+        {
+            // Add code to run after `MethodName` is called.
+        }
+		*/
+  }
+}

+ 55 - 0
First/Patches/Patch_GameScript_GatherLoot.cs

@@ -0,0 +1,55 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+
+namespace First.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("GatherLoot")]
+  [HarmonyGadget("First")]
+  public static class Patch_GameScript_GatherLoot
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance)
+    {
+      int num = Random.Range(0, 1000);
+      if (num < 999)
+      {
+        __instance.AddItemGather(71);
+      }
+      else if (Random.Range(0, 20) == 12)
+      {
+      }
+      else
+      {
+        int num2 = Random.Range(0, 4);
+        if (num2 == 0)
+        {
+          __instance.AddItemGather(Random.Range(101, 104));
+        }
+        else if (num2 == 1)
+        {
+          __instance.AddItemGather(Random.Range(111, 114));
+        }
+        else if (num2 == 2)
+        {
+          __instance.AddItemGather(Random.Range(121, 124));
+        }
+        else
+        {
+          __instance.AddItemGather(Random.Range(131, 134));
+        }
+      }
+      return false; // Return false to prevent the vanilla method from running.
+    }
+
+    /*
+        [HarmonyPostfix]
+        public static void Postfix(ClassName __instance)
+        {
+            // Add code to run after `MethodName` is called.
+        }
+		*/
+  }
+}

+ 51 - 0
First/Patches/Patch_GameScript_InitializeGatherStorage.cs

@@ -0,0 +1,51 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+using System.Reflection;
+
+namespace First.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("InitializeGatherStorage")]
+  [HarmonyGadget("First")]
+  public static class Patch_GameScript_InitializeGatherStorage
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance)
+		{
+			int i;
+			for (i = 0; i < 6; i++)
+			{
+				GameScript.shipDroid[i] = PreviewLabs.PlayerPrefs.GetInt("sd" + i);
+				if (GameScript.shipDroid[i] > 5)
+				{
+					GameScript.shipDroid[i] = 5;
+				}
+			}
+			if (GameScript.shipDroid[0] == 0)
+			{
+				GameScript.shipDroid[0] = 1;
+				PreviewLabs.PlayerPrefs.SetInt("sd" + i, 1);
+			}
+			Item[] items = new Item[16];
+
+			var field = typeof(GameScript).GetField("gatherStorage", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance);
+			field.SetValue(__instance, items);
+
+			for (i = 0; i < 16; i++)
+			{
+				items[i] = new Item(71, 2, 0, 0, 0, new int[3], new int[3]);
+			}
+			return false; // Return false to prevent the vanilla method from running.
+    }
+
+    /*
+        [HarmonyPostfix]
+        public static void Postfix(ClassName __instance)
+        {
+            // Add code to run after `MethodName` is called.
+        }
+		*/
+  }
+}

+ 54 - 0
First/Patches/Patch_KylockeStand_Awake.cs

@@ -0,0 +1,54 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System.Collections;
+using UnityEngine;
+
+namespace First.Patches
+{
+
+	[HarmonyPatch(typeof(KylockeStand))]
+	[HarmonyPatch("Awake")]
+	[HarmonyGadget("First")]
+	public static class Patch_KylockeStand_Awake
+	{
+		[HarmonyPostfix]
+		public static void Prefix(KylockeStand __instance)
+		{
+			__instance.StartCoroutine(WaitAMoment(__instance));
+		}
+
+		private static IEnumerator WaitAMoment(KylockeStand instance)
+		{
+			if (instance.itemID == 2402)
+			{
+				instance.itemID = Core.itemWhiteLampId;
+			}
+			else if (instance.itemID == 2401)
+			{
+				switch (Random.Range(0, 6))
+				{
+					case 0:
+						instance.itemID = Core.itemYellowLampId;
+						break;
+					case 1:
+						instance.itemID = Core.itemOrangeLampId;
+						break;
+					case 2:
+						instance.itemID = 2401;
+						break;
+					case 3:
+						instance.itemID = Core.itemPurpleLampId;
+						break;
+					case 4:
+						instance.itemID = 2402;
+						break;
+					case 5:
+						instance.itemID = Core.itemGreenLampId;
+						break;
+				}
+			}
+			yield break;
+		}
+	}
+}

+ 11 - 0
First/Properties/AssemblyInfo.cs

@@ -0,0 +1,11 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using static First.First;
+
+[assembly: AssemblyProduct("First")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("First")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("A Gadget mod for Roguelands")] //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
First/Properties/launchSettings.json

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

+ 15 - 0
First/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.

+ 10 - 0
GamePaths.xml

@@ -0,0 +1,10 @@
+<?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>

+ 16 - 0
LoopPortal/Core.cs

@@ -0,0 +1,16 @@
+using GadgetCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnityEngine;
+
+namespace LoopPortal
+{
+  internal static class Core
+  {
+    public static GadgetLogger logger;
+    public static int npcId;
+    public static GameObject portalObject;
+  }
+}

+ 30 - 0
LoopPortal/LoopPortal.cs

@@ -0,0 +1,30 @@
+using UnityEngine;
+using GadgetCore.API;
+using GadgetCore.API.ConfigMenu;
+
+namespace LoopPortal
+{
+  [Gadget("LoopPortal")]
+  public class LoopPortal : Gadget<LoopPortal>
+  {
+    public const string MOD_VERSION = "1.1"; // 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.
+
+    public override IGadgetConfigMenu GetConfigMenu() { return null; }
+
+    public override string GetModDescription()
+    {
+      return "Adds a 4th portal to the end of every level that is guaranteed to loop to the current planet.";
+    }
+
+    protected override void Initialize()
+    {
+      Logger.Log("Loop Portal v" + Info.Mod.Version);
+      Core.logger = Logger;
+
+      TileInfo tile = new TileInfo(TileType.INTERACTIVE, null as Texture2D, new GameObject("port4")).Register("port4");
+
+      Core.npcId = tile.GetID();
+    }
+  }
+}

+ 143 - 0
LoopPortal/LoopPortal.csproj

@@ -0,0 +1,143 @@
+<?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>LoopPortal</RootNamespace>
+    <AssemblyName>LoopPortal</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>
+    <Reference Include="0Harmony">
+      <HintPath>$(GamePath)$(ManagedFolder)0Harmony.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>$(GamePath)$(ManagedFolder)Assembly-CSharp.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="GadgetCore">
+      <HintPath>$(GamePath)$(ManagedFolder)GadgetCore.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>$(GamePath)$(ManagedFolder)UnityEngine.dll</HintPath>
+      <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="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>

+ 3 - 0
LoopPortal/Manifest.ini

@@ -0,0 +1,3 @@
+[Metadata]
+Name=Loop Portal
+Assembly=LoopPortal.dll

+ 2 - 0
LoopPortal/ModInfo.txt

@@ -0,0 +1,2 @@
+A conceptual recreation of the UMF mod ReEntrance.
+Adds a 4th portal to the end of every level that is guaranteed to loop to the current planet.

+ 38 - 0
LoopPortal/Patches/Patch_EntranceScript_SpawnEndPortal.cs

@@ -0,0 +1,38 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System.Collections;
+using UnityEngine;
+
+namespace LoopPortal.Patches
+{
+
+  [HarmonyPatch(typeof(EntranceScript))]
+  [HarmonyPatch("SpawnEndPortal")]
+  [HarmonyGadget("LoopPortal")]
+  public static class Patch_EntranceScript_SpawnEndPortal
+  {
+    [HarmonyPostfix]
+    public static void Postfix(EntranceScript __instance)
+    {
+      __instance.StartCoroutine(AddPortal(__instance));
+    }
+
+    public static IEnumerator AddPortal(EntranceScript __instance)
+    {
+      yield return new WaitForSeconds(0.1f);
+      if (GameScript.endPortal[0] != null && Network.isServer)
+      {
+
+        var spawnSpot = __instance.spawnSpot;
+
+        var i = (GameObject)Network.Instantiate((GameObject)Resources.Load("portal"), new Vector3(spawnSpot[0].transform.position.x - 7.5f, spawnSpot[0].transform.position.y + 1.2f, 0f), Quaternion.identity, 0);
+        i.name = "portal/4/obj";
+        var iUA = i.transform.GetChild(0).gameObject;
+        i.GetComponent<NetworkView>().RPC("Activate", RPCMode.All, new object[0]);
+        iUA.GetComponent<NetworkView>().RPC("Set", RPCMode.AllBuffered, new object[] { SpawnerScript.curBiome, 0, 4 });
+        Core.portalObject = i;
+      }
+      yield break;
+    }
+  }
+}

+ 28 - 0
LoopPortal/Patches/Patch_PlayerScript_Interact.cs

@@ -0,0 +1,28 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System;
+using System.Reflection;
+
+namespace LoopPortal.Patches
+{
+
+  [HarmonyPatch(typeof(PlayerScript))]
+  [HarmonyPatch("Interact")]
+  [HarmonyGadget("LoopPortal")]
+  public static class Patch_PlayerScript_Interact
+  {
+    [HarmonyPrefix]
+    public static void Prefix(PlayerScript __instance, int id)
+    {
+      try
+      {
+        if (id == Core.npcId)
+        {
+          __instance.Portal(4);
+        }
+      }
+      catch (Exception e) { Core.logger.LogConsole(e); }
+    }
+  }
+}

+ 30 - 0
LoopPortal/Patches/Patch_SpawnerScript_DestroyWorld.cs

@@ -0,0 +1,30 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System;
+using System.Collections;
+using UnityEngine;
+
+namespace LoopPortal.Patches
+{
+
+  [HarmonyPatch(typeof(SpawnerScript))]
+  [HarmonyPatch("DestroyWorld")]
+  [HarmonyGadget("LoopPortal")]
+  public static class Patch_SpawnerScript_DestroyWorld
+  {
+    [HarmonyPrefix]
+    public static void Prefix(SpawnerScript __instance, int a)
+    {
+      if (Network.isServer)
+      {
+        GameObject gameObject = Core.portalObject;
+        if (gameObject != null)
+        {
+          Network.RemoveRPCs(gameObject.GetComponent<NetworkView>().viewID);
+          Network.RemoveRPCs(gameObject.transform.GetChild(0).gameObject.gameObject.GetComponent<NetworkView>().viewID);
+          Network.Destroy(gameObject.gameObject);
+        }
+      }
+    }
+  }
+}

+ 10 - 0
LoopPortal/Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using static LoopPortal.LoopPortal;
+
+[assembly: AssemblyProduct("LoopPortal")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("LoopPortal")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("A Gadget mod for Roguelands, adding some ReEntrance")] //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
LoopPortal/Properties/launchSettings.json

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

+ 15 - 0
LoopPortal/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.

+ 25 - 0
ModSyncClient/ModSync/ModSync.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30523.141
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModSync", "ModSync\ModSync.csproj", "{AE9A8FA3-7ACE-43A8-98E6-188B9EA63B81}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{AE9A8FA3-7ACE-43A8-98E6-188B9EA63B81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AE9A8FA3-7ACE-43A8-98E6-188B9EA63B81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AE9A8FA3-7ACE-43A8-98E6-188B9EA63B81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AE9A8FA3-7ACE-43A8-98E6-188B9EA63B81}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {D801FB84-FCCE-4452-9C84-2F8331FF3429}
+	EndGlobalSection
+EndGlobal

+ 6 - 0
ModSyncClient/ModSync/ModSync/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+    </startup>
+</configuration>

+ 9 - 0
ModSyncClient/ModSync/ModSync/App.xaml

@@ -0,0 +1,9 @@
+<Application x:Class="ModSync.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:ModSync"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 17 - 0
ModSyncClient/ModSync/ModSync/App.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace ModSync
+{
+  /// <summary>
+  /// Interaktionslogik für "App.xaml"
+  /// </summary>
+  public partial class App : Application
+  {
+  }
+}

+ 22 - 0
ModSyncClient/ModSync/ModSync/MainWindow.xaml

@@ -0,0 +1,22 @@
+<Window x:Class="ModSync.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:ModSync"
+        mc:Ignorable="d" ResizeMode="CanMinimize" WindowStyle="ToolWindow"
+        Title="MainWindow" Height="150" Width="260" Background="#34343D">
+  <Grid Margin="10" IsEnabled="{Binding Acting}">
+    <Grid.RowDefinitions>
+      <RowDefinition Height="*"/>
+      <RowDefinition Height="auto"/>
+      <RowDefinition Height="*"/>
+      <RowDefinition Height="auto"/>
+      <RowDefinition Height="5"/>
+      <RowDefinition Height="auto"/>
+    </Grid.RowDefinitions>
+    <TextBlock Grid.Row="1" Text="{Binding Error}" Foreground="White"/>
+    <Button Padding="5" Grid.Row="3" Click="Button_ClickUpload" IsEnabled="{Binding ShowUploaad}">Upload Mods</Button>
+    <Button Padding="5" Grid.Row="5" Click="Button_ClickDownload">Download Mods</Button>
+  </Grid>
+</Window>

+ 282 - 0
ModSyncClient/ModSync/ModSync/MainWindow.xaml.cs

@@ -0,0 +1,282 @@
+using Renci.SshNet;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace ModSync
+{
+  /// <summary>
+  /// Interaktionslogik für MainWindow.xaml
+  /// </summary>
+  public partial class MainWindow : Window
+  {
+    public MainWindow()
+    {
+      InitializeComponent();
+      DataContext = this;
+      if (File.Exists(@"login.cfg")) ShowUploaad = true;
+    }
+
+    private string m_Error = "Ready";
+
+    public string Error
+    {
+      get { return m_Error; }
+      set
+      {
+        m_Error = value;
+        OnPropertyChanged();
+      }
+    }
+
+    private bool m_ShowUploaad;
+
+    public bool ShowUploaad
+    {
+      get { return m_ShowUploaad; }
+      set
+      {
+        m_ShowUploaad = value;
+        OnPropertyChanged();
+      }
+    }
+
+    private bool m_Acting = true;
+
+    public bool Acting
+    {
+      get { return m_Acting; }
+      set
+      {
+        m_Acting = value;
+        OnPropertyChanged();
+      }
+    }
+
+    private void Button_ClickUpload(object sender, RoutedEventArgs e)
+    {
+      Task.Run(new Action(() =>
+      {
+        Acting = false;
+        try
+        {
+          Upload();
+        }
+        catch { }
+        Acting = true;
+      }));
+    }
+
+    private void Button_ClickDownload(object sender, RoutedEventArgs e)
+    {
+      Task.Run(new Action(() =>
+      {
+        Acting = false;
+        try
+        {
+          Download();
+        }
+        catch { }
+        Acting = true;
+      }));
+    }
+
+
+    private void Upload()
+    {
+      Error = "...";
+      string sftpHost;
+      string sftpUser;
+      string sftpPwd;
+      int sftpPort = 22;
+      try
+      {
+
+        Dictionary<string, string> dict = new Dictionary<string, string>();
+
+        System.IO.StreamReader file = null;
+        try
+        {
+          string line;
+
+          file = new System.IO.StreamReader(@"login.cfg");
+
+          while ((line = file.ReadLine()) != null)
+          {
+            string[] pa = line.Split("=".ToCharArray(), 2);
+            if (pa.Length == 2)
+            {
+              dict.Add(pa[0], pa[1]);
+            }
+          }
+        }
+        finally
+        {
+          if (file != null)
+            file.Close();
+        }
+
+        sftpHost = dict["host"];
+        sftpUser = dict["user"];
+        sftpPwd = dict["pw"];
+        sftpPort = int.Parse(dict["port"]);
+      }
+      catch
+      {
+        Error = "Error loading login.cfg";
+        return;
+      }
+
+      try
+      {
+
+        if (!Directory.Exists(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp"))
+          Directory.CreateDirectory(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp");
+      }
+      catch
+      {
+        Error = "Error creating temp dir";
+        return;
+      }
+
+      try
+      {
+        System.IO.DirectoryInfo di = new DirectoryInfo(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp");
+
+        foreach (FileInfo file in di.GetFiles())
+        {
+          file.Delete();
+        }
+      }
+      catch
+      {
+        Error = "Error deleting files";
+        return;
+      }
+
+      try
+      {
+        ZipFile.CreateFromDirectory(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Mods", @"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp\mods.zip");
+      }
+      catch
+      {
+        Error = "Error creating zip";
+        return;
+      }
+
+
+      string fileToUpload = @"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp\mods.zip";
+      string uploadPath = "/var/www/html_files/roguelands";
+
+      try
+      {
+        using (var client = new SftpClient(sftpHost, sftpPort, sftpUser, sftpPwd))
+        {
+          client.Connect();
+          if (client.IsConnected)
+          {
+            client.ChangeDirectory(uploadPath);
+
+            using (var fileStream = new FileStream(fileToUpload, FileMode.Open))
+            {
+              client.BufferSize = 4 * 1024; // bypass Payload error large files
+              client.UploadFile(fileStream, System.IO.Path.GetFileName(fileToUpload));
+            }
+          }
+          client.Disconnect();
+        }
+      }
+      catch (Exception Ex)
+      {
+        Error = "Error uploading zip: " + Ex.Message;
+        return;
+      }
+      Error = "Fin";
+    }
+
+
+    private void Download()
+    {
+      Error = "...";
+      try
+      {
+        System.IO.DirectoryInfo di = new DirectoryInfo(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Mods");
+
+        foreach (FileInfo file in di.GetFiles())
+        {
+          file.Delete();
+        }
+      }
+      catch
+      {
+        Error = "Error deleting files";
+        return;
+      }
+
+      try
+      {
+
+        if (!Directory.Exists(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp"))
+          Directory.CreateDirectory(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp");
+      }
+      catch
+      {
+        Error = "Error creating temp dir";
+        return;
+      }
+
+      try
+      {
+        System.IO.DirectoryInfo di = new DirectoryInfo(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp");
+
+        foreach (FileInfo file in di.GetFiles())
+        {
+          file.Delete();
+        }
+      }
+      catch
+      {
+        Error = "Error deleting files II";
+        return;
+      }
+
+      try
+      {
+        using (var client = new WebClient())
+        {
+          client.DownloadFile("https://files.zariteis.de/roguelands/mods.zip", @"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp\mods.zip");
+        }
+      }
+      catch
+      {
+        Error = "Error downloding files";
+        return;
+      }
+
+      try
+      {
+        ZipFile.ExtractToDirectory(@"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Temp\mods.zip", @"C:\Program Files (x86)\Steam\steamapps\common\Roguelands\GadgetCore\Mods");
+      }
+      catch
+      {
+        Error = "Error installing files";
+        return;
+      }
+      Error = "Fin";
+    }
+  }
+}

+ 104 - 0
ModSyncClient/ModSync/ModSync/ModSync.csproj

@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{AE9A8FA3-7ACE-43A8-98E6-188B9EA63B81}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>ModSync</RootNamespace>
+    <AssemblyName>ModSync</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Renci.SshNet, Version=2020.0.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
+      <HintPath>..\packages\SSH.NET.2020.0.0\lib\net40\Renci.SshNet.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.IO.Compression.FileSystem" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="NotifyProperty.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 18 - 0
ModSyncClient/ModSync/ModSync/NotifyProperty.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace ModSync
+{
+  public partial class MainWindow : INotifyPropertyChanged
+  {
+
+    public event PropertyChangedEventHandler PropertyChanged;
+    protected void OnPropertyChanged([CallerMemberName] string name = null)
+    {
+      PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+    }
+  }
+}

+ 55 - 0
ModSyncClient/ModSync/ModSync/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Allgemeine Informationen über eine Assembly werden über die folgenden
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die einer Assembly zugeordnet sind.
+[assembly: AssemblyTitle("ModSync")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ModSync")]
+[assembly: AssemblyCopyright("Copyright ©  2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
+// für COM-Komponenten unsichtbar.  Wenn Sie auf einen Typ in dieser Assembly von
+// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
+[assembly: ComVisible(false)]
+
+//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
+//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei
+//in einer <PropertyGroup> fest.  Wenn Sie in den Quelldateien beispielsweise Deutsch
+//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest.  Heben Sie dann die Auskommentierung
+//des nachstehenden NeutralResourceLanguage-Attributs auf.  Aktualisieren Sie "en-US" in der nachstehenden Zeile,
+//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
+                                     //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
+                                     // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
+    ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
+                                              //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
+                                              // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
+)]
+
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+//      Hauptversion
+//      Nebenversion
+//      Buildnummer
+//      Revision
+//
+// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
+// indem Sie "*" wie unten gezeigt eingeben:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
ModSyncClient/ModSync/ModSync/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Dieser Code wurde von einem Tool generiert.
+//     Laufzeitversion: 4.0.30319.42000
+//
+//     Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
+//     der Code erneut generiert wird.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace ModSync.Properties
+{
+
+
+  /// <summary>
+  ///   Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+  /// </summary>
+  // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
+  // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+  // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+  // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resources
+  {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resources()
+    {
+    }
+
+    /// <summary>
+    ///   Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager
+    {
+      get
+      {
+        if ((resourceMan == null))
+        {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModSync.Properties.Resources", typeof(Resources).Assembly);
+          resourceMan = temp;
+        }
+        return resourceMan;
+      }
+    }
+
+    /// <summary>
+    ///   Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+    ///   Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture
+    {
+      get
+      {
+        return resourceCulture;
+      }
+      set
+      {
+        resourceCulture = value;
+      }
+    }
+  }
+}

+ 117 - 0
ModSyncClient/ModSync/ModSync/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
ModSyncClient/ModSync/ModSync/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace ModSync.Properties
+{
+
+
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+  internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+  {
+
+    private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+    public static Settings Default
+    {
+      get
+      {
+        return defaultInstance;
+      }
+    }
+  }
+}

+ 7 - 0
ModSyncClient/ModSync/ModSync/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
ModSyncClient/ModSync/ModSync/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="SSH.NET" version="2020.0.0" targetFramework="net472" />
+</packages>

BIN
MonsterNests/Assets/bugspotBig.png


BIN
MonsterNests/Assets/goldenShroom.png


BIN
MonsterNests/Assets/spiderEgg.png


+ 19 - 0
MonsterNests/Core.cs

@@ -0,0 +1,19 @@
+using GadgetCore;
+using GadgetCore.API;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnityEngine;
+
+namespace MonsterNests
+{
+  internal static class Core
+  {
+
+    public static ObjectInfo objectBugspotBig;
+    public static ObjectInfo objectSpiderEgg;
+    public static ObjectInfo objectGoldenShroom;
+    public static GadgetLogger logger;
+  }
+}

+ 29 - 0
MonsterNests/EnemyObjectInfo.cs

@@ -0,0 +1,29 @@
+using GadgetCore.API;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnityEngine;
+
+namespace MonsterNests
+{
+  public class EnemyObjectInfo : ObjectInfo
+  {
+    public EnemyObjectInfo(ObjectType Type, Item ItemDrop, int RandomDropBonus, Texture Tex, Texture FlyHeadTex = null, Texture FlyWingTex = null, Vector2 ColliderOffset = default)
+      : base(Type, ItemDrop, RandomDropBonus, Tex, FlyHeadTex, FlyWingTex, ColliderOffset)
+    {
+
+    }
+
+    public EnemyObjectInfo(ObjectType Type, Item ItemDrop, int RandomDropBonus, Material Mat, Material FlyHeadMat = null, Material FlyWingMat = null, Vector2 ColliderOffset = default)
+      : base(Type, ItemDrop, RandomDropBonus, Mat, FlyHeadMat, FlyWingMat, ColliderOffset)
+    {
+
+    }
+
+    public override void DropItem(Vector3 pos)
+    {
+      base.DropItem(pos);
+    }
+  }
+}

+ 3 - 0
MonsterNests/Manifest.ini

@@ -0,0 +1,3 @@
+[Metadata]
+Name=Monster Nests
+Assembly=MonsterNests.dll

+ 1 - 0
MonsterNests/ModInfo.txt

@@ -0,0 +1 @@
+A mod that adds some monster nests.

+ 64 - 0
MonsterNests/MonsterNests.cs

@@ -0,0 +1,64 @@
+using UnityEngine;
+using GadgetCore.API;
+using GadgetCore.Util;
+
+namespace MonsterNests
+{
+  [Gadget("MonsterNests")]
+  public class MonsterNests : Gadget<MonsterNests>
+  {
+    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 some monster nests.";
+    }
+
+    protected override void Initialize()
+    {
+      Logger.Log("Monster Nests v" + Info.Mod.Version);
+      Core.logger = Logger;
+
+      Texture2D textureBugspotBig = GadgetCoreAPI.LoadTexture2D("bugspotBig.png");
+      Texture2D textureSpiderEgg = GadgetCoreAPI.LoadTexture2D("spiderEgg.png");
+      Texture2D textureGoldenShroom = GadgetCoreAPI.LoadTexture2D("goldenShroom.png");
+
+      Core.objectBugspotBig = new ObjectInfo(ObjectType.BUGSPOT, new Item(31, 1, 0, 0, 0, new int[3], new int[3]), 22, textureBugspotBig).Register("bugspotBig");
+      Core.objectSpiderEgg = new ObjectInfo(ObjectType.ORE, new Item(3, 1, 0, 0, 0, new int[3], new int[3]), 22, textureSpiderEgg).Register("spiderEgg");
+      Core.objectGoldenShroom = new ObjectInfo(ObjectType.PLANT, new Item(12, 1, 0, 0, 0, new int[3], new int[3]), 22, textureGoldenShroom).Register("goldenShroom");
+
+      //PlanetInfo planetInfo = PlanetRegistry.Singleton[0];
+      //planetInfo.AddWeightedWorldSpawn(objectBugspotBig, 10);
+      //planetInfo.AddWeightedWorldSpawn(objectGoldenShroom, 10);
+
+      /*
+      GameObject enemy = GadgetCoreAPI.GetEntityResource("");
+
+      new EntityInfo(EntityType.COMMON, objectSpaceOreBig.Object, new int[] { 0 }).Register("");
+
+      */
+      /*
+      ((CraftMenuInfo)MenuRegistry.Singleton["Gadget Core:Crafter Menu"]).AddCraftPerformer(CraftMenuInfo.CreateSimpleCraftPerformer(
+      Tuple.Create(new int[] { 11, 11, 11 }, new Item(11, 2, 0, 0, 0, new int[3], new int[3]), 2)
+      ));
+      */
+
+    }
+  }
+}

+ 323 - 0
MonsterNests/MonsterNests.csproj

@@ -0,0 +1,323 @@
+<?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>MonsterNests</RootNamespace>
+    <AssemblyName>MonsterNests</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>
+    <Reference Include="0Harmony">
+      <HintPath>$(GamePath)$(ManagedFolder)0Harmony.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>$(GamePath)$(ManagedFolder)Assembly-CSharp.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="GadgetCore">
+      <HintPath>$(GamePath)$(ManagedFolder)GadgetCore.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>$(GamePath)$(ManagedFolder)UnityEngine.dll</HintPath>
+      <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\bgScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgSpace.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\bSpacebg0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bugspotBig.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\entranceScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\entranceSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\First\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\goldenShroom.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\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\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\meteor1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor4.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\midScrapYardChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midScrapYardChunk1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midSpaceChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midSpaceChunk1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetSpacePrev.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideBigScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideBigSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sidesmallScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideSmallSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signScrapYard - Kopie.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spaceOre.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spaceOreBig.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spiderEgg.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\stars.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\tx1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\tx2.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>

+ 51 - 0
MonsterNests/Patches/Patch_Chunk_SpawnBiomeSlot.cs

@@ -0,0 +1,51 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System.Collections;
+using System.Threading;
+using System.Windows.Threading;
+using UnityEngine;
+
+namespace MonsterNests.Patches
+{
+
+  [HarmonyPatch(typeof(Chunk))]
+  [HarmonyPatch("SpawnBiomeSlot")]
+  [HarmonyGadget("MonsterNests")]
+  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 < 2)
+      {
+        if (a == 0)
+        {
+          ___networkStuff[___temp] = (GameObject)Network.Instantiate(Core.objectBugspotBig.Object, transform.position, Quaternion.identity, 0);
+          ___temp++;
+          return false;
+        }
+        if (a == 2)
+        {
+          ___networkStuff[___temp] = (GameObject)Network.Instantiate(Core.objectSpiderEgg.Object, transform.position, Quaternion.identity, 0);
+          ___temp++;
+          return false;
+        }
+        if (a == 3)
+        {
+          ___networkStuff[___temp] = (GameObject)Network.Instantiate(Core.objectGoldenShroom.Object, transform.position, Quaternion.identity, 0);
+          ___temp++;
+          return false;
+        }
+      }
+      return true;
+    }
+  }
+}

+ 82 - 0
MonsterNests/Patches/Patch_ObjectScript_Die.cs

@@ -0,0 +1,82 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System.Collections;
+using System.Threading;
+using System.Windows.Threading;
+using UnityEngine;
+
+namespace MonsterNests.Patches
+{
+
+  [HarmonyPatch(typeof(ObjectScript))]
+  [HarmonyPatch("Die")]
+  [HarmonyGadget("MonsterNests")]
+  public static class Patch_ObjectScript_Die
+  {
+    [HarmonyPostfix]
+    public static void Prefix(ObjectScript __instance, ref int ___id)
+    {
+      if (___id == Core.objectBugspotBig.GetID())
+      {
+        GameScript.cadetValue += 34;
+        if (Network.isServer)
+        {
+          __instance.StartCoroutine(SpawnWasps(__instance.transform.position.x, __instance.transform.position.y));
+        }
+      }
+      else if (___id == Core.objectSpiderEgg.GetID())
+      {
+        GameScript.cadetValue += 34;
+        __instance.StartCoroutine(Shake());
+        if (Network.isServer)
+        {
+          __instance.StartCoroutine(SpawnSpiders(__instance.transform.position.x, __instance.transform.position.y));
+        }
+      }
+      else if (___id == Core.objectGoldenShroom.GetID())
+      {
+        GameScript.cadetValue += 34;
+        __instance.StartCoroutine(Shake());
+        if (Network.isServer)
+        {
+          Network.Instantiate(Resources.Load("e/bully"), new Vector3(__instance.transform.position.x, __instance.transform.position.y + 1.1f, 0f), Quaternion.identity, 0);
+        }
+      }
+    }
+
+    private static IEnumerator Shake()
+    {
+      Camera.main.GetComponent<Animation>().Play("shake");
+      yield return new WaitForSeconds(3.5f);
+      Camera.main.GetComponent<Animation>().Stop();
+      Camera.main.transform.eulerAngles = new Vector3(0f, 0f, 0f);
+      yield break;
+    }
+
+    private static IEnumerator SpawnSpiders(float xBase, float yBase)
+    {
+      for (int i = 0; i < 10; i++)
+      {
+        int x = Random.Range(-40, 40);
+        int y = Random.Range(-40, 40);
+        Network.Instantiate(Resources.Load("e/rockspider"), new Vector3(xBase + x / 10f, yBase + 1.1f + y/10f, 0f), Quaternion.identity, 0);
+        yield return new WaitForSeconds(0.3f);
+      }
+      yield break;
+    }
+
+    private static IEnumerator SpawnWasps(float xBase, float yBase)
+    {
+      for (int i = 0; i < 10; i++)
+      {
+        int x = Random.Range(-15, 15);
+        int y = Random.Range(-15, 15);
+        Network.Instantiate(Resources.Load("e/wasp"), new Vector3(xBase + x / 10f, yBase + 1.1f + y / 10f, 0f), Quaternion.identity, 0);
+        yield return new WaitForSeconds(0.1f);
+      }
+      yield break;
+    }
+  }
+
+}

+ 10 - 0
MonsterNests/Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using static MonsterNests.MonsterNests;
+
+[assembly: AssemblyProduct("MonsterNests")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("ScrapYard")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("A Gadget mod for Roguelands, adding a space planet.")] //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
MonsterNests/Properties/launchSettings.json

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

+ 15 - 0
MonsterNests/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.

BIN
MoreLights/Assets/cGreenLamp.png


BIN
MoreLights/Assets/cOrangeLamp.png


BIN
MoreLights/Assets/cPurpleLamp.png


BIN
MoreLights/Assets/cWhiteLamp.png


BIN
MoreLights/Assets/cYellowLamp.png


BIN
MoreLights/Assets/iGreenLamp.png


BIN
MoreLights/Assets/iOrangeLamp.png


BIN
MoreLights/Assets/iPurpleLamp.png


Some files were not shown because too many files changed in this diff