//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg
{
public sealed partial class EventWashingStep : Bright.Config.BeanBase
{
public JSONNode json;
public EventWashingStep(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Name"]["key"].IsString) { throw new SerializationException(); } Name_l10n_key = _json["Name"]["key"]; if(!_json["Name"]["text"].IsString) { throw new SerializationException(); } Name = _json["Name"]["text"]; }
{ if(!_json["GameType"].IsNumber) { throw new SerializationException(); } GameType = (EventWashingOperation)_json["GameType"].AsInt; }
{ if(!_json["GameID"].IsNumber) { throw new SerializationException(); } GameID = _json["GameID"]; }
{ if(!_json["ToolType"].IsNumber) { throw new SerializationException(); } ToolType = (EventWashingTool)_json["ToolType"].AsInt; }
{ if(!_json["EnergyConsume"].IsNumber) { throw new SerializationException(); } EnergyConsume = _json["EnergyConsume"]; }
{ if(!_json["DropID"].IsNumber) { throw new SerializationException(); } DropID = _json["DropID"]; }
{ if(!_json["ToolID"].IsNumber) { throw new SerializationException(); } ToolID = _json["ToolID"]; }
{ if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; }
{ if(!_json["GiftIcon"].IsString) { throw new SerializationException(); } GiftIcon = _json["GiftIcon"]; }
{ if(!_json["ShowID"].IsNumber) { throw new SerializationException(); } ShowID = _json["ShowID"]; }
json = _json;
PostInit();
}
public EventWashingStep(int ID, string Name, EventWashingOperation GameType, int GameID, EventWashingTool ToolType, int EnergyConsume, int DropID, int ToolID, string Icon, string GiftIcon, int ShowID )
{
this.ID = ID;
this.Name = Name;
this.GameType = GameType;
this.GameID = GameID;
this.ToolType = ToolType;
this.EnergyConsume = EnergyConsume;
this.DropID = DropID;
this.ToolID = ToolID;
this.Icon = Icon;
this.GiftIcon = GiftIcon;
this.ShowID = ShowID;
PostInit();
}
public static EventWashingStep DeserializeEventWashingStep(JSONNode _json)
{
return new EventWashingStep(_json);
}
public int ID { get; private set; }
///
/// 多语言key + 中文
///
public string Name { get; private set; }
public string Name_l10n_key { get; }
///
/// Foaming:喷泡沫
Washing:冲泡沫
Installing:安装
Removing:拆卸
Cleaning:吸尘
Painting:喷涂Barnacle:清藤壶
Review:预览
///
public EventWashingOperation GameType { get; private set; }
///
/// 对应脚本中的编号
///
public int GameID { get; private set; }
///
/// FoamSprayer:喷枪
WaterSprayer:水枪
Shovel:铲子 Spanner:扳手
Cleaner:吸尘器
Brush:笔刷
///
public EventWashingTool ToolType { get; private set; }
///
/// 当前步骤总消耗
///
public int EnergyConsume { get; private set; }
///
/// 对应Drop表主键
///
public int DropID { get; private set; }
///
/// 对应脚本中的编号shovel1:玻璃吸盘shovel2:铲子shovel3:抛光机
///
public int ToolID { get; private set; }
public string Icon { get; private set; }
///
/// 有则显示礼包图标
///
public string GiftIcon { get; private set; }
///
/// 0:welldone1:good
///
public int ShowID { get; private set; }
public const int __ID__ = -1199893643;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
Name = translator(Name_l10n_key, Name);
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Name:" + Name + ","
+ "GameType:" + GameType + ","
+ "GameID:" + GameID + ","
+ "ToolType:" + ToolType + ","
+ "EnergyConsume:" + EnergyConsume + ","
+ "DropID:" + DropID + ","
+ "ToolID:" + ToolID + ","
+ "Icon:" + Icon + ","
+ "GiftIcon:" + GiftIcon + ","
+ "ShowID:" + ShowID + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}