Skip to content

Commit

Permalink
Release v2.11 - Stable
Browse files Browse the repository at this point in the history
  • Loading branch information
welles authored Oct 25, 2022
2 parents 6a0575f + d826ea9 commit d046dd4
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 116 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-depots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
Write-Host "::set-output name=mod_version::$ModVersion"
Write-Host "ModVersion: ""$ModVersion"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$GameVersion = Get-Content .\Directory.Build.props | Select-String -Pattern "<GameVersion>(e[\d.]+)<\/GameVersion>" | % { $($_.Matches.Groups[1]).Value }
$GameVersion = Get-Content .\Directory.Build.props | Select-String -Pattern "<GameVersion>(v[\d.]+)<\/GameVersion>" | % { $($_.Matches.Groups[1]).Value }
Write-Host "::set-output name=game_version::$GameVersion"
Write-Host "GameVersion: ""$GameVersion"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Download Game Binaries
run: >-
foreach ($depot in @(261551, 261552)) {
dotnet depotdownloader/DepotDownloader.dll -app 261550 -depot $depot -beta ${{steps.versions.outputs.game_version}} -username ${{secrets.STEAM_USERNAME}} -password ${{secrets.STEAM_PASSWORD}} -os windows -osarch 64 -filelist ./.github/resources/depotdownloader.txt -dir bannerlord;
dotnet depotdownloader/DepotDownloader.dll -app 261550 -depot $depot -beta public -username ${{secrets.STEAM_USERNAME}} -password ${{secrets.STEAM_PASSWORD}} -os windows -osarch 64 -filelist ./.github/resources/depotdownloader.txt -dir bannerlord;
}
shell: pwsh

Expand Down
105 changes: 0 additions & 105 deletions .github/workflows/build.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<Version>2.10.5.0</Version>
<GameVersion>e1.8.1</GameVersion>
<Version>2.11.0.0</Version>
<GameVersion>v1.0.0</GameVersion>
<GameBranch>Stable</GameBranch>
<HarmonyVersion>2.2.2</HarmonyVersion>
<MCMVersion>4.7.7</MCMVersion>
<MCMVersion>4.7.11</MCMVersion>
<TargetFramework>net472</TargetFramework>
<LangVersion>8.0</LangVersion>
<GameFolder>C:\SteamCMD\apps\mb2b_stable</GameFolder>
Expand Down
5 changes: 5 additions & 0 deletions Extensions/SettlementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ public static bool IsPlayerVillage(this Village village)
{
return village?.Owner?.Owner?.IsHumanPlayerCharacter ?? false;
}

public static bool IsPlayerSettlement(this Settlement settlement)
{
return settlement?.Owner?.IsHumanPlayerCharacter ?? false;
}
}
}
6 changes: 6 additions & 0 deletions L10N.resx
Original file line number Diff line number Diff line change
Expand Up @@ -901,4 +901,10 @@ Thank you!</value>
<data name="ModExceptionTitle" xml:space="preserve">
<value>Bannerlord Cheats encountered an error!</value>
</data>
<data name="SettlementsNeverRebel_Name" xml:space="preserve">
<value>Settlements Never Rebel</value>
</data>
<data name="SettlementsNeverRebel_Desc" xml:space="preserve">
<value>If enabled, player owned settlements will never start a rebellion.</value>
</data>
</root>
2 changes: 1 addition & 1 deletion Launch.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Launch" type="RunExe" factoryName=".NET Executable">
<option name="EXE_PATH" value="$PROJECT_DIR$/../../../../SteamCMD/apps/mb2b_stable/bin/Win64_Shipping_Client/Bannerlord.exe" />
<option name="PROGRAM_PARAMETERS" value="/singleplayer _MODULES_*Bannerlord.Harmony*Bannerlord.ButterLib*Bannerlord.UIExtenderEx*Bannerlord.MBOptionScreen*Native*SandBoxCore*CustomBattle*SandBox*StoryMode*Cheats*_MODULES_" />
<option name="PROGRAM_PARAMETERS" value="/singleplayer _MODULES_*Bannerlord.Harmony*Bannerlord.ButterLib*Bannerlord.UIExtenderEx*Bannerlord.MBOptionScreen*Native*SandBoxCore*BirthAndDeath*Sandbox*CustomBattle*StoryMode*Cheats*_MODULES_" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/../../../../SteamCMD/apps/mb2b_stable/bin/Win64_Shipping_Client" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
Expand Down
9 changes: 6 additions & 3 deletions Patches/Combat/InstantCrossbowReload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
using BannerlordCheats.Extensions;
using BannerlordCheats.Settings;
using HarmonyLib;
using JetBrains.Annotations;
using SandBox.GameComponents;
using TaleWorlds.Core;
using TaleWorlds.MountAndBlade;

