public bool Create(int id) { if (AssembleModule.GetAssemblePartDataByKey(id) == null) { return(false); } ID = id; return(true); }
public void AddUnlockAssemblePartID(int partID) { if (!_currentUnlockPartList.Contains(partID)) { if (AssembleModule.GetAssemblePartDataByKey(partID) != null) { _currentUnlockPartList.Add(partID); } } }
public static List <int> ParseTechParam_Unlock_Assemble_Part(string content) { List <int> result = new List <int>(); var list = Utility.TryParseIntList(content, ','); for (int i = 0; i < list.Count; i++) { if (AssembleModule.GetAssemblePartDataByKey(list[i]) != null) { result.Add(list[i]); } } return(result); }
public bool InitData(int partID) { this.partID = partID; _partsMeta = AssembleModule.GetAssemblePartDataByKey(partID); if (_partsMeta != null) { baseTimeCost = _partsMeta.BaseTimeCost; materialCostItem = AssembleModule.GetPartMaterialCost(partID); partsConfig = AssembleModule.GetPartsCustomConfigData(partID); partEquipType = AssembleModule.GetAssemblePartEquipType(partID); typePresetData = new AssemblePartTypePresetData(_partsMeta.ModelTypeID); modifierRootType = AssembleModule.FetchAssemblePartModifieRootType(typePresetData.TypeID); return(true); } return(false); }
public List <int> GetUnlockAssemblePartTypeListByTypeID(string typeID) { List <int> result = new List <int>(); for (int i = 0; i < _currentUnlockPartList.Count; i++) { var meta = AssembleModule.GetAssemblePartDataByKey(_currentUnlockPartList[i]); if (meta != null) { var typeMeta = AssembleModule.GetAssemblePartTypeByKey(meta.ModelTypeID); if (typeMeta != null) { if (typeMeta.TypeID == typeID) { result.Add(_currentUnlockPartList[i]); } } } } return(result); }