public void MakePiptVcolors(List <uint> assetIDs) { AssetPIPT pipt = null; foreach (Asset a in assetDictionary.Values) { if (a is AssetPIPT PIPT) { pipt = PIPT; break; } } if (pipt == null) { pipt = (AssetPIPT)PlaceTemplate(new Vector3(), IndexOfLayerOfType((int)LayerType_BFBB.DEFAULT), template: AssetTemplate.PipeInfoTable); } List <EntryPIPT> entries = pipt.PIPT_Entries.ToList(); foreach (uint u in assetIDs) { if (GetFromAssetID(u) is AssetMODL) { entries.Add(new EntryPIPT() { ModelAssetID = u, LightingMode = 1 }); } } pipt.PIPT_Entries = entries.ToArray(); }
private void MergePIPT(AssetPIPT asset) { foreach (Asset a in assetDictionary.Values) { if (a is AssetPIPT PIPT) { PIPT.Merge(asset); return; } } }
public void Merge(AssetPIPT assetPIPT) { List <EntryPIPT> entriesPIPT = PIPT_Entries.ToList(); List <uint> assetIDsAlreadyPresent = new List <uint>(); foreach (EntryPIPT entryPIPT in entriesPIPT) { assetIDsAlreadyPresent.Add(entryPIPT.ModelAssetID); } foreach (EntryPIPT entryPIPT in assetPIPT.PIPT_Entries) { if (!assetIDsAlreadyPresent.Contains(entryPIPT.ModelAssetID)) { entriesPIPT.Add(entryPIPT); } } PIPT_Entries = entriesPIPT.ToArray(); }