namespace BannerlordCheats.Patches.Combat
{
[HarmonyPatch(typeof(SandboxAgentStatCalculateModel), "GetPerkEffectsOnAgent")]
[HarmonyPatch(typeof(SandboxAgentStatCalculateModel), nameof(SandboxAgentStatCalculateModel.UpdateAgentStats))]
public static class InstantCrossbowReload
{
[UsedImplicitly]
[HarmonyPrefix]
public static void GetPerkEffectsOnAgent(ref Agent agent, ref AgentDrivenProperties agentDrivenProperties, ref WeaponComponentData rightHandEquippedItem)
public static void UpdateAgentStats(
ref Agent agent,
ref AgentDrivenProperties agentDrivenProperties)
{
try
{
Expand Down
7 changes: 5 additions & 2 deletions Patches/Inventory/NativeItemSpawning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

namespace BannerlordCheats.Patches.Inventory
{
[HarmonyPatch(typeof(InventoryLogic), nameof(InventoryLogic.Initialize), typeof(ItemRoster), typeof(MobileParty), typeof(bool), typeof(bool), typeof(CharacterObject), typeof(InventoryManager.InventoryCategoryType), typeof(IMarketData), typeof(bool), typeof(TextObject))]
[HarmonyPatch(typeof(InventoryLogic), nameof(InventoryLogic.Initialize), typeof(ItemRoster), typeof(MobileParty),
typeof(bool), typeof(bool), typeof(CharacterObject), typeof(InventoryManager.InventoryCategoryType),
typeof(IMarketData), typeof(bool), typeof(TextObject), typeof(TroopRoster))]
public static class NativeItemSpawning
{
[UsedImplicitly]
Expand All @@ -27,7 +29,8 @@ public static void Initialize(
ref InventoryManager.InventoryCategoryType merchantItemType,
ref IMarketData marketData,
ref bool useBasePrices,
ref TextObject leftRosterName)
ref TextObject leftRosterName,
ref TroopRoster leftMemberRoster)
{
try
{
Expand Down
2 changes: 2 additions & 0 deletions Patches/Party/NoPrisonerEscape.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using BannerlordCheats.Settings;
using HarmonyLib;
using JetBrains.Annotations;
using TaleWorlds.CampaignSystem;
using TaleWorlds.CampaignSystem.Actions;

Expand All @@ -9,6 +10,7 @@ namespace BannerlordCheats.Patches.Party
[HarmonyPatch(typeof(EndCaptivityAction), nameof(EndCaptivityAction.ApplyByEscape))]
public static class NoPrisonerEscape
{
[UsedImplicitly]
[HarmonyPrefix]
public static bool ApplyByEscape(Hero character, Hero facilitator)
{
Expand Down
26 changes: 26 additions & 0 deletions Patches/Settlements/RebellionChancePercentage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using BannerlordCheats.Extensions;
using BannerlordCheats.Settings;
using HarmonyLib;
using JetBrains.Annotations;
using TaleWorlds.CampaignSystem.CampaignBehaviors;
using TaleWorlds.CampaignSystem.Settlements;

namespace BannerlordCheats.Patches.Settlements
{
[HarmonyPatch(typeof(RebellionsCampaignBehavior), "CheckRebellionEvent")]
public static class RebellionChancePercentage
{
[UsedImplicitly]
[HarmonyPostfix]
public static void CheckRebellionEvent(
ref Settlement settlement,
ref bool __result)
{
if (settlement.IsPlayerSettlement()
&& BannerlordCheatsSettings.Instance?.SettlementsNeverRebel == true)
{
__result = false;
}
}
}
}
4 changes: 4 additions & 0 deletions Settings/BannerlordCheatsSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ public BannerlordCheatsSettings()
[LocalizedSettingPropertyBool(nameof(NoBribeToEnterKeep))]
public bool NoBribeToEnterKeep { get; set; } = false;

[LocalizedSettingPropertyGroup(SettlementsGroupName)]
[LocalizedSettingPropertyBool(nameof(SettlementsNeverRebel))]
public bool SettlementsNeverRebel { get; set; } = false;

#endregion Settlements

#region Smithing
Expand Down

0 comments on commit d046dd4

Please sign in to comment.