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:
@@ -315,6 +315,7 @@ namespace Ashwild.Cooking
|
||||
if (cooked != null && !inv.CanFit(cooked, 1))
|
||||
{
|
||||
Debug.LogWarning($"[CookingStation] '{name}' cannot give '{cooked.ItemName}' — inventory full.", this);
|
||||
PlayerEvents.RaiseInteractionRefused("Inventory full");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -463,13 +464,10 @@ namespace Ashwild.Cooking
|
||||
}
|
||||
|
||||
/// <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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user