Skip to content

Commit

Permalink
feat: Add The Bog Witch support
Browse files Browse the repository at this point in the history
Update assemblies, including adding publicized ones
  • Loading branch information
afilbert committed Dec 23, 2024
1 parent f24de8c commit 45b589f
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 7 deletions.
Binary file modified Libs/Unity.InputSystem.dll
Binary file not shown.
Binary file modified Libs/UnityEngine.CoreModule.dll
Binary file not shown.
Binary file modified Libs/UnityEngine.UI.dll
Binary file not shown.
Binary file modified Libs/UnityEngine.dll
Binary file not shown.
Binary file modified Libs/assembly_guiutils.dll
Binary file not shown.
Binary file modified Libs/assembly_utils.dll
Binary file not shown.
Binary file modified Libs/assembly_valheim.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Have you ever played so much Valheim that you injured yourself? Well, I did. Whe
* This can happen if forward key/button is held, overriding other stamina safeguards
* Weapons will auto-reequip on exiting swim state if stowed while swimming
* Auto-jump can optionally function as a toggle
* Auto-primary-attack can optionally function as a toggle
* Fully configurable

## QOL Detail
Expand Down Expand Up @@ -82,6 +83,7 @@ Configuration allows:
* **SprintToggleAlternateKey**, Used in conjunction with SprintToggleAlternate. This is the key used to toggle sprint on/off, default: T
* **SprintTogglePersistsOnHalt**, Sprint stays toggled even after character halts, default: false
* **AutoJumpToggle**, Enables character jump input to function as a toggle with stamina safeguards, default: false
* **AutoPrimaryAttackToggle**, Enables character primary attack input to function as a toggle with stamina safeguards, default: false
* **AutorunToggle**, Fixes auto-run to follow look, default: true
* **AutorunFreelookKey**, Overrides look direction in auto-run while pressed, default: CapsLock
* **AutorunStrafe**, Enable strafing while in auto-run/crouch, default: true
Expand Down Expand Up @@ -112,6 +114,7 @@ Built with [BepInEx](https://valheim.thunderstore.io/package/denikson/BepInExPac

Releases in github repo are packaged for Thunderstore Mod Manager.

* 1.4.0 Support The Bog Witch update. Add auto-attack feature. Optimize the main loop to prevent toggle lock in certain scenarios
* 1.3.0 Add auto-jump feature and many improvements and tweaks
* Add label to vanilla Auto-run setting in both Gameplay and Accessibility menus that concisely describes the hover text
* Add config that allows character movement to continue even after Esc key is pressed
Expand Down
8 changes: 4 additions & 4 deletions ToggleMovementMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private static void Prefix(ref Player __instance, ref Vector3 movedir, ref bool
{
run = ZInput.GetButton("Run") || ZInput.GetButton("JoyRun");

if (SprintToggleAlternate.Value)
if (SprintToggleAlternate.Value && !run)
{
run = ZInput.GetButtonUp("Sprint");
}
Expand Down Expand Up @@ -329,7 +329,7 @@ private static void Postfix(ZInput __instance, Dictionary<string, ZInput.ButtonD
_inputInstance = __instance;
_buttonsDict = ___m_buttons;
Key key = (Key)Enum.Parse(typeof(Key), "Escape");
_inputInstance.AddButton("Esc", key);
_inputInstance.AddButton("Esc", ZInput.KeyToPath(key));
_plugin.UpdateBindings();
}
}
Expand Down Expand Up @@ -393,9 +393,9 @@ private bool UpdateBindings()
try
{
Key key = (Key)Enum.Parse(typeof(Key), AutorunFreelookKey.Value);
_inputInstance.AddButton(freeLookKey, key);
_inputInstance.AddButton(freeLookKey, ZInput.KeyToPath(key));
key = (Key)Enum.Parse(typeof(Key), SprintToggleAlternateKey.Value);
_inputInstance.AddButton(sprintKey, key);
_inputInstance.AddButton(sprintKey, ZInput.KeyToPath(key));
logger.LogInfo($"Bindings - Free look: {AutorunFreelookKey.Value}. Toggle alternate: {SprintToggleAlternateKey.Value}");

return true;
Expand Down
6 changes: 3 additions & 3 deletions ToggleMovementMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
Expand All @@ -38,9 +39,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>Libs\assembly_guiutils.dll</HintPath>
</Reference>
<Reference Include="assembly_utils, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Libs\assembly_utils.dll</HintPath>
<Reference Include="assembly_utils_publicized">
<HintPath>Libs\publicized_assemblies\assembly_utils_publicized.dll</HintPath>
</Reference>
<Reference Include="assembly_valheim, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down

0 comments on commit 45b589f

Please sign in to comment.