Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CyclopsDockingMod/BaseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public BaseItem(string classID, string name, string desc, string icon) : this(Pr
}

[SetsRequiredMembers]
public BaseItem(string classID, string name, string desc, Atlas.Sprite icon) : this(PrefabInfo.WithTechType(classID, name, desc, unlockAtStart: true).WithFileName(DefaultResourcePath + classID).WithIcon(icon))
public BaseItem(string classID, string name, string desc, Sprite icon) : this(PrefabInfo.WithTechType(classID, name, desc, unlockAtStart: true).WithFileName(DefaultResourcePath + classID).WithIcon(icon))
{
}

Expand Down
62 changes: 33 additions & 29 deletions CyclopsDockingMod/CyclopsDockingMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<SubnauticaDir>C:\Program Files (x86)\Steam\steamapps\common\Subnautica</SubnauticaDir>
<Dependencies>$(SubnauticaDir)\Subnautica_Data\Managed</Dependencies>
<!-- Linux path for reference: /mnt/nvme_storage/SteamLibrary/steamapps/common/Subnautica -->
<Dependencies>$(SubnauticaDir)/Subnautica_Data/Managed</Dependencies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugNauti|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -42,7 +43,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<SubnauticaDir>C:\Program Files (x86)\Steam\steamapps\common\Subnautica</SubnauticaDir>
<Dependencies>$(SubnauticaDir)\Subnautica_Data\Managed</Dependencies>
<!-- Linux path for reference: /mnt/nvme_storage/SteamLibrary/steamapps/common/Subnautica -->
<Dependencies>$(SubnauticaDir)/Subnautica_Data/Managed</Dependencies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLegacy|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -53,7 +55,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<SubnauticaDir>C:\Program Files (x86)\Steam\steamapps\common\Subnautica</SubnauticaDir>
<Dependencies>$(SubnauticaDir)\Subnautica_Data\Managed</Dependencies>
<!-- Linux path for reference: /mnt/nvme_storage/SteamLibrary/steamapps/common/Subnautica -->
<Dependencies>$(SubnauticaDir)/Subnautica_Data/Managed</Dependencies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand All @@ -63,7 +66,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>2</WarningLevel>
<SubnauticaDir>C:\Program Files (x86)\Steam\steamapps\common\Subnautica</SubnauticaDir>
<Dependencies>$(SubnauticaDir)\Subnautica_Data\Managed</Dependencies>
<!-- Linux path for reference: /mnt/nvme_storage/SteamLibrary/steamapps/common/Subnautica -->
<Dependencies>$(SubnauticaDir)/Subnautica_Data/Managed</Dependencies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseNauti|AnyCPU'">
<DebugType>none</DebugType>
Expand All @@ -73,7 +77,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>2</WarningLevel>
<SubnauticaDir>C:\Program Files (x86)\Steam\steamapps\common\Subnautica</SubnauticaDir>
<Dependencies>$(SubnauticaDir)\Subnautica_Data\Managed</Dependencies>
<!-- Linux path for reference: /mnt/nvme_storage/SteamLibrary/steamapps/common/Subnautica -->
<Dependencies>$(SubnauticaDir)/Subnautica_Data/Managed</Dependencies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLegacy|AnyCPU'">
<DebugType>none</DebugType>
Expand All @@ -83,71 +88,72 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>2</WarningLevel>
<SubnauticaDir>C:\Program Files (x86)\Steam\steamapps\common\Subnautica</SubnauticaDir>
<Dependencies>$(SubnauticaDir)\Subnautica_Data\Managed</Dependencies>
<!-- Linux path for reference: /mnt/nvme_storage/SteamLibrary/steamapps/common/Subnautica -->
<Dependencies>$(SubnauticaDir)/Subnautica_Data/Managed</Dependencies>
</PropertyGroup>
<ItemGroup>
<Reference Include="BepInEx">
<HintPath>$(SubnauticaDir)\BepInEx\core\BepInEx.dll</HintPath>
<HintPath>$(SubnauticaDir)/BepInEx/core/BepInEx.dll</HintPath>
</Reference>
<Reference Include="0Harmony">
<HintPath>$(SubnauticaDir)\BepInEx\core\0Harmony.dll</HintPath>
<HintPath>$(SubnauticaDir)/BepInEx/core/0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(Dependencies)\publicized_assemblies\Assembly-CSharp_publicized.dll</HintPath>
<!--<HintPath>$(Dependencies)\Assembly-CSharp.dll</HintPath>-->
<!--<HintPath>$(Dependencies)\publicized_assemblies\Assembly-CSharp_publicized.dll</HintPath>-->
<HintPath>$(Dependencies)/Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>$(Dependencies)\publicized_assemblies\Assembly-CSharp-firstpass_publicized.dll</HintPath>
<!--<HintPath>$(Dependencies)\Assembly-CSharp-firstpass.dll</HintPath>-->
<!--<HintPath>$(Dependencies)\publicized_assemblies\Assembly-CSharp-firstpass_publicized.dll</HintPath>-->
<HintPath>$(Dependencies)/Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="SMLHelper" Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'DebugLegacy' or '$(Configuration)' == 'Release' or '$(Configuration)' == 'ReleaseLegacy'">
<HintPath>$(SubnauticaDir)\BepInEx\plugins\Modding Helper\SMLHelper.dll</HintPath>
<HintPath>$(SubnauticaDir)/BepInEx/plugins/Modding Helper/SMLHelper.dll</HintPath>
</Reference>
<Reference Include="Nautilus" Condition="'$(Configuration)' == 'DebugNauti' or '$(Configuration)' == 'ReleaseNauti'">
<HintPath>$(SubnauticaDir)\BepInEx\plugins\Nautilus\Nautilus.dll</HintPath>
<HintPath>$(SubnauticaDir)/BepInEx/plugins/Nautilus-1262-1-0-0-pre-34-1735432432/Nautilus/Nautilus.dll</HintPath>
</Reference>
<Reference Include="Unity.Addressables" Condition="'$(Configuration)' == 'DebugNauti' or '$(Configuration)' == 'ReleaseNauti'">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\Unity.Addressables.dll</HintPath>
<HintPath>$(Dependencies)/Unity.Addressables.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(Dependencies)\UnityEngine.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\UnityEngine.AnimationModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>$(Dependencies)\UnityEngine.AssetBundleModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(Dependencies)\UnityEngine.CoreModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>$(Dependencies)\UnityEngine.InputLegacyModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(Dependencies)\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\UnityEngine.TextRenderingModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\Unity.TextMeshPro.dll</HintPath>
<HintPath>$(Dependencies)/Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\UnityEngine.UI.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="Unity.ResourceManager">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\Unity.ResourceManager.dll</HintPath>
<HintPath>$(Dependencies)/Unity.ResourceManager.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(Dependencies)\UnityEngine.IMGUIModule.dll</HintPath>
<HintPath>$(Dependencies)/UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -191,14 +197,12 @@
<Compile Include="IBaseItem.cs" />
<Compile Include="JsonWriter.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Polyfills.cs" />
<Compile Include="Routing\AutoPilot.cs" />
<Compile Include="Routing\MyInputField.cs" />
<Compile Include="Routing\Route.cs" />
<Compile Include="Routing\SubRoutePlaying.cs" />
<Compile Include="StylesHelper.cs" />
<Compile Include="UI\CyclopsDockingModUI.cs" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /Y /I &quot;$(TargetPath)&quot; &quot;C:\Program Files (x86)\Steam\steamapps\common\Subnautica\BepInEx\plugins\CyclopsDockingMod\&quot;" />
</Target>
</Project>
11 changes: 9 additions & 2 deletions CyclopsDockingMod/CyclopsHatchConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using SMLHelper.V2.Crafting;
using SMLHelper.V2.Handlers;
#endif
using Ingredient = CraftData.Ingredient;
// using Ingredient = CraftData.Ingredient;
using UnityEngine;

