S4-07 process 3
- 组件 Tag 数量预算不再写死在 ResolveTagBudget(...) 里,而是走 RarityTagBudget.txt -> DRRarityTagBudget -> RarityTagBudgetRuleRegistry -> InventoryTagRuleService 这条表驱动链。 - TagBudget.txt:1 新增了按品质的 MinCount/MaxCount,预算缓存和加载入口分别在 RarityTagBudgetRuleRegistry.cs:7 和 ProcedurePreload.cs:18。 - 生成逻辑已经接到新规则,InventoryTagRuleService.cs:10 现在会先按 Tag.txt 过滤/加权,再按 RarityTagBudget 决定抽几个 Tag。
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using GeometryTD.CustomUtility;
|
||||
using GeometryTD.Definition;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace GeometryTD.DataTable
|
||||
{
|
||||
public sealed class DRRarityTagBudget : DataRowBase
|
||||
{
|
||||
private int m_Id;
|
||||
|
||||
public override int Id => m_Id;
|
||||
|
||||
public RarityType Rarity { get; private set; }
|
||||
|
||||
public int MinCount { get; private set; }
|
||||
|
||||
public int MaxCount { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
for (int i = 0; i < columnStrings.Length; i++)
|
||||
{
|
||||
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
Rarity = EnumUtility<RarityType>.Get(columnStrings[index++]);
|
||||
MinCount = int.Parse(columnStrings[index++]);
|
||||
MaxCount = int.Parse(columnStrings[index++]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5e6052cd3fe424d8b6ac53c33c063c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user