public void TestFactoryComponentCreation() { ComponentTemplateSD factory = Factory(); ComponentDesigner facDesigner = new ComponentDesigner(factory, _faction.GetDataBlob <FactionTechDB>()); facDesigner.ComponentDesignAttributes["Instalation Construction Points"].SetValue(); ComponentDesign facDesign = facDesigner.CreateDesign(_faction); ConstructionAtbDB attributeDB = facDesign.GetAttribute <ConstructionAtbDB>(); Assert.AreEqual(100, attributeDB.ConstructionPoints[ConstructionType.ShipComponents]); Dictionary <Guid, ComponentTemplateSD> componentsDict = new Dictionary <Guid, ComponentTemplateSD>(); componentsDict.Add(factory.ID, factory); StaticDataManager.ExportStaticData(componentsDict, "FactoryComponentTest.json"); }
public void TestFactoryComponentCreation() { ComponentTemplateSD factory = Factory(); ComponentDesign facDesign = GenericComponentFactory.StaticToDesign(factory, _faction.GetDataBlob <FactionTechDB>(), _game.StaticData); facDesign.ComponentDesignAttributes[0].SetValue(); Entity facDesignEntity = GenericComponentFactory.DesignToDesignEntity(_game, _faction, facDesign); ConstructionAtbDB attributeDB = facDesignEntity.GetDataBlob <ConstructionAtbDB>(); Assert.AreEqual(100, attributeDB.ConstructionPoints[ConstructionType.ShipComponents]); Dictionary <Guid, ComponentTemplateSD> componentsDict = new Dictionary <Guid, ComponentTemplateSD>(); componentsDict.Add(factory.ID, factory); StaticDataManager.ExportStaticData(componentsDict, "FactoryComponentTest.json"); }