namespace CyclopsDockingMod
Expand Down Expand Up @@ -69,13 +69,20 @@ public CyclopsHatchConnector()
this.IsHabitatBuilder = true;
#if SUBNAUTICA_NAUTI
base.Recipe = new RecipeData
{
craftAmount = 1
};
foreach (var ingredient in this.SortIngredients())
{
base.Recipe.Ingredients.Add(ingredient);
}
#else
base.Recipe = new TechData
#endif
{
craftAmount = 1,
Ingredients = this.SortIngredients()
};
#endif
}

private List<Ingredient> SortIngredients()
Expand Down
18 changes: 9 additions & 9 deletions CyclopsDockingMod/Fixers/BuilderFixer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ public static bool CreateGhost_Prefix(ref bool __result)
for (int i = 0; i < componentsInChildren.Length; i++)
UnityEngine.Object.Destroy(componentsInChildren[i]);
BuilderFixer._renderers.SetValue(null, MaterialExtensions.AssignMaterial((GameObject)BuilderFixer._ghostModel.GetValue(null), (Material)BuilderFixer._ghostStructureMaterial.GetValue(null), true));
string poweredPrefabName = CraftData.GetPoweredPrefabName((TechType)BuilderFixer._constructableTechType.GetValue(null));
if (!string.IsNullOrEmpty(poweredPrefabName))
{
CoroutineHost.StartCoroutine((IEnumerator)BuilderFixer._CreatePowerPreviewAsync.Invoke(null, new object[]
{
(GameObject)BuilderFixer._ghostModel.GetValue(null),
poweredPrefabName
}));
}
// string poweredPrefabName = CraftData.GetPoweredPrefabName((TechType)BuilderFixer._constructableTechType.GetValue(null));
// if (!string.IsNullOrEmpty(poweredPrefabName))
// {
// CoroutineHost.StartCoroutine((IEnumerator)BuilderFixer._CreatePowerPreviewAsync.Invoke(null, new object[]
// {
// (GameObject)BuilderFixer._ghostModel.GetValue(null),
// poweredPrefabName
// }));
// }
BuilderFixer._InitBounds.Invoke(null, new object[] { (GameObject)BuilderFixer._prefab.GetValue(null) });
}
__result = true;
Expand Down
4 changes: 1 addition & 3 deletions CyclopsDockingMod/Fixers/MySignFixerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*
using UnityEngine;

