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:
54
SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryApplyData.cs
Normal file
54
SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryApplyData.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Lottery;
|
||||
|
||||
public class LotteryApplyData
|
||||
{
|
||||
private const string LOTTERY_KEY = "application_data";
|
||||
|
||||
public bool IsEnable { get; private set; }
|
||||
|
||||
public string DialogTitle { get; private set; }
|
||||
|
||||
public string DialogMessage { get; private set; }
|
||||
|
||||
public string BannerFileName { get; private set; }
|
||||
|
||||
private static string ParseString(string text)
|
||||
{
|
||||
return text.Replace("\\n", "\n");
|
||||
}
|
||||
|
||||
public static LotteryApplyData EmptyData()
|
||||
{
|
||||
return new LotteryApplyData
|
||||
{
|
||||
IsEnable = false,
|
||||
DialogTitle = string.Empty,
|
||||
DialogMessage = string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
public static LotteryApplyData Parse(JsonData json)
|
||||
{
|
||||
if (!json.Keys.Contains("application_data") || json["application_data"] == null)
|
||||
{
|
||||
return EmptyData();
|
||||
}
|
||||
LotteryApplyData lotteryApplyData = new LotteryApplyData();
|
||||
JsonData jsonData = json["application_data"];
|
||||
lotteryApplyData.IsEnable = true;
|
||||
lotteryApplyData.DialogTitle = jsonData["dialog_message"].ToString();
|
||||
lotteryApplyData.DialogMessage = ParseString(jsonData["description_message"].ToString());
|
||||
lotteryApplyData.BannerFileName = jsonData["apply_banner_image"].ToString();
|
||||
if (jsonData.Keys.Contains("double_chance_message"))
|
||||
{
|
||||
string text = jsonData["double_chance_message"].ToString();
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
lotteryApplyData.DialogMessage = lotteryApplyData.DialogMessage + "\n\n" + ParseString(text);
|
||||
}
|
||||
}
|
||||
return lotteryApplyData;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user