Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Inventory 2.10b update #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 44 additions & 24 deletions EnhancedInventory/EnhancedInventory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@
<Version>0.0.2</Version>
<Deterministic>false</Deterministic>
</PropertyGroup>
<Target Name="Publicize" AfterTargets="Clean">
<ItemGroup>
<!-- Use $(KingmakerPath)\Kingmaker_Data\Managed\Assembly-CSharp.dll for Kingmaker -->
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Assembly-CSharp.dll" />
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\UniRx.dll" />
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Owlcat.Runtime.Core.dll" />
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Owlcat.Runtime.UI.dll" />
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Owlcat.Runtime.Visual.dll" />
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Owlcat.Runtime.UniRx.dll" />
</ItemGroup>

<PublicizeTask InputAssemblies="@(Assemblies)" OutputDir="$(SolutionDir)lib/" />
</Target>
<Target Name="CheckEnvironmentVars">
<Error Text="Please set the WrathInstallDir environment variable." Condition="'$(WrathInstallDir)' == ''" ContinueOnError="false" />
</Target>
Expand Down Expand Up @@ -53,22 +65,10 @@
</PropertyGroup>

<ItemGroup>
<Reference Include="Owlcat.Runtime.Core.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\publicized_assemblies\Owlcat.Runtime.Core_publicized.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.UI.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\publicized_assemblies\Owlcat.Runtime.UI_publicized.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.Visual.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\publicized_assemblies\Owlcat.Runtime.Visual_publicized.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.UniRx.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\publicized_assemblies\Owlcat.Runtime.UniRx_publicized.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.Validation.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\Owlcat.Runtime.Validation.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Unity.Burst.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\Unity.Burst.dll'))</HintPath>
<Private>false</Private>
Expand Down Expand Up @@ -401,24 +401,44 @@
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\UnityModManager\0Harmony.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp_publicized">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\publicized_assemblies\Assembly-CSharp_publicized.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(SolutionDir)lib\Assembly-CSharp_public.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="NewtonSoft.Json">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\NewtonSoft.Json.dll'))</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UniRx.dll">
<HintPath>$([System.IO.Path]::Combine($(WrathInstallDir), 'Wrath_Data\Managed\UniRx.dll'))</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UniRx">
<HintPath>$(SolutionDir)lib\UniRx_public.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Owlcat.Runtime.Core_public.dll">
<HintPath>$(SolutionDir)\lib\Owlcat.Runtime.Core_public.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.UI_public.dll">
<HintPath>$(SolutionDir)\lib\Owlcat.Runtime.UI_public.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.Visual_public.dll">
<HintPath>$(SolutionDir)\lib\Owlcat.Runtime.Visual_public.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Owlcat.Runtime.UniRx_public.dll">
<HintPath>$(SolutionDir)lib\Owlcat.Runtime.UniRx_public.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>

<ItemGroup>
<None Include="..\README.md" Link="README.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<PackageReference Include="AssemblyPublicizer" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
Expand Down
2 changes: 1 addition & 1 deletion EnhancedInventory/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Id": "EnhancedInventory",
"DisplayName": "Enhanced Inventory",
"Author": "Xenofell",
"Version": "1.0.10",
"Version": "1.0.11",
"ManagerVersion": "0.23.3",
"LoadAfter": [ "InventorySearchBar", "WeightValueSorting", "HighlightImportantLoot" ], // legacy mods
"AssemblyName": "EnhancedInventory.dll",
Expand Down
5 changes: 3 additions & 2 deletions EnhancedInventory/src/Controllers/SpellbookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using Kingmaker.Blueprints.Root;
using Kingmaker.EntitySystem.Stats;
using EnhancedInventory.Localization;
using Kingmaker.UI.Group;

