Merge remote-tracking branch 'origin/feat/inport-props' into feat/craft-discovery

# Conflicts:
#	Assets/External/Animated PBR Chest Demo/Materials/WoodChest.mat
#	Packages/com.distantlands.cozy.core/Content/Integration/Import for BiRP.unitypackage.meta
#	Packages/com.distantlands.cozy.core/Content/Integration/Import for HDRP.unitypackage.meta
#	Packages/com.distantlands.cozy.core/Content/Integration/Import for URP.unitypackage.meta
This commit is contained in:
2026-07-25 19:42:26 +02:00
954 changed files with 999772 additions and 26193 deletions
+27 -2
View File
@@ -72,6 +72,13 @@ namespace Ashwild.Inventory
/// </summary>
private Chest boundChest;
/// <summary>
/// The tab the next open must land on, or null for the default. Set by whoever opens the window
/// on a specific module (a crafting station wanting the craft tab) and consumed by Show(), so it
/// applies to exactly one opening and never leaks into the next.
/// </summary>
private InventoryCategory? pendingCategory;
#endregion
#region Unity Lifecycle
@@ -175,10 +182,24 @@ namespace Ashwild.Inventory
UIManager.Instance.OpenPanel(this);
}
/// <summary>
/// Opens the window on a specific tab — used by a crafting station, which wants the craft panel
/// straight away rather than making the player click across. The tab is picked up in Show().
/// </summary>
public void OpenAtCategory(InventoryCategory category)
{
pendingCategory = category;
if (UIManager.Instance != null)
UIManager.Instance.OpenPanel(this);
}
/// <summary>
/// Opens the inventory window. Enters chest mode when a chest was bound (right side shows the
/// chest module, category is forced to and locked on the inventory), otherwise normal browsing
/// (right side shows the description). Always lands on the inventory category, never craft.
/// (right side shows the description). Lands on the tab a caller requested, or on the default
/// (inventory) otherwise — a plain open never stays on craft from a previous session, and chest
/// mode always wins since it needs the grid.
/// </summary>
public override void Show()
{
@@ -187,10 +208,14 @@ namespace Ashwild.Inventory
if (categoryManager != null)
{
categoryManager.Open();
if (!chestMode && pendingCategory.HasValue) categoryManager.Open(pendingCategory.Value);
else categoryManager.Open();
categoryManager.SetLocked(chestMode);
}
pendingCategory = null;
if (chestMode)
{
if (descriptionModule != null) descriptionModule.SetActive(false);