Worker 상호작용에 Cost 요구사항 제거

This commit is contained in:
2026-02-13 15:41:47 +09:00
parent e2c40827bf
commit 925d74aa57
2 changed files with 2 additions and 29 deletions

View File

@@ -75,7 +75,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 1475696401
GlobalObjectIdHash: 4213269672
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
@@ -106,7 +106,6 @@ MonoBehaviour:
followDistance: 5
movementSpeed: 5
resourcesPerMining: 5
recruitmentCost: 250
interactionAnimationTrigger:
miningEffectPrefab: {fileID: 0}
depositEffectPrefab: {fileID: 0}

View File

@@ -21,7 +21,6 @@ namespace Northbound
public float followDistance = 3f;
public float movementSpeed = 3.5f;
public int resourcesPerMining = 5;
public int recruitmentCost = 10;
[Header("Interaction")]
public string interactionAnimationTrigger = "Recruit";
@@ -373,13 +372,6 @@ namespace Northbound
if (_ownerPlayerId.Value != ulong.MaxValue && _ownerPlayerId.Value != playerId)
return false;
if (_ownerPlayerId.Value == ulong.MaxValue)
{
var coreResourceManager = CoreResourceManager.Instance;
if (coreResourceManager != null && !coreResourceManager.CanAfford(recruitmentCost))
return false;
}
return true;
}
@@ -408,20 +400,6 @@ namespace Northbound
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void RecruitWorkerServerRpc(ulong playerId, ulong workerNetObjectId)
{
var coreResourceManager = CoreResourceManager.Instance;
if (coreResourceManager == null)
{
Debug.LogWarning("[Worker] CoreResourceManager 인스턴스를 찾을 수 없습니다.");
return;
}
if (!coreResourceManager.CanAfford(recruitmentCost))
{
Debug.LogWarning($"[Worker] 코어 자원이 부족합니다. 필요: {recruitmentCost}");
return;
}
coreResourceManager.SpendResources(recruitmentCost);
_ownerPlayerId.Value = playerId;
SetState(WorkerState.Following);
UpdatePlayerTransform();
@@ -463,11 +441,7 @@ namespace Northbound
{
if (_ownerPlayerId.Value == ulong.MaxValue)
{
var coreResourceManager = CoreResourceManager.Instance;
if (coreResourceManager != null && !coreResourceManager.CanAfford(recruitmentCost))
return $"Resource Required: {recruitmentCost})";
return $"[E] Recruit Worker: {recruitmentCost}";
return "[E] Recruit Worker";
}
else if (NetworkManager.Singleton != null && _ownerPlayerId.Value == NetworkManager.Singleton.LocalClientId)
{