(Feat) Add Build
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user