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:
53
SVSim.BattleEngine/Engine/Wizard/ShopExpirtyInfo.cs
Normal file
53
SVSim.BattleEngine/Engine/Wizard/ShopExpirtyInfo.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class ShopExpirtyInfo
|
||||
{
|
||||
public const string JSON_KEY = "sales_period_info";
|
||||
|
||||
public int? SaleEndSeries { get; private set; }
|
||||
|
||||
public string SaleEndTimeText { get; private set; }
|
||||
|
||||
public bool IsEnableText => GetText() != null;
|
||||
|
||||
public ShopExpirtyInfo(JsonData json)
|
||||
{
|
||||
if (json.Count != 0)
|
||||
{
|
||||
if (json.Keys.Contains("sales_period_time"))
|
||||
{
|
||||
SaleEndTimeText = ConvertTime.ToLocal(DateTime.Parse(json["sales_period_time"].ToString()));
|
||||
}
|
||||
if (json.Keys.Contains("sales_period_series"))
|
||||
{
|
||||
SaleEndSeries = json["sales_period_series"].ToInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ShopExpirtyInfo CreateNullData()
|
||||
{
|
||||
return new ShopExpirtyInfo(null);
|
||||
}
|
||||
|
||||
public ShopExpirtyInfo(string dummyText)
|
||||
{
|
||||
SaleEndTimeText = dummyText;
|
||||
}
|
||||
|
||||
public string GetText()
|
||||
{
|
||||
if (SaleEndSeries.HasValue)
|
||||
{
|
||||
return Data.SystemText.Get("Shop_0247", SaleEndSeries.Value.ToString());
|
||||
}
|
||||
if (SaleEndTimeText != null)
|
||||
{
|
||||
return Data.SystemText.Get("Shop_0245", SaleEndTimeText);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user