Skip to content

Commit

Permalink
Merge pull request #97 from BUTR/dev
Browse files Browse the repository at this point in the history
v1.4.12
  • Loading branch information
Aragas committed Feb 4, 2024
2 parents d54543a + 4e32b09 commit a3799da
Show file tree
Hide file tree
Showing 11 changed files with 265 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ jobs:
shell: pwsh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bannerlord
name: bannerlord-${{matrix.project}}-${{matrix.configuration}}
path: ./bannerlord/

###########################
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Module artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: bannerlord
path: ./artifact
Expand Down
4 changes: 2 additions & 2 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!--Development Variables-->
<PropertyGroup>
<Version>1.4.11</Version>
<Version>1.4.12</Version>
<HarmonyVersion>2.2.2</HarmonyVersion>
<BUTRSharedVersion>3.0.0.137</BUTRSharedVersion>
<BUTRModuleManagerVersion>5.0.209</BUTRModuleManagerVersion>
Expand Down Expand Up @@ -50,7 +50,7 @@
</PropertyGroup>
<!--SorceLink-->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
<!--CI Builds-->
<ItemGroup Condition="$(TargetFramework) == 'net472' AND $(OS) != 'Windows_NT'">
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 1.4.12
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.9
* Adapted to v1.2.9. Thanks to jzebedee!
* Added Ukrainian and Japanese localization
---------------------------------------------------------------------------------------------------
Version: 1.4.11
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.5
* Localizations are now shown in LauncherEx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal static void Action()
private static Assembly? ResolveLauncherExAssemblies(AssemblyName assemblyName)
{
var name = assemblyName.Name;

var @namespace = "Bannerlord.BLSE.Loaders.LauncherEx.";
var resources = typeof(ModuleInitializer).Assembly.GetManifestResourceNames().Select(x => x.Remove(0, @namespace.Length));
var toLoad = resources.FirstOrDefault(x => x.StartsWith(name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static string GetRecursiveException(Exception ex) => new StringBuilder()
fs.SetLength(0);
using var writer = new StreamWriter(fs);
writer.Write($@"BLSE Exception:
Version: {typeof(Program).Assembly.GetName().Version}
Version: {typeof(LauncherExceptionHandler).Assembly.GetName().Version}
{GetRecursiveException(exception)}");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Bannerlord.LauncherEx
{
internal partial class BUTRLauncherManagerHandler
partial class BUTRLauncherManagerHandler
{
public override SaveMetadata[] GetSaveFiles() => MBSaveLoad.GetSaveFiles().Where(x => x.MetaData is not null).Select(x =>
{
Expand Down
7 changes: 2 additions & 5 deletions src/Bannerlord.LauncherEx/BUTRLauncherManagerHandler.Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Bannerlord.LauncherEx
{
internal partial class BUTRLauncherManagerHandler
partial class BUTRLauncherManagerHandler
{
public void SetGameParametersLoadOrder(IEnumerable<IModuleViewModel> modules) => SaveLoadOrder(GetFromViewModel(modules));

Expand All @@ -23,10 +23,7 @@ internal partial class BUTRLauncherManagerHandler
public Task<bool> ShowWarning(string title, string contentPrimary, string contentSecondary)
{
var tcs = new TaskCompletionSource<bool>();
base.ShowWarning(title, contentPrimary, contentSecondary, result =>
{
tcs.SetResult(result);
});
base.ShowWarning(title, contentPrimary, contentSecondary, tcs.SetResult);
return tcs.Task;
}

Expand Down
7 changes: 3 additions & 4 deletions src/Bannerlord.LauncherEx/Helpers/ConfigReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ namespace Bannerlord.LauncherEx.Helpers
{
internal static class ConfigReader
{
private static readonly string BOMMarkUtf8 =
Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble());
private static readonly string BOMMarkUtf8 = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble());

public static readonly string GameConfigPath =
Path.Combine($@"{Environment.GetFolderPath(Environment.SpecialFolder.Personal)}", "Mount and Blade II Bannerlord", "Configs", "BannerlordConfig.txt");
Expand All @@ -25,7 +24,7 @@ internal static class ConfigReader
var content = Encoding.UTF8.GetString(data);
if (content.StartsWith(BOMMarkUtf8, StringComparison.Ordinal))
content = content.Remove(0, BOMMarkUtf8.Length);

foreach (var keyValue in content.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries))
{
var split = keyValue.Split(new[] { "=" }, StringSplitOptions.RemoveEmptyEntries);
Expand All @@ -47,7 +46,7 @@ internal static class ConfigReader
var content = Encoding.UTF8.GetString(data);
if (content.StartsWith(BOMMarkUtf8, StringComparison.Ordinal))
content = content.Remove(0, BOMMarkUtf8.Length);

foreach (var keyValue in content.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries))
{
var split = keyValue.Split(new[] { "=" }, StringSplitOptions.RemoveEmptyEntries);
Expand Down
3 changes: 1 addition & 2 deletions src/Bannerlord.LauncherEx/Helpers/ModuleChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using System.Linq;

using TaleWorlds.Library;
using TaleWorlds.MountAndBlade;

namespace Bannerlord.LauncherEx.Helpers
{
Expand All @@ -28,7 +27,7 @@ internal static class ModuleChecker
public static bool IsObfuscated(ModuleInfoExtendedWithPath moduleInfoExtended)
{
static bool CanBeLoaded(SubModuleInfoExtended x) =>
ModuleInfoHelper.CheckIfSubModuleCanBeLoaded(x, ApplicationPlatform.CurrentPlatform, ApplicationPlatform.CurrentRuntimeLibrary, DedicatedServerType.None, false);
ModuleInfoHelper.CheckIfSubModuleCanBeLoaded(x, ApplicationPlatform.CurrentPlatform, ApplicationPlatform.CurrentRuntimeLibrary, TaleWorlds.MountAndBlade.DedicatedServerType.None, false);

foreach (var subModule in moduleInfoExtended.SubModules.Where(CanBeLoaded))
{
Expand Down
123 changes: 123 additions & 0 deletions src/Bannerlord.LauncherEx/Resources/Localization/JP/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<LanguageData id="日本語" name="日本語" subtitle_extension="jp" supported_iso="ja,jpn,ja-ja,ja-jp,jp-jp" under_development="false">
<strings>
<!-- BUTRLauncherModuleVM -->
<string id="kfMQEOFS" text="このモジュールはModulesフォルダとスチームワークショップの両方にインストールされています。{NL}Modulesフォルダにある方が使用されます。"/>
<string id="aAYdk1zd" text="DLLファイルが難読化されています。{NL}このコードが安全かどうか保証できません。{NL}難読化されたスクリプトを実行したことで生じうる結果について、BUTRチームからの警告です。"/>

<!-- BUTRLauncherOptionsVM -->
<string id="z9WqFewN" text="無効です!"/>
<string id="44qrhQ6g" text="再起動が必要です。"/>

<string id="zHo3tzQT" text="開始時にファイルのブロックを解除する"/>
<string id="sOInYH9V" text="起動時にDLLファイルのブロック解除を自動で実行します"/>
<string id="LXlsSS8t" text="ありがちな不具合を修正する"/>
<string id="J9VbkLW4" text="0Hamrmony.dllがbinフォルダに置いてある、といったよくあるミスを修正します。"/>
<string id="vUAqDj9H" text="モジュール一覧を小さく表示する"/>
<string id="Qn1aPNQM" text="再起動後に適用されます。Modタブの内容を小さく表示します。"/>
<string id="GUWbD65T" text="バイナリの互換性確認をしない"/>
<string id="lmpQeQBS" text="modに対してランチャー内蔵のバイナリ互換性確認機能を実行しません"/>
<string id="iD27wEq7" text="ランダム画像を表示しない"/>
<string id="LaPvZjwC" text="ランチャーに騎兵の画像を表示させません。画面が小さくまとまります。"/>
<string id="JT7QnJJA" text="ファイルのブロックを解除する"/>
<string id="VMIp4503" text="Modulesフォルダ内の全てのDLLファイルをブロックを解除します。"/>
<string id="RDLKkiVk" text="ブロック解除"/>
<string id="QJSBiZdJ" text="ソート(ベータ版)"/>
<string id="HVhaqeb4" text="v1.12x以降の新しいソートアルゴリズムを使用します。古いアルゴリズムは無効になります。"/>
<string id="1zt99vTt" text="ビッグモード"/>
<string id="XUSDSpvf" text="ランチャーの高さを少し大きくします。"/>
<string id="IsR2rbnG" text="ゲームオプションのバックアップを復元する"/>
<string id="uKUsA3Sp" text="LauncherFXは常に最初のセーブ前にバックアップを作成するため、この操作で元のファイルを復元します。"/>
<string id="TLDgPay9" text="復元する"/>
<string id="5XzSM7RN" text="エンジンオプションのバックアップから復元する"/>
<string id="JusnHy6S" text="UIのぼやけをなくすためにウィンドウズのDPIスケーリングを有効にします。"/>

<!-- BUTRLauncherSavesVM -->
<string id="JtelOsIW" text="Mod名"/>
<string id="14WBFIS1" text="バージョン"/>
<string id="OJsGrGVi" text="キャラクター"/>
<string id="JxpEEQdF" text="レベル"/>
<string id="qkkTPycE" text="経過日数"/>
<string id="aYWWDkKX" text="作成日"/>

<!-- LauncherConfirmStartVMMixin -->
<string id="DzJmcvsP" text="キャンセル"/>
<string id="epTxGUqT" text="確認"/>

<!-- LauncherModsVMMixin -->
<string id="pZVVdI5d" text="ロード順がデフォルトのアルゴリズムによって戻されました。{NL}原因:{NL}{REASONS}"/>
<string id="sP1a61KE" text="モジュールの位置の変更に失敗しました。できるだけ近くの場所に配置し直されました。{NL}原因:{NL}{REASONS}"/>
<string id="sLf3eIpH" text="モジュール一覧の並び替えに失敗しました。"/>

<!-- LauncherVMMixin -->
<string id="yS5hbWCL" text="オプション"/>
<string id="V66qoU6n" text="ランチャー"/>
<string id="ro4RMgyt" text="ゲーム"/>
<string id="q4rQuTgG" text="エンジン"/>
<string id="d5OjKcGE" text="セーブデータ"/>
<string id="Aws9irMU" text="読み込み順を読み込む"/>
<string id="4wKr76gx" text="セーブデータのロード順を読み込みます"/>
<string id="XdZGqnFW" text="現在の読み込み順をエクスポートする"/>
<string id="G55IdM6M" text="セーブデータのロード順をエクスポートします。"/>
<string id="MlYQ0uX7" text="不安定な挙動が発生する可能性があります。"/>
<string id="qvzptzrE" text="セーブデータの読み込みを続けますか?"/>
<string id="dDprK7Mz" text="警告"/>

<string id="Hk7FBBSa" text="シングルプレイヤー"/>
<string id="UOGhdUWE" text="マルチプレイヤー"/>
<string id="VDTcZpPr" text="Digital Companion"/>
<string id="Tg0If68v" text="ニュース"/>
<string id="YGU9eXM0" text="Mod"/>
<string id="xYv4iv7C" text="プレイ"/>
<string id="6B3iZLqR" text="再開"/>
<string id="eUt6GKkQ" text="起動"/>

<!-- LauncherVMMixin -->
<string id="WJnTxf3v" text="インポートがキャンセルされました!"/>
<string id="BjtJ4Lxw" text="キャンセルされたエクスポート"/>
<string id="eohqbvHU" text="リストの読み込みに成功しました。"/>
<string id="VwFQTk5z" text="リストのエクスポートに成功しました。"/>

<!-- Issues -->
<string id="kxqLbSqe" text="(不明なID)"/>

<string id="izSm5f85" text="モジュールIDの重複:{NL}{MODULEIDS}"/>
<string id="vCwH9226" text="モジュール名の重複:{NL}{MODULENAMES}"/>
<string id="GtDRbC3m" text="不足モジュール:{NL}{MODULES}"/>
<string id="BuMom4Jt" text="モジュールのバージョンの不一致:{NL}{MODULEVERSIONS}"/>

<string id="nYVWoomO" text="{MODULEID}、{REQUIREDVERSION}が要求されていますが、インストールされているのは {ACTUALVERSION}です。"/>
<string id="sd6M4KRd" text="ロード順:{NL}{LOADORDER}"/>
<string id="HvvA78sZ" text="ロード順の問題:{NL}{LOADORDERISSUES}"/>

<string id="B64DbmWp" text="保存ファイルが見つかりません。"/>
<string id="epU06HID" text="セーブファイルの読み込みに失敗しました。"/>

<string id="DKRNkst2" text="ロード順でファイルを開く"/>
<string id="XSxlKweM" text="バナーロードのモジュール一覧をファイルに保存する"/>

<string id="hgew15HH" text="インポートを続行しますか?"/>

<string id="tqjPGPtP" text="LauncherExはゲームのルートbinフォルダ内に0Harmony.dllを検出しました。{NL}このままでは不具合の可能性があります。削除しますか?"/>

<string id="J3Uh6MV4" text="モジュールリストに {ID} {VERSION} が不足しています"/>
<string id="3eQSr6wt" text="{ID} {VERSION} が不足しています"/>
<string id="U858vdQX" text="「{ID}」の依存モジュールが不足しています!"/>
<string id="1LS8Z5DU" text="「{ID}」の問題を解決できません!"/>
<string id="Vjz9HQ41" text="「{ID}」のバージョンが異なります &lt;= {VERSION}"/>
<string id="ZvnlL7VE" text="「{ID}」のバージョンが異なります &lt; [{VERSION}]"/>
<string id="EfNuH2bG" text="「{ID}」のバージョンが異なります &gt;= {VERSION}"/>
<string id="zXDidmpQ" text="「{ID}」はこのモジュールと互換性がありません"/>
<string id="4KFwqKgG" text="モジュール「{ID}」に対して依存関係と非互換性の両方の登録があります。"/>
<string id="9DRB6yXv" text="モジュール「{ID}」の依存関係に関して「前に読み込む」と「後に読み込む」との両方が登録されています。"/>
<string id="RC1V9BbP" text="依存関係が循環しています。「{TARGETID}」と「{SOURCEID}」は互いに依存していることになっています。"/>
<string id="s3xbuejE" text="「{SOURCEID}」は{TARGETID}より前に読み込むべきです。"/>
<string id="2ALJB7z2" text="「{SOURCEID}」は{TARGETID}より後に読み込むべきです。"/>

<!-- Dependency Constructor -->
<string id="8ldMJPhQ" text="(オプション)"/>
<string id="f9hYP7mk" text="これらに依存:"/>
<string id="eGJ387f7" text="これらと非互換:"/>
<string id="eW76jyd7" text="これらより前にロードする必要があります:"/>
</strings>
</LanguageData>
Loading

0 comments on commit a3799da

Please sign in to comment.