Skip to content

Commit

Permalink
Code cleanup and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
guighub committed Apr 9, 2024
1 parent 1516c2e commit 4096c7c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
7 changes: 6 additions & 1 deletion CW_LongerFaces.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34622.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CW_LongerFaces", "CW_LongerFaces\CW_LongerFaces.csproj", "{8E438CDC-1DFD-4906-B64F-B7EAB1FAFDB2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CW_LongerFaces", "CW_LongerFaces\CW_LongerFaces.csproj", "{8E438CDC-1DFD-4906-B64F-B7EAB1FAFDB2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EEE6B1FB-3A5F-4722-A25F-30AD653CF8C1}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 6 additions & 0 deletions CW_LongerFaces/CW_LongerFaces.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<Authors>guiguig</Authors>
<Company>guiguig</Company>
<Description>Content Warning mod for longer faces and more</Description>
<Copyright>Jaiden Ougland</Copyright>
<PackageProjectUrl>https://github.com/guighub/CW_LongerFaces</PackageProjectUrl>
<RepositoryUrl>https://github.com/guighub/CW_LongerFaces</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions CW_LongerFaces/Class1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void Awake() // runs when Content Warning is launched
[HarmonyPatch("Awake")]
public static class PlayerCustomizer_Scale_Patcher // Makes text scaling range a lot broader
{
static float scaleAmount = 4f;
static float scaleAmount = 5f; // Amount to scale original values by
[HarmonyPostfix]
public static void Postfix(ref PlayerCustomizer __instance)
{
Expand All @@ -44,7 +44,7 @@ public static void Postfix(ref PlayerCustomizer __instance)
__instance.visorFaceSizeMinMax.x /= scaleAmount;
__instance.visorFaceSizeMinMax.y *= scaleAmount;

__instance.faceSizeStepCount = (int)scaleAmount * 10;
__instance.faceSizeStepCount = (int)(scaleAmount * 10);

ContentWarningMoreFacesMod.BepInExLogSource.LogMessage("faceSizeMinMax: " + __instance.faceSizeMinMax.ToString());
ContentWarningMoreFacesMod.BepInExLogSource.LogMessage("visorFaceSizeMinMax: " + __instance.visorFaceSizeMinMax.ToString());
Expand Down Expand Up @@ -72,7 +72,7 @@ public static void Postfix(ref TextMeshProUGUI ___faceText, ref PlayerCustomizer
[HarmonyPatch("SetFaceText")]
class PlayerCustomizer_SetFaceText_Patcher
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
var code = new List<CodeInstruction>(instructions);

Expand Down Expand Up @@ -116,7 +116,7 @@ static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> inst
[HarmonyPatch("RPCA_SetVisorText")]
class PlayerVisor_RPCA_SetVisorText_Patcher
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
var code = new List<CodeInstruction>(instructions);

Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# CW_LongerFaces
# CW_LongerFaces
A mod that removes the character limit from the game, increases the text scalability, and adds text pasting (Ctrl+V) to the game.

## Notes
Everything expect the text paste ability is client-side only, unless the other players also have the mod installed.

Holding backspace to delete your face text will spam a blank square character, this is normal and is a bug in the base game. I may patch it in the future, but it's not a priority at the moment.
## How to install
- [Install BepInEx first](https://docs.bepinex.dev/articles/user_guide/installation/index.html)
- Go to [the releases tab of this repository](https://github.com/guighub/CW_LongerFaces/releases/)
- Download the latest CW_LongerFaces.dll
- Move the file to "Content Warning/BepInEx/plugins/"
- Start the game!

0 comments on commit 4096c7c

Please sign in to comment.