(Feat) Add Build

This commit is contained in:
2026-07-22 12:56:13 +02:00
parent 3657b870d8
commit 0052b0d98e
244 changed files with 35752 additions and 3112 deletions
+6 -2
View File
@@ -1,6 +1,7 @@
using UnityEngine;
using Ashwild.Interaction;
using Ashwild.Inventory;
using Ashwild.Player;
namespace Ashwild.Network
{
@@ -57,11 +58,14 @@ namespace Ashwild.Network
public void Interact() => Pickup();
/// <summary>
/// Asks the registry (server) to claim this pickup for the local player. Aborts if already
/// claimed or the local inventory is full.
/// Asks the registry (server) to claim this pickup for the local player. Aborts while the player
/// is building (the hammer's placement/demolition would otherwise let an interact press snatch an
/// item mid-build), if already claimed, or if the local inventory is full.
/// </summary>
public void Pickup()
{
if (PlayerEvents.IsBuilding) return;
if (itemData == null)
{
Debug.LogError($"[Pickable] '{name}' has no ItemData assigned.", this);