迁移数据表到 Luban,移除 JsonNet、EnumUtility

This commit is contained in:
2026-09-13 14:08:14 +08:00
parent 4003b3aaba
commit de53890de6
607 changed files with 18515 additions and 3257 deletions
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using SepCore.Event;
using SepCore.DataTable;
using SepCore.Definition;
using SepCore.Entity;
using SepCore.Components;
@@ -49,8 +48,8 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
private float _spawnRateScaleInput = 1f;
private float _extendDurationSeconds = 30f;
private DRProp[] _allProps = Array.Empty<DRProp>();
private DRProp[] _filteredProps = Array.Empty<DRProp>();
private PropConfig[] _allProps = Array.Empty<PropConfig>();
private PropConfig[] _filteredProps = Array.Empty<PropConfig>();
private string[] _displayNames = Array.Empty<string>();
private int _cornerTapCount;
@@ -210,7 +209,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
_selectedIndex = GUILayout.SelectionGrid(_selectedIndex, _displayNames, 1);
GUILayout.EndScrollView();
DRProp selectedProp = GetSelectedProp();
PropConfig selectedProp = GetSelectedProp();
if (selectedProp == null) return;
GUILayout.Label($"Selected: {selectedProp.Title} ({selectedProp.Rarity})");
@@ -400,16 +399,16 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
{
if (!force && _allProps != null && _allProps.Length > 0) return;
if (GameEntry.DataTable == null)
if (GameEntry.Luban == null)
{
_allProps = Array.Empty<DRProp>();
_filteredProps = Array.Empty<DRProp>();
_allProps = Array.Empty<PropConfig>();
_filteredProps = Array.Empty<PropConfig>();
_displayNames = Array.Empty<string>();
return;
}
var table = GameEntry.DataTable.GetDataTable<DRProp>();
_allProps = table != null ? table.ToArray() : Array.Empty<DRProp>();
var table = GameEntry.Luban.GetTable<PropConfig>();
_allProps = table != null ? table.ToArray() : Array.Empty<PropConfig>();
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, Mathf.Max(0, _allProps.Length - 1));
ApplyFilter(_searchText);
}
@@ -418,7 +417,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
{
if (_allProps == null || _allProps.Length == 0)
{
_filteredProps = Array.Empty<DRProp>();
_filteredProps = Array.Empty<PropConfig>();
_displayNames = Array.Empty<string>();
return;
}
@@ -441,7 +440,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
else _selectedIndex = Mathf.Clamp(_selectedIndex, 0, _displayNames.Length - 1);
}
private DRProp GetSelectedProp()
private PropConfig GetSelectedProp()
{
if (_filteredProps == null || _filteredProps.Length == 0) return null;
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, _filteredProps.Length - 1);
@@ -499,7 +498,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
PlayerHealthChangeEventArgs.Create(0, playerHealth.CurrentHealth, playerHealth.MaxHealth));
}
private static void AddSelectedBuffToPlayer(DRProp prop, int count)
private static void AddSelectedBuffToPlayer(PropConfig prop, int count)
{
Player player = FindPlayer();
if (player == null || prop == null || prop.Modifiers == null) return;
@@ -507,7 +506,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
int applyCount = Mathf.Clamp(count, 1, 99);
for (int i = 0; i < applyCount; i++)
{
player.AddProp(new PropItem(prop.Modifiers, prop.Rarity, prop.Title, prop.IconAssetName));
player.AddProp(new PropItem(prop));
}
}