미흡사항 수정

This commit is contained in:
2026-05-12 10:52:18 +09:00
parent ba7a829d95
commit f4f0682897
4 changed files with 13 additions and 8 deletions

View File

@@ -23,6 +23,10 @@ public class MissionGenerator : MonoBehaviour, ISceneInitializable
[SerializeField, Range(0f, 1f)] private float _budgetMarginMin = 0.20f;
[SerializeField, Range(0f, 1f)] private float _budgetMarginMax = 0.30f;
// 테스트용 — 여기에 추가된 ProductGroup은 미션 후보에서 자동 제외
[Header("Excluded Groups (Test)")]
[SerializeField] private List<ProductGroup> _excludedGroups = new List<ProductGroup>();
[Header("References")]
[SerializeField] private ShoppingOrderView _orderView;
[SerializeField] private PlayerWallet _wallet;
@@ -40,7 +44,7 @@ public void Generate()
return;
}
// 1. 씬의 모든 상품을 ProductGroup별로 집계 (None ItemData 누락은 제외)
// 1. 씬의 모든 상품을 ProductGroup별로 집계 (None, 제외 그룹, ItemData 누락은 제외)
var stockByGroup = new Dictionary<ProductGroup, List<ItemData>>();
var allItems = Object.FindObjectsByType<ItemInstance>(FindObjectsSortMode.None);
foreach (var inst in allItems)
@@ -48,6 +52,7 @@ public void Generate()
var data = inst.ItemDataInfo;
if (data == null) continue;
if (data.ProductGroup == ProductGroup.None) continue;
if (_excludedGroups.Contains(data.ProductGroup)) continue;
if (!stockByGroup.TryGetValue(data.ProductGroup, out var list))
{