Skip to content

Commit

Permalink
1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KlutzyBubbles committed Jan 8, 2024
1 parent a3249f3 commit f9e9aa7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions BetterEmote/BetterEmote.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net46</TargetFramework>
<AssemblyName>BetterEmotes</AssemblyName>
<Description>Alters the integration method of more emotes</Description>
<Version>1.3.1</Version>
<Version>1.3.3</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand All @@ -15,7 +15,7 @@
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
<PackageReference Include="Rune580.LethalCompany_InputUtils" Version="0.4.4" />
<PackageReference Include="LethalAPI.GameLibs" Version="45.*" />
<PackageReference Include="LethalAPI.GameLibs" Version="47.*" />
<PackageReference Include="UnityEngine.Modules" Version="2022.3.9" IncludeAssets="compile" />
</ItemGroup>

Expand Down
9 changes: 2 additions & 7 deletions BetterEmote/EmotePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,12 @@ private static void PerformEmotePrefix(ref InputAction.CallbackContext context,
[HarmonyPrefix]
private static bool prefixCheckConditions(ref bool __result, PlayerControllerB __instance)
{
bool result;
if (currentEmoteID == (int)Emote.Griddy && griddySpeed != 0)
{
__result = (!__instance.inSpecialInteractAnimation && !__instance.isPlayerDead && !__instance.isJumping && __instance.moveInputVector.x == 0f && !__instance.isSprinting && !__instance.isCrouching && !__instance.isClimbingLadder && !__instance.isGrabbingObjectAnimation && !__instance.inTerminalMenu && !__instance.isTypingChat);
result = false;
return false;
}
else
{
result = true;
}
return result;
return true;
}
}
}
10 changes: 5 additions & 5 deletions BetterEmote/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ private void ConfigFile()
if (EmoteDefs.getEmoteNumber(name) > 2)
{
ConfigEntry<string> keyConfig = Config.Bind("Emote Keys", $"{name} Key", $"<Keyboard>/{EmoteDefs.getEmoteNumber(name)}", $"Default keybind for {name} emote");
EmotePatch.defaultKeyList[EmoteDefs.getEmoteNumber(name)] = keyConfig.Value.ToLower().StartsWith("<keyboard>") ? keyConfig.Value : $"<Keyboard>/{keyConfig.Value}";
EmotePatch.defaultKeyList[EmoteDefs.getEmoteNumber(name)] = keyConfig.Value.Equals("") ? "" : (keyConfig.Value.ToLower().StartsWith("<keyboard>") ? keyConfig.Value : $"<Keyboard>/{keyConfig.Value}");
ConfigEntry<string> controllerConfig = Config.Bind("Emote Controller Bindings", $"{name} Button", "", $"Default controller binding for {name} emote");
EmotePatch.defaultControllerList[EmoteDefs.getEmoteNumber(name)] = controllerConfig.Value.Equals("") ? "" : (controllerConfig.Value.ToLower().StartsWith("<gamepad>") ? controllerConfig.Value : $"<Gamepad>/{controllerConfig.Value}");
}
ConfigEntry<bool> enabledConfig = Config.Bind("Enabled Emotes", $"Enable {name}", true, $"Toggle {name} emote key");
EmotePatch.enabledList[EmoteDefs.getEmoteNumber(name)] = enabledConfig.Value;
}
ConfigEntry<string> configEmoteKey = Config.Bind("Emote Keys", "Emote Wheel Key", "<Keyboard>/v", "Default keybind for the emote wheel");
EmotePatch.emoteWheelKey = configEmoteKey.Value.ToLower().StartsWith("<keyboard>") ? configEmoteKey.Value : $"<Keyboard>/{configEmoteKey.Value}";
EmotePatch.emoteWheelKey = configEmoteKey.Value.Equals("") ? "" : (configEmoteKey.Value.ToLower().StartsWith("<keyboard>") ? configEmoteKey.Value : $"<Keyboard>/{configEmoteKey.Value}");
ConfigEntry<string> configEmoteController = Config.Bind("Emote Controller Bindings", "Emote Wheel Button", "<Gamepad>/leftShoulder", "Default controller binding for the emote wheel");
EmotePatch.emoteWheelController = configEmoteController.Value.ToLower().StartsWith("<gamepad>") ? configEmoteController.Value : $"<Gamepad>/{configEmoteController.Value}";
EmotePatch.emoteWheelController = configEmoteController.Value.Equals("") ? "" : (configEmoteController.Value.ToLower().StartsWith("<gamepad>") ? configEmoteController.Value : $"<Gamepad>/{configEmoteController.Value}");
ConfigEntry<string> configEmoteControllerMove = Config.Bind("Emote Controller Bindings", "Emote Wheel Move", "<Gamepad>/rightStick", "Default controller binding for the emote wheel movement");
EmotePatch.emoteWheelControllerMove = configEmoteControllerMove.Value.ToLower().StartsWith("<gamepad>") ? configEmoteControllerMove.Value : $"<Gamepad>/{configEmoteControllerMove.Value}";
EmotePatch.emoteWheelControllerMove = configEmoteControllerMove.Value.Equals("") ? "" : (configEmoteControllerMove.Value.ToLower().StartsWith("<gamepad>") ? configEmoteControllerMove.Value : $"<Gamepad>/{configEmoteControllerMove.Value}");
ConfigEntry<float> configEmoteControllerDeadzone = Config.Bind("Emote Controller Bindings", "Emote Wheel Deadzone", 0.25f, "Default controller deadzone for emote selection");
SelectionWheel.controllerDeadzone = configEmoteControllerDeadzone.Value;
SelectionWheel.controllerDeadzone = configEmoteControllerDeadzone.Value < 0 ? 0 : configEmoteControllerDeadzone.Value;

ConfigEntry<float> configGriddySpeed = Config.Bind("Emote Settings", "Griddy Speed", 0.5f, "Speed of griddy relative to regular speed");
EmotePatch.griddySpeed = configGriddySpeed.Value < 0 ? 0 : configGriddySpeed.Value;
Expand Down
Binary file modified ModPackage/BetterEmotes.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion ModPackage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Issues (incompatiblities)

Players might find some inconsistant behaviour with TooManyEmotes. I have altered the code to allow compatiblity with TooManyEmotes but no promises.
Other emote mods may have inconsistancies and should be the first place to check if something isnt working. They just get updated too much for me to check them manually.

Any other issues feel free to [submit an issue](https://github.com/KlutzyBubbles/lc-better-emotes/issues/new) or contact me directly via the [Lethal Company Modding Discord](https://discord.gg/XeyYqRdRGC) or PM `@KlutzyBubbles` always trying to make sure the mod is as stable as possible.

Expand Down
4 changes: 2 additions & 2 deletions ModPackage/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "BetterEmotes",
"version_number": "1.3.2",
"version_number": "1.3.3",
"website_url": "https://github.com/KlutzyBubbles/lc-better-emotes",
"description": "[Controller Support] Alters the integration method of more emotes and adds some config options",
"description": "[v47] Alters the integration method of more emotes and adds some config options",
"dependencies": [
"BepInEx-BepInExPack-5.4.2100",
"Rune580-LethalCompany_InputUtils-0.4.4"
Expand Down

0 comments on commit f9e9aa7

Please sign in to comment.