diff --git a/BannerlordTweaks.csproj b/BannerlordTweaks.csproj index 27ab14e..6a83fe8 100644 --- a/BannerlordTweaks.csproj +++ b/BannerlordTweaks.csproj @@ -119,7 +119,6 @@ - diff --git a/BannerlordTweaks.props b/BannerlordTweaks.props index 1b9d5b0..f2bd0fa 100644 --- a/BannerlordTweaks.props +++ b/BannerlordTweaks.props @@ -3,16 +3,18 @@ - C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\ + E:\SteamLibrary\steamapps\common\Mount & Blade II Bannerlord\ $(MOUNT_AND_BLADE_DIR)Modules\zzBannerlordTweaks\ - C:\Users\Liam\source\repos\ModLib\bin\Debug\ModLib.dll + E:\SteamLibrary\steamapps\common\Mount & Blade II Bannerlord\Modules\ModLib\bin\Win64_Shipping_Client\ModLib.dll - C:\Users\Liam\source\repos\ModLib\ModLib.Definitions\bin\Debug\ModLib.Definitions.dll - + E:\SteamLibrary\steamapps\common\Mount & Blade II Bannerlord\Modules\ModLib\bin\Win64_Shipping_Client\ModLib.Definitions.dll + + + $(MOUNT_AND_BLADE_DIR)Modules\zzBannerlordTweaks\bin\Win64_Shipping_Client\ diff --git a/DismembermentMissionBehaviour.cs b/DismembermentMissionBehaviour.cs index 2126c75..16b432b 100644 --- a/DismembermentMissionBehaviour.cs +++ b/DismembermentMissionBehaviour.cs @@ -15,8 +15,7 @@ public override void OnRegisterBlow(Agent attacker, Agent victim, GameEntity rea if (attacker == null || victim == null) return; if (attacker == victim) return; - bool isPlayerAttacker; - if (IsValidAttacker(attacker, out isPlayerAttacker) && IsValidVictim(victim)) + if (IsValidAttacker(attacker, out bool isPlayerAttacker) && IsValidVictim(victim)) { var attackDir = attacker.AttackDirection; //Wanted to do arms as well, but currently not possible. Will have to wait until we can add custom meshes and skeletons @@ -116,7 +115,7 @@ private bool IsValidAttacker(Agent attacker, out bool isPlayerAttacker) return true; } //if (Settings.Instance.AICanDecapitate) - return true; + return true; //return false; } diff --git a/Patches/HideoutMissionControllerPatches.cs b/Patches/HideoutMissionControllerPatches.cs index e98fe97..3737afd 100644 --- a/Patches/HideoutMissionControllerPatches.cs +++ b/Patches/HideoutMissionControllerPatches.cs @@ -1,14 +1,9 @@ using HarmonyLib; -using SandBox; using SandBox.Source.Missions; -using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; using TaleWorlds.Core; using TaleWorlds.MountAndBlade; diff --git a/Patches/SmeltingVMPatches.cs b/Patches/SmeltingVMPatches.cs index 8989555..267359a 100644 --- a/Patches/SmeltingVMPatches.cs +++ b/Patches/SmeltingVMPatches.cs @@ -20,7 +20,9 @@ private static void Postfix(SmeltingVM __instance, ItemRoster ____playerItemRost // This appears to be how the game works out if an item is locked // From TaleWorlds.CampaignSystem.ViewModelCollection.SPInventoryVM.InitializeInventory() IEnumerable locks = Campaign.Current.GetCampaignBehavior().GetLocks(); - EquipmentElement[] locked_items = locks?.ToArray(); + // Updated line 24 to Line 25 which seems to be the updated way game works out item locks in v1.4.3 InitializeInventory() + // EquipmentElement[] locked_items = locks?.ToArray(); + EquipmentElement[] locked_items = (locks != null) ? locks.ToArray() : null; bool isLocked(EquipmentElement test_item) { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 36d9d89..c8e06cb 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/SubModule.cs b/SubModule.cs index b5d82b4..28461ab 100644 --- a/SubModule.cs +++ b/SubModule.cs @@ -1,6 +1,5 @@ using HarmonyLib; using ModLib; -using SandBox; using System; using System.Collections.Generic; using System.Linq; diff --git a/TweakedCharacterDevelopmentModel.cs b/TweakedCharacterDevelopmentModel.cs index 21723f1..f9616d4 100644 --- a/TweakedCharacterDevelopmentModel.cs +++ b/TweakedCharacterDevelopmentModel.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TaleWorlds.CampaignSystem.SandBox.GameComponents; +using TaleWorlds.CampaignSystem.SandBox.GameComponents; namespace BannerlordTweaks { diff --git a/TweakedCombatXpModel.cs b/TweakedCombatXpModel.cs index c351e20..2c54cf1 100644 --- a/TweakedCombatXpModel.cs +++ b/TweakedCombatXpModel.cs @@ -7,7 +7,8 @@ namespace BannerlordTweaks { public class TweakedCombatXpModel : DefaultCombatXpModel { - public override void GetXpFromHit(CharacterObject attackerTroop, CharacterObject attackedTroop, int damage, bool isFatal, MissionTypeEnum missionType, out int xpAmount) + // They added PartyBase in v1.4.3. Updated method to address build error. + public override void GetXpFromHit(CharacterObject attackerTroop, CharacterObject attackedTroop, PartyBase party, int damage, bool isFatal, MissionTypeEnum missionType, out int xpAmount) { if (attackerTroop == null || attackedTroop == null) { diff --git a/TweakedPregnancyModel.cs b/TweakedPregnancyModel.cs index 82f4590..1bf50f4 100644 --- a/TweakedPregnancyModel.cs +++ b/TweakedPregnancyModel.cs @@ -1,6 +1,6 @@ -using System; +using Helpers; +using System; using System.Linq; -using Helpers; using TaleWorlds.CampaignSystem; using TaleWorlds.CampaignSystem.SandBox.GameComponents; diff --git a/TweakedSettlementMilitiaModel.cs b/TweakedSettlementMilitiaModel.cs index c724194..47ace02 100644 --- a/TweakedSettlementMilitiaModel.cs +++ b/TweakedSettlementMilitiaModel.cs @@ -1,7 +1,6 @@ using TaleWorlds.CampaignSystem; using TaleWorlds.CampaignSystem.SandBox.GameComponents; using TaleWorlds.Localization; -using System.Linq; using System.Windows.Forms; using System; using ModLib;