Skip to content

Commit

Permalink
feat: [クラスラッパー]PluginLoaderの改名に併せてプロパティの改名版を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic9045 committed Dec 20, 2023
1 parent 032bfa3 commit adac7c9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Libs/BveTypes/ClassWrappers/Public/VehicleInstrumentSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ private static void Initialize(BveTypeSet bveTypes)
CabGetMethod = members.GetSourcePropertyGetterOf(nameof(Cab));
CabSetMethod = members.GetSourcePropertySetterOf(nameof(Cab));

AtsPluginGetMethod = members.GetSourcePropertyGetterOf(nameof(AtsPlugin));
AtsPluginSetMethod = members.GetSourcePropertySetterOf(nameof(AtsPlugin));

PluginLoaderGetMethod = members.GetSourcePropertyGetterOf(nameof(PluginLoader));
PluginLoaderSetMethod = members.GetSourcePropertySetterOf(nameof(PluginLoader));
}
Expand Down Expand Up @@ -70,11 +73,23 @@ public CabBase Cab
internal set => CabSetMethod.Invoke(Src, new object[] { value.Src });
}

private static FastMethod AtsPluginGetMethod;
private static FastMethod AtsPluginSetMethod;
/// <summary>
/// ATS プラグインを表す <see cref="ClassWrappers.AtsPlugin"/> を取得します。
/// </summary>
public AtsPlugin AtsPlugin
{
get => ClassWrappers.AtsPlugin.FromSource(AtsPluginGetMethod.Invoke(Src, null));
internal set => AtsPluginSetMethod.Invoke(Src, new object[] { value.Src });
}

private static FastMethod PluginLoaderGetMethod;
private static FastMethod PluginLoaderSetMethod;
/// <summary>
/// プラグインの読込機能を提供する <see cref="ClassWrappers.PluginLoader"/> を取得します
/// 互換性のために残されている旧名のプロパティです。<see cref="AtsPlugin"/> を使用してください
/// </summary>
[Obsolete]
public PluginLoader PluginLoader
{
get => ClassWrappers.PluginLoader.FromSource(PluginLoaderGetMethod.Invoke(Src, null));
Expand Down
4 changes: 4 additions & 0 deletions Libs/BveTypes/WrapTypes/5.8.7554.391.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,10 @@
<Getter Original="e"/>
<Setter Original="a"/>
</Property>
<Property Wrapper="AtsPlugin">
<Getter Original="f"/>
<Setter Original="a"/>
</Property>
<Property Wrapper="PluginLoader">
<Getter Original="f"/>
<Setter Original="a"/>
Expand Down
4 changes: 4 additions & 0 deletions Libs/BveTypes/WrapTypes/6.0.7554.619.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,10 @@
<Getter Original="e"/>
<Setter Original="a"/>
</Property>
<Property Wrapper="AtsPlugin">
<Getter Original="f"/>
<Setter Original="a"/>
</Property>
<Property Wrapper="PluginLoader">
<Getter Original="f"/>
<Setter Original="a"/>
Expand Down

0 comments on commit adac7c9

Please sign in to comment.