public ShipPart(ShipPartsDataBase.PartsType type, ShipPartsDataBase.ShipSizeType ship_type1, string name, int min0, int max0, int min1, int max1, int min2, int max2, int min3, int max3, int min4, int max4, int min5, int max5, int min6, int max6, int min7, int max7, int min8, int max8, int min9, int max9) : this() { this.m_type = type; this.m_ship_size_type = ship_type1; this.m_name = name; this.m_value_tbl[0].SetData(min0, max0, max0 - (max0 - min0) / 2); this.m_value_tbl[1].SetData(min1, max1, max1 - (max1 - min1) / 2); this.m_value_tbl[2].SetData(min2, max2, max2 - (max2 - min2) / 2); this.m_value_tbl[3].SetData(min3, max3, max3 - (max3 - min3) / 2); this.m_value_tbl[4].SetData(min4, max4, max4 - (max4 - min4) / 2); this.m_value_tbl[5].SetData(min5, max5, max5 - (max5 - min5) / 2); this.m_value_tbl[6].SetData(min6, max6, max6 - (max6 - min6) / 2); this.m_value_tbl[7].SetData(min7, max7, max7 - (max7 - min7) / 2); this.m_value_tbl[8].SetData(min8, max8, max8 - (max8 - min8) / 2); this.m_value_tbl[9].SetData(min9, max9, max9 - (max9 - min9) / 2); this.optimize(); }
private ShipPart() { this.m_type = ShipPartsDataBase.PartsType.Hull; this.m_ship_size_type = ShipPartsDataBase.ShipSizeType.All; this.m_name = ""; this.m_value_tbl = new ShipPartsDataBase.DataValue[Enum.GetValues(typeof(ShipPartsDataBase.BuildTargetType)).Length]; for (int index = 0; index < this.m_value_tbl.Length; ++index) { this.m_value_tbl[index] = new ShipPartsDataBase.DataValue(index); } this.m_opt_value_tbl = new List <ShipPartsDataBase.DataValue>(); this.m_is_general_purpose = false; this.Skill = ""; this.Citys = ""; this.NPC = ""; this.Materials = ""; this.ShipType = ""; this.Price = ""; }
public static string ToString(ShipPartsDataBase.ShipSizeType type) { return(EnumParserUtility <ShipPartsDataBase.ShipSizeType> .ToString(ShipPartsDataBase._shipsizetype_enum_param, type, "不明")); }
public ShipPart(ShipPartsDataBase.PartsType type, ShipPartsDataBase.ShipSizeType ship_type1, string name, int min0, int max0, int min1, int max1, int min2, int max2, int min3, int max3, int min4, int max4, int min5, int max5, int min6, int max6, int min7, int max7, int min8, int max8, int min9, int max9, bool is_general_purpose) : this(type, ship_type1, name, min0, max0, min1, max1, min2, max2, min3, max3, min4, max4, min5, max5, min6, max6, min7, max7, min8, max8, min9, max9) { this.m_is_general_purpose = is_general_purpose; }
private void add(ShipPartsDataBase.PartsType type, ShipPartsDataBase.ShipSizeType ship_type1, string name, int min0, int max0, int min1, int max1, int min2, int max2, int min3, int max3, int min4, int max4, int min5, int max5, int min6, int max6, int min7, int max7, int min8, int max8, int min9, int max9, bool is_general_purpose) { this.m_list.Add(new ShipPartsDataBase.ShipPart(type, ship_type1, name, min0, max0, min1, max1, min2, max2, min3, max3, min4, max4, min5, max5, min6, max6, min7, max7, min8, max8, min9, max9, is_general_purpose)); }
public List <ShipPartsDataBase.ShipPart> GetPartsList(ShipPartsDataBase.PartsType type, ShipPartsDataBase.ShipSizeType type2) { List <ShipPartsDataBase.ShipPart> list = new List <ShipPartsDataBase.ShipPart>(); foreach (ShipPartsDataBase.ShipPart shipPart in this.m_list) { if (shipPart.PartsType == type) { if (shipPart.ShipSizeType != ShipPartsDataBase.ShipSizeType.All) { if (shipPart.ShipSizeType == ShipPartsDataBase.ShipSizeType.MiddleAndBig) { if (type2 == ShipPartsDataBase.ShipSizeType.Small) { continue; } } else if (shipPart.ShipSizeType != type2) { continue; } } list.Add(shipPart); } } return(list); }