namespace EnhancedInventory.Controllers
{
Expand Down Expand Up @@ -160,7 +161,7 @@ private void Awake()
{
m_deferred_update = true;

UnitEntityData unit = UIUtility.GetCurrentCharacter();
UnitEntityData unit = GroupController.Instance.GetCurrentCharacter();
foreach (ItemEntity item in GetLearnableScrolls())
{
CopyScroll copy = item.Blueprint.GetComponent<CopyScroll>();
Expand Down Expand Up @@ -403,7 +404,7 @@ private List<ItemEntity> GetLearnableScrolls()
{
List<ItemEntity> ret = new List<ItemEntity>();

UnitEntityData unit = UIUtility.GetCurrentCharacter();
UnitEntityData unit = GroupController.Instance.GetCurrentCharacter();
foreach (ItemEntity item in UIUtility.GetStashItems())
{
CopyScroll scroll = item.Blueprint.GetComponent<CopyScroll>();
Expand Down
8 changes: 5 additions & 3 deletions EnhancedInventory/src/Hooks/ItemsFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using Kingmaker.Items;
using Kingmaker.Items.Parts;
using Kingmaker.UI.Common;
using Kingmaker.UI.Group;
using Kingmaker.UI.ServiceWindow;
using System;
using System.Collections.Generic;

Expand All @@ -33,7 +35,7 @@ public static bool Prefix(ItemEntity item, ItemsFilter.FilterType filter, ref bo
else if (expanded_filter == ExpandedFilterType.UnlearnedScrolls)
{
CopyScroll scroll = item.Blueprint.GetComponent<CopyScroll>();
UnitEntityData unit = UIUtility.GetCurrentCharacter();
UnitEntityData unit = GroupController.Instance.GetCurrentCharacter();
__result = scroll != null && unit != null && scroll.CanCopy(item, unit);
}
else if (expanded_filter == ExpandedFilterType.UnlearnedRecipes)
Expand All @@ -48,14 +50,14 @@ public static bool Prefix(ItemEntity item, ItemsFilter.FilterType filter, ref bo
}
else if (expanded_filter == ExpandedFilterType.UsableWithoutUMD)
{
UnitEntityData unit = UIUtility.GetCurrentCharacter();
UnitEntityData unit = GroupController.Instance.GetCurrentCharacter();
__result = item.Blueprint is BlueprintItemEquipmentUsable blueprint &&
(blueprint.Type == UsableItemType.Scroll || blueprint.Type == UsableItemType.Wand) &&
unit != null && !blueprint.IsUnitNeedUMDForUse(unit);
}
else if (expanded_filter == ExpandedFilterType.CurrentEquipped)
{
UnitEntityData unit = UIUtility.GetCurrentCharacter();
UnitEntityData unit = GroupController.Instance.GetCurrentCharacter();
__result = unit != null;

if (__result)
Expand Down
Binary file added lib/Assembly-CSharp_public.dll
Binary file not shown.
1 change: 1 addition & 0 deletions lib/Assembly-CSharp_public.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BAFAB6DDBD2784678744AA84F40955E5AD040FC5
Binary file added lib/Owlcat.Runtime.Core_public.dll
Binary file not shown.
1 change: 1 addition & 0 deletions lib/Owlcat.Runtime.Core_public.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
B1EF1DA979FE6878FA16E512757C2CDB67FC10EB
Binary file added lib/Owlcat.Runtime.UI_public.dll
Binary file not shown.
1 change: 1 addition & 0 deletions lib/Owlcat.Runtime.UI_public.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
B08B968CC833BE87D495BCD27617509C334515C4
Binary file added lib/Owlcat.Runtime.UniRx_public.dll
Binary file not shown.
1 change: 1 addition & 0 deletions lib/Owlcat.Runtime.UniRx_public.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CB9961315C34017C65ABA708CC451F26477916D2
Binary file added lib/Owlcat.Runtime.Visual_public.dll
Binary file not shown.
1 change: 1 addition & 0 deletions lib/Owlcat.Runtime.Visual_public.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
82C9299E228AEC2BB19D0AA34F30CB46D6673886
Binary file added lib/UniRx_public.dll
Binary file not shown.
1 change: 1 addition & 0 deletions lib/UniRx_public.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7599CD65F60D900DDB2D59C513B3808029E7A326