상호작용 시 모달 UI 추가(임시)

기타 디버깅 로그 제거
This commit is contained in:
2026-02-03 21:32:16 +09:00
parent 02f5aa869a
commit 965a4a25aa
22 changed files with 1082 additions and 363 deletions

View File

@@ -253,7 +253,6 @@ namespace Northbound
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void AssignOrGatherResourceServerRpc(ulong playerId, ulong resourceId)
{
Debug.Log($"[Resource] AssignOrGatherResourceServerRpc called - PlayerID: {playerId}, ResourceID: {resourceId}");
bool workerAssigned = false;
@@ -264,11 +263,8 @@ namespace Northbound
if (assignedWorker != null)
{
Debug.Log($"[Resource] Worker found server-side - OwnerPlayerId: {assignedWorker.OwnerPlayerId}, CurrentState: {(int)assignedWorker.CurrentState}");
if ((int)assignedWorker.CurrentState == 1) // 1 = Following
{
Debug.Log($"[Resource] ✓ Assigning worker to resource!");
assignedWorker.AssignMiningTargetServerRpc(resourceId);
workerAssigned = true;
@@ -279,10 +275,6 @@ namespace Northbound
Debug.LogWarning($"[Resource] Worker not in Following state! State: {(int)assignedWorker.CurrentState}");
}
}
else
{
Debug.Log($"[Resource] No worker found for player {playerId} in Following state");
}
}
if (!workerAssigned)
@@ -354,9 +346,9 @@ namespace Northbound
public string GetInteractionPrompt()
{
if (_currentResources.Value <= 0)
return "자원 충전 중...";
return "Recharging...";
return $"[E] {resourceName} 채집 ({_currentResources.Value}/{ActualMaxResources})";
return $"[E] {resourceName} Mining ({_currentResources.Value}/{ActualMaxResources})";
}
public string GetInteractionAnimation()
@@ -376,8 +368,6 @@ namespace Northbound
private Worker FindWorkerForPlayer(ulong playerId)
{
Debug.Log($"[Resource] FindWorkerForPlayer called - Looking for worker assigned to player {playerId}");
if (NetworkManager.Singleton == null || NetworkManager.Singleton.SpawnManager == null)
{
Debug.LogWarning($"[Resource] FindWorkerForPlayer - NetworkManager or SpawnManager is null");
@@ -396,18 +386,15 @@ namespace Northbound
if (worker != null)
{
workersFound++;
Debug.Log($"[Resource] FindWorkerForPlayer - Found worker: {worker.gameObject.name}, OwnerPlayerId: {worker.OwnerPlayerId}, State: {(int)worker.CurrentState}");
// Use worker's internal OwnerPlayerId, NOT NetworkObject.OwnerClientId!
if (worker.OwnerPlayerId == playerId && (int)worker.CurrentState == 1) // 1 = Following
{
Debug.Log($"[Resource] FindWorkerForPlayer - ✓ Found worker: {worker.gameObject.name} for player {playerId}");
return worker;
}
}
}
Debug.LogWarning($"[Resource] FindWorkerForPlayer - Checked {objectsChecked} objects, found {workersFound} workers, no matching worker in Following state!");
return null;
}
}