feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
This commit is contained in:
74
SVSim.BattleEngine/Engine/Wizard/DegreeMgr.cs
Normal file
74
SVSim.BattleEngine/Engine/Wizard/DegreeMgr.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class DegreeMgr
|
||||
{
|
||||
private List<Degree> _list = new List<Degree>();
|
||||
|
||||
public void Add(Degree degree)
|
||||
{
|
||||
_list.Add(degree);
|
||||
}
|
||||
|
||||
public List<Degree> GetList()
|
||||
{
|
||||
return _list;
|
||||
}
|
||||
|
||||
public bool IsContainsInMaster(int id)
|
||||
{
|
||||
return _list.Find((Degree x) => x._id == id) != null;
|
||||
}
|
||||
|
||||
public Degree Get(int id)
|
||||
{
|
||||
Degree degree = _list.Find((Degree x) => x._id == id);
|
||||
if (degree == null)
|
||||
{
|
||||
degree = Get(Data.Load.data.DefaultDegreeId);
|
||||
}
|
||||
if (degree != null && !degree.IsEnableInCurrentLanguage)
|
||||
{
|
||||
degree = Get(Data.Load.data.DefaultDegreeId);
|
||||
}
|
||||
return degree;
|
||||
}
|
||||
|
||||
public string GetResourcePath(int id)
|
||||
{
|
||||
return Get(id)._path;
|
||||
}
|
||||
|
||||
public string GetMaskTexturePath(int id)
|
||||
{
|
||||
return $"degree_mask_{Get(id)._id}";
|
||||
}
|
||||
|
||||
public void Acquired(int id)
|
||||
{
|
||||
Get(id).Acquired();
|
||||
}
|
||||
|
||||
public void UnsetNew(int id)
|
||||
{
|
||||
Get(id).UnsetNew();
|
||||
}
|
||||
|
||||
public void SetNew(int id)
|
||||
{
|
||||
Get(id).SetNew();
|
||||
}
|
||||
|
||||
public void SetFavorite(int id, bool favorite)
|
||||
{
|
||||
Get(id).SetFavorite(favorite);
|
||||
}
|
||||
|
||||
public IEnumerable<long> GetFavorites()
|
||||
{
|
||||
return ((IEnumerable<Degree>)_list.FindAll((Degree x) => x.IsFavorite)).Select((Func<Degree, long>)((Degree x) => x._id));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user