namespace CyclopsDockingMod.Fixers
Expand All @@ -21,5 +20,4 @@ public void Awake()
base.Invoke("MyRestoreSignState", 1f);
}
}
}
*/
}
28 changes: 28 additions & 0 deletions CyclopsDockingMod/Polyfills.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace System.Runtime.CompilerServices
{
internal static class IsExternalInit { }

[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
public sealed class CompilerFeatureRequiredAttribute : Attribute
{
public CompilerFeatureRequiredAttribute(string featureName)
{
FeatureName = featureName;
}

public string FeatureName { get; }
public bool IsOptional { get; set; }

public const string RefStructs = "RefStructs";
public const string RequiredMembers = "RequiredMembers";
}

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class RequiredMemberAttribute : Attribute { }
}

namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
public sealed class SetsRequiredMembersAttribute : Attribute { }
}
4 changes: 3 additions & 1 deletion CyclopsDockingMod/Routing/AutoPilot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ internal static void ResetHudTooltips(Transform cyclopsHud)
if (allEngineChangeState != null && allEngineChangeState.Length > 0)
foreach (var engineChangeState in allEngineChangeState)
if (engineChangeState != null)
engineChangeState.mouseHover = false;
{
// engineChangeState.mouseHover = false;
}
}

internal static void StopPlayingRoute(string pid, Transform cyclopsHud = null, bool reachedEnd = true, bool endsOnNothing = false)
Expand Down