[Refactor] Replace hardcoded categories with data-driven SO system and abstract dice
- Add abstract dice system (IDie interface, DieDefinitionSO, StandardDieSO, DieInstance) to support future custom dice types while keeping backward compat via int[] DiceValues - Replace YachtCategory enum and CategoryScorer switch with CategoryDefinitionSO hierarchy: SumOfValueCategorySO, NOfAKindCategorySO, FullHouseCategorySO, StraightCategorySO, SumAllCategorySO - Add CategoryCatalogSO for ordered category collections and DiceCheckUtility for shared logic - Refactor ScoringSystem, Views, GameManager, GameController to use SO references - Update CategoryCondition modifier to use SO reference instead of enum - Update all editor tests to use SO-based categories and DieInstance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using YachtDice.Categories;
|
||||
using YachtDice.Economy;
|
||||
using YachtDice.Modifiers.Runtime;
|
||||
using YachtDice.Scoring;
|
||||
@@ -73,7 +74,7 @@ namespace YachtDice.Inventory
|
||||
RefreshView();
|
||||
}
|
||||
|
||||
private void HandleCategoryConfirmed(YachtCategory category, ScoreResult result)
|
||||
private void HandleCategoryConfirmed(CategoryDefinitionSO category, ScoreResult result)
|
||||
{
|
||||
model.ConsumeUseOnActive();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user