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:
69
SVSim.BattleEngine/Engine/Wizard/EmblemMgr.cs
Normal file
69
SVSim.BattleEngine/Engine/Wizard/EmblemMgr.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class EmblemMgr
|
||||
{
|
||||
private List<Emblem> _list = new List<Emblem>();
|
||||
|
||||
public void Add(Emblem emblem)
|
||||
{
|
||||
_list.Add(emblem);
|
||||
}
|
||||
|
||||
public List<Emblem> GetList()
|
||||
{
|
||||
return _list;
|
||||
}
|
||||
|
||||
public bool IsContainsInMaster(long id)
|
||||
{
|
||||
return _list.Find((Emblem x) => x._id == id) != null;
|
||||
}
|
||||
|
||||
public Emblem Get(long id)
|
||||
{
|
||||
Emblem emblem = _list.Find((Emblem x) => x._id == id);
|
||||
if (emblem == null)
|
||||
{
|
||||
emblem = Get(Data.Load.data.DefaultEmblemId);
|
||||
}
|
||||
if (emblem != null && !emblem.IsEnableInCurrentLanguage)
|
||||
{
|
||||
emblem = Get(Data.Load.data.DefaultEmblemId);
|
||||
}
|
||||
return emblem;
|
||||
}
|
||||
|
||||
public string GetResourcePath(long id)
|
||||
{
|
||||
return Get(id)._path;
|
||||
}
|
||||
|
||||
public void Acquired(long id)
|
||||
{
|
||||
Get(id).Acquired();
|
||||
}
|
||||
|
||||
public void UnsetNew(long id)
|
||||
{
|
||||
Get(id).UnsetNew();
|
||||
}
|
||||
|
||||
public void SetNew(long id)
|
||||
{
|
||||
Get(id).SetNew();
|
||||
}
|
||||
|
||||
public void SetFavorite(long id, bool favorite)
|
||||
{
|
||||
Get(id).SetFavorite(favorite);
|
||||
}
|
||||
|
||||
public IEnumerable<long> GetFavorites()
|
||||
{
|
||||
return from x in _list.FindAll((Emblem x) => x.IsFavorite)
|
||||
select x._id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user