-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8e0352
commit 777fe45
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net472</TargetFramework> | ||
<AssemblyName>LongerSigns</AssemblyName> | ||
<Version>1.0.0</Version> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<LangVersion>11</LangVersion> | ||
<RootNamespace>LongerSigns</RootNamespace> | ||
<BepInExPluginName>Longer Signs</BepInExPluginName> | ||
<BepInExPluginGuid>com.lee23.longersigns</BepInExPluginGuid> | ||
|
||
<RestoreAdditionalProjectSources> | ||
https://api.nuget.org/v3/index.json; | ||
https://nuget.bepinex.dev/v3/index.json; | ||
</RestoreAdditionalProjectSources> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" /> | ||
<PackageReference Include="BepInEx.Core" Version="5.4.21" /> | ||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.1.0" /> | ||
<PackageReference Include="UnityEngine.Modules" Version="2019.4.36" IncludeAssets="compile" /> | ||
<PackageReference Include="Subnautica.GameLibs" Version="71288.0.0-r.0" /> | ||
<PackageReference Include="PolySharp" Version="1.13.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.33424.131 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LongerSigns", "LongerSigns.csproj", "{F0CC6A68-5E91-4D90-B4A5-DC15DB9C13E8}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F0CC6A68-5E91-4D90-B4A5-DC15DB9C13E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F0CC6A68-5E91-4D90-B4A5-DC15DB9C13E8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F0CC6A68-5E91-4D90-B4A5-DC15DB9C13E8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F0CC6A68-5E91-4D90-B4A5-DC15DB9C13E8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {0B779FA9-01E7-4AD8-93C4-331A68DC9FEF} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using HarmonyLib; | ||
using UnityEngine.UI; | ||
|
||
namespace LongerSigns; | ||
|
||
public static class Patches | ||
{ | ||
[HarmonyPatch(typeof(uGUI_SignInput), nameof(uGUI_SignInput.Awake))] | ||
[HarmonyPostfix] | ||
public static void uGUI_SignInputAwakePostfix(uGUI_SignInput __instance) | ||
{ | ||
var inputField = __instance.GetComponentInChildren<uGUI_InputField>(); | ||
if (inputField == null) | ||
return; | ||
|
||
inputField.characterLimit = int.MaxValue; | ||
|
||
// inputField.lineLimit = int.MaxValue; | ||
// inputField.lineType = TMPro.TMP_InputField.LineType.MultiLineNewline; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using BepInEx; | ||
using BepInEx.Logging; | ||
using HarmonyLib; | ||
using System.Reflection; | ||
|
||
namespace LongerSigns; | ||
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] | ||
public class Plugin : BaseUnityPlugin | ||
{ | ||
public new static ManualLogSource Logger { get; private set; } | ||
|
||
private static Assembly Assembly { get; } = Assembly.GetExecutingAssembly(); | ||
|
||
private void Awake() | ||
{ | ||
// plugin startup logic | ||
Logger = base.Logger; | ||
|
||
// register harmony patches, if there are any | ||
Harmony.CreateAndPatchAll(Assembly, $"{PluginInfo.PLUGIN_GUID}"); | ||
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!"); | ||
} | ||
} |