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
+7 -7
View File
@@ -5,6 +5,8 @@ using FishNet.Object.Synchronizing;
using UnityEngine;
using Ashwild.Interaction;
using Ashwild.Inventory;
using Ashwild.Network;
using Ashwild.Player;
namespace Ashwild.Storage
{
@@ -263,7 +265,8 @@ namespace Ashwild.Storage
if (!TryGetSlot(index, out ItemData item, out int quantity, out _)) return;
if (!inv.CanFit(item, quantity))
{
Debug.LogWarning($"[Chest] Inventaire plein — impossible de retirer '{item.ItemName}'.", this);
Debug.LogWarning($"[Chest] Inventory full — cannot withdraw '{item.ItemName}'.", this);
PlayerEvents.RaiseInteractionRefused("Inventory full");
return;
}
QuickWithdrawServerRpc(index);
@@ -464,13 +467,10 @@ namespace Ashwild.Storage
}
/// <summary>
/// Returns the PlayerInventory on the player object owned by the given connection.
/// Returns the PlayerInventory owned by the given connection. Delegates to the shared lookup,
/// which scans the connection's objects instead of trusting FirstObject (see NetworkPlayerLookup).
/// </summary>
private PlayerInventory ResolveInventory(NetworkConnection conn)
{
NetworkObject playerObject = conn != null ? conn.FirstObject : null;
return playerObject != null ? playerObject.GetComponent<PlayerInventory>() : null;
}
private PlayerInventory ResolveInventory(NetworkConnection conn) => NetworkPlayerLookup.ResolveInventory(conn);
#endregion