Compare commits
2 Commits
d7c541fcc5
...
2ad99a9d3b
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ad99a9d3b | |||
| 074b34dd24 |
@@ -117,8 +117,20 @@ internal class CardRenderer(ICoreClientAPI api, Config config) : IDisposable
|
|||||||
if (heldBag == null)
|
if (heldBag == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
ItemStack[]? bagContents;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bagContents = heldBag.GetContents(bagStack, api.World);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bagContents == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
contents = [];
|
contents = [];
|
||||||
ItemStack[] bagContents = heldBag.GetContents(bagStack, api.World);
|
|
||||||
foreach (ItemStack contentStack in bagContents)
|
foreach (ItemStack contentStack in bagContents)
|
||||||
{
|
{
|
||||||
if (contentStack == null || contentStack.StackSize <= 0)
|
if (contentStack == null || contentStack.StackSize <= 0)
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||||
<Configurations>Debug;Release;Version22</Configurations>
|
<Configurations>Debug;Release;Version22</Configurations>
|
||||||
|
<VS_CONFIGLIB Condition="'$(VS_CONFIGLIB)' == ''">$([System.Environment]::GetEnvironmentVariable('VS_CONFIGLIB'))</VS_CONFIGLIB>
|
||||||
|
<ConfigLibAvailable Condition="'$(VS_CONFIGLIB)' != '' and Exists('$(VS_CONFIGLIB)')">true</ConfigLibAvailable>
|
||||||
|
<DefineConstants Condition="'$(ConfigLibAvailable)' == 'true'">$(DefineConstants);CONFIGLIB</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -17,4 +20,15 @@
|
|||||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="configlib" Condition="'$(ConfigLibAvailable)' == 'true'">
|
||||||
|
<HintPath>$(VS_CONFIGLIB)</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="WarnWithoutConfigLib" BeforeTargets="CoreCompile" Condition="'$(ConfigLibAvailable)' != 'true'">
|
||||||
|
<Warning Text="No VS_CONFIGLIB - will compile without supporting ConfigLib. Set VS_CONFIGLIB env var to a path that contains the configlib's dlls." />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
0
ChestPreview/build.sh
Normal file → Executable file
0
ChestPreview/build.sh
Normal file → Executable file
Reference in New Issue
Block a user