S7-01 + S7-02

This commit is contained in:
2026-03-12 10:46:11 +08:00
parent d34af661b9
commit 185ea43323
20 changed files with 468 additions and 112 deletions
@@ -199,22 +199,12 @@ namespace GeometryTD.Procedure
if (ne.DataTableAssetName == AssetUtility.GetDataTableAsset("TagConfig", false))
{
var tagConfigTable = GameEntry.DataTable.GetDataTable<DRTagConfig>();
if (tagConfigTable != null)
{
TagDefinitionRegistry.LoadFromRows(tagConfigTable.GetAllDataRows());
}
ReloadTagRegistriesFromLoadedTables();
}
if (ne.DataTableAssetName == AssetUtility.GetDataTableAsset("Tag", false))
{
var tagTable = GameEntry.DataTable.GetDataTable<DRTag>();
if (tagTable != null)
{
DRTag[] rows = tagTable.GetAllDataRows();
TagGenerationRuleRegistry.LoadFromRows(rows);
TagDefinitionRegistry.ApplyTagRows(rows);
}
ReloadTagRegistriesFromLoadedTables();
}
if (ne.DataTableAssetName == AssetUtility.GetDataTableAsset("RarityTagBudget", false))
@@ -227,6 +217,26 @@ namespace GeometryTD.Procedure
}
}
private static void ReloadTagRegistriesFromLoadedTables()
{
DRTagConfig[] tagConfigRows = null;
var tagConfigTable = GameEntry.DataTable.GetDataTable<DRTagConfig>();
if (tagConfigTable != null)
{
tagConfigRows = tagConfigTable.GetAllDataRows();
}
DRTag[] tagRows = null;
var tagTable = GameEntry.DataTable.GetDataTable<DRTag>();
if (tagTable != null)
{
tagRows = tagTable.GetAllDataRows();
TagGenerationRuleRegistry.LoadFromRows(tagRows);
}
TagDefinitionRegistry.ReloadFromRows(tagConfigRows, tagRows);
}
private void OnLoadDataTableFailure(object sender, GameEventArgs e)
{
LoadDataTableFailureEventArgs ne = (LoadDataTableFailureEventArgs)e;