public void SetDesignSD(ComponentTemplateSD designSD)
        {
            Name        = designSD.Name;
            Description = designSD.Description;
            _ID         = designSD.ID;

            MassFormula    = designSD.MassFormula;
            VolumeFormula  = designSD.VolumeFormula;
            HTKFormula     = designSD.HTKFormula;
            CrewReqFormula = designSD.CrewReqFormula;
            MineralCostFormula.Clear();
            foreach (var item in designSD.ResourceCostFormula)
            {
                MineralCostFormula.Add(new MineralFormulaVM(ParentVM, _staticData, item));
            }
            MineralCostFormula.Add(new MineralFormulaVM(ParentVM, _staticData));

            ResearchCostFormula   = designSD.ResearchCostFormula;
            CreditCostFormula     = designSD.CreditCostFormula;
            BuildPointCostFormula = designSD.BuildPointCostFormula;

            foreach (object value in Enum.GetValues(typeof(ComponentMountType)))
            {
                var currentValue = (ComponentMountType)value;
                if ((currentValue & designSD.MountType) != 0)
                {
                    MountType[currentValue] = true;
                }
            }
        }
Пример #2
0
        public static Entity DefaultFuelTank(Game game, Entity faction)
        {
            ComponentDesign     fuelTankDesign;
            ComponentTemplateSD tankSD = game.StaticData.ComponentTemplates[new Guid("E7AC4187-58E4-458B-9AEA-C3E07FC993CB")];

            fuelTankDesign = GenericComponentFactory.StaticToDesign(tankSD, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            fuelTankDesign.ComponentDesignAttributes[0].SetValueFromInput(2500);
            fuelTankDesign.Name = "Tank-500";
            return(GenericComponentFactory.DesignToDesignEntity(game, faction, fuelTankDesign));
        }
Пример #3
0
        public static Entity DefaultCargoInstalation(Game game, Entity faction)
        {
            ComponentDesign     cargoInstalation;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{30cd60f8-1de3-4faa-acba-0933eb84c199}")];

            cargoInstalation = GenericComponentFactory.StaticToDesign(template, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            cargoInstalation.ComponentDesignAttributes[0].SetValueFromInput(1000000);
            cargoInstalation.Name = "CargoInstalation1";
            return(GenericComponentFactory.DesignToDesignEntity(game, faction, cargoInstalation));
        }
Пример #4
0
        public static Entity DeadWeight(Game game, Entity faction, int weight)
        {
            ComponentDesign     deadTestWeight;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{57614ddb-0756-44cf-857b-8a6578493792}")];

            deadTestWeight = GenericComponentFactory.StaticToDesign(template, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            deadTestWeight.ComponentDesignAttributes[0].SetValueFromInput(weight);
            deadTestWeight.Name = "DeadWeight-" + weight;
            return(GenericComponentFactory.DesignToDesignEntity(game, faction, deadTestWeight));
        }
Пример #5
0
        public static Entity DefaultEngineDesign(Game game, Entity faction)
        {
            ComponentDesign engineDesign;

            ComponentTemplateSD engineSD = game.StaticData.ComponentTemplates[new Guid("E76BD999-ECD7-4511-AD41-6D0C59CA97E6")];

            engineDesign = GenericComponentFactory.StaticToDesign(engineSD, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            engineDesign.ComponentDesignAttributes[0].SetValueFromInput(500); //size 500 = 2500 power
            engineDesign.Name = "DefaultEngine-250";
            //engineDesignDB.ComponentDesignAbilities[1].SetValueFromInput
            return(GenericComponentFactory.DesignToDesignEntity(game, faction, engineDesign));
        }
Пример #6
0
        public void SetComponent(Guid componentGuid)
        {
            ComponentTemplateSD componentSD = _staticData.ComponentTemplates[componentGuid];

            Designer = new ComponentDesigner(componentSD, _factionTech);

            AbilityList = new List <ComponentAbilityDesignVM>();
            foreach (var componentAbility in Designer.ComponentDesignAttributes.Values)
            {
                AbilityList.Add(new ComponentAbilityDesignVM(this, componentAbility, _staticData));
            }
        }
Пример #7
0
        public static Entity DefaultSimpleLaser(Game game, Entity faction)
        {
            ComponentDesign     laserDesign;
            ComponentTemplateSD laserSD = game.StaticData.ComponentTemplates[new Guid("8923f0e1-1143-4926-a0c8-66b6c7969425")];

            laserDesign = GenericComponentFactory.StaticToDesign(laserSD, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            laserDesign.ComponentDesignAttributes[0].SetValueFromInput(100);
            laserDesign.ComponentDesignAttributes[1].SetValueFromInput(5000);
            laserDesign.ComponentDesignAttributes[2].SetValueFromInput(5);

            return(GenericComponentFactory.DesignToDesignEntity(game, faction, laserDesign));
        }
Пример #8
0
        public static Entity DefaultBFC(Game game, Entity faction)
        {
            ComponentDesign     fireControlDesign;
            ComponentTemplateSD bfcSD = game.StaticData.ComponentTemplates[new Guid("33fcd1f5-80ab-4bac-97be-dbcae19ab1a0")];

            fireControlDesign = GenericComponentFactory.StaticToDesign(bfcSD, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            fireControlDesign.ComponentDesignAttributes[0].SetValueFromInput(100);
            fireControlDesign.ComponentDesignAttributes[1].SetValueFromInput(5000);
            fireControlDesign.ComponentDesignAttributes[2].SetValueFromInput(1);

            return(GenericComponentFactory.DesignToDesignEntity(game, faction, fireControlDesign));
        }
Пример #9
0
        public void SetComponent(Guid componentGuid)
        {
            ComponentTemplateSD componentSD = _staticData.ComponentTemplates[componentGuid];

            Design = GenericComponentFactory.StaticToDesign(componentSD, _factionTech, _staticData);

            AbilityList = new List <ComponentAbilityDesignVM>();
            foreach (var componentAbility in Design.ComponentDesignAttributes)
            {
                AbilityList.Add(new ComponentAbilityDesignVM(this, componentAbility, _staticData));
            }
        }
Пример #10
0
        public static Entity ShipGenericCargo(Game game, Entity faction)
        {
            ComponentDesign     cargoComponent;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{30cd60f8-1de3-4faa-acba-0933eb84c199}")];

            cargoComponent = GenericComponentFactory.StaticToDesign(template, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            cargoComponent.ComponentDesignAttributes[0].SetValueFromInput(5000); //5t component
            cargoComponent.ComponentDesignAttributes[2].SetValueFromInput(500);
            cargoComponent.ComponentDesignAttributes[3].SetValueFromInput(100);
            cargoComponent.Name = "CargoComponent5t";
            return(GenericComponentFactory.DesignToDesignEntity(game, faction, cargoComponent));
        }
Пример #11
0
        public static ComponentDesign DefaultCargoInstalation(Game game, Entity faction)
        {
            ComponentDesigner   componentDesigner;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{B8239721-B60E-4C11-8E45-5F64F6BA5FA5}")];

            componentDesigner = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            componentDesigner.ComponentDesignAttributes["Warehouse Size"].SetValueFromInput(1000000);
            componentDesigner.Name = "CargoInstalation1";
            //return cargoInstalation.CreateDesign(faction);
            _cargoInstalation = componentDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_cargoInstalation.TechID);
            return(_cargoInstalation);
        }
Пример #12
0
        public static ComponentDesign DefaultFisionReactor(Game game, Entity faction)
        {
            ComponentDesigner   componentDesigner;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{97cf75a1-5ca3-4037-8832-4d81a89f97fa}")];

            componentDesigner = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            componentDesigner.ComponentDesignAttributes["Mass"].SetValueFromInput(1000);
            componentDesigner.Name = "Reactor15k";
            //return cargoInstalation.CreateDesign(faction);
            _reactor = componentDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_reactor.TechID);
            return(_reactor);
        }
Пример #13
0
        public static ComponentDesign DefaultCargoInstalation(Game game, Entity faction)
        {
            ComponentDesigner   componentDesigner;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{30cd60f8-1de3-4faa-acba-0933eb84c199}")];

            componentDesigner = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            componentDesigner.ComponentDesignAttributes["Warehouse Size"].SetValueFromInput(1000000);
            componentDesigner.Name = "CargoInstalation1";
            //return cargoInstalation.CreateDesign(faction);
            _cargoInstalation = componentDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_cargoInstalation.TechID);
            return(_cargoInstalation);
        }
Пример #14
0
        public static ComponentDesign DefaultBatteryBank(Game game, Entity faction)
        {
            ComponentDesigner   componentDesigner;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{1de23a8b-d44b-4e0f-bacd-5463a8eb939d}")];

            componentDesigner = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            componentDesigner.ComponentDesignAttributes["Mass"].SetValueFromInput(1000);
            componentDesigner.Name = "Battery900";
            //return cargoInstalation.CreateDesign(faction);
            _battery = componentDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_battery.TechID);
            return(_battery);
        }
Пример #15
0
        public static ComponentDesign ShipYard(Entity faction)
        {
            if (_shipYard != null)
            {
                return(_shipYard);
            }
            ComponentDesigner   spacePortDesigner;
            ComponentTemplateSD spaceportSD = StaticRefLib.StaticData.ComponentTemplates[new Guid("0BD304FF-FDEA-493C-8979-15FE86B7123E")];

            spacePortDesigner      = new ComponentDesigner(spaceportSD, faction.GetDataBlob <FactionTechDB>());
            spacePortDesigner.Name = "Ship Yard";
            _shipYard = spacePortDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_shipYard.TechID);
            return(_shipYard);
        }
Пример #16
0
        public static ComponentDesign DefaultMissileTube(Game game, Entity faction)
        {
            if (_missileTube != null)
            {
                return(_missileTube);
            }
            ComponentDesigner   tubeDesigner;
            ComponentTemplateSD tubeSD = game.StaticData.ComponentTemplates[new Guid("978DFA9E-411E-4B4F-A618-85D642927503")];

            tubeDesigner      = new ComponentDesigner(tubeSD, faction.GetDataBlob <FactionTechDB>());
            tubeDesigner.Name = "MissileTube 500";
            _missileTube      = tubeDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_missileTube.TechID);
            return(_missileTube);
        }
Пример #17
0
        public static ComponentDesign LargeFuelTank(Game game, Entity faction)
        {
            if (_fuelTank_2500 != null)
            {
                return(_fuelTank_2500);
            }
            ComponentDesigner   fuelTankDesigner;
            ComponentTemplateSD tankSD = game.StaticData.ComponentTemplates[new Guid("3528600E-3A1C-488C-BAE6-60251D1156AB")];

            fuelTankDesigner = new ComponentDesigner(tankSD, faction.GetDataBlob <FactionTechDB>());
            fuelTankDesigner.ComponentDesignAttributes["Tank Volume"].SetValueFromInput(2500);
            fuelTankDesigner.Name = "Tank-1200t";
            _fuelTank_2500        = fuelTankDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_fuelTank_2500.TechID);
            return(_fuelTank_2500);
        }
Пример #18
0
        public static ComponentDesign DefaultFuelTank(Game game, Entity faction)
        {
            if (_fuelTank_500 != null)
            {
                return(_fuelTank_500);
            }
            ComponentDesigner   fuelTankDesigner;
            ComponentTemplateSD tankSD = game.StaticData.ComponentTemplates[new Guid("E7AC4187-58E4-458B-9AEA-C3E07FC993CB")];

            fuelTankDesigner = new ComponentDesigner(tankSD, faction.GetDataBlob <FactionTechDB>());
            fuelTankDesigner.ComponentDesignAttributes["Tank Size"].SetValueFromInput(2500);
            fuelTankDesigner.Name = "Tank-500";
            _fuelTank_500         = fuelTankDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_fuelTank_500.TechID);
            return(_fuelTank_500);
        }
Пример #19
0
        public static Entity FacPassiveSensor(Game game, Entity faction)
        {
            ComponentDesign     sensor;
            ComponentTemplateSD template = NameLookup.GetTemplateSD(game, "PassiveSensor");

            sensor = GenericComponentFactory.StaticToDesign(template, faction.GetDataBlob <FactionTechDB>(), game.StaticData);
            sensor.ComponentDesignAttributes[0].SetValueFromInput(5000); //size
            sensor.ComponentDesignAttributes[1].SetValueFromInput(500);  //best wavelength
            sensor.ComponentDesignAttributes[2].SetValueFromInput(1000); //wavelength detection width
            //[3] best detection magnatude. (Not settable)
            //[4] worst detection magnatude (not settable)
            sensor.ComponentDesignAttributes[5].SetValueFromInput(5);    //resolution
            sensor.ComponentDesignAttributes[6].SetValueFromInput(3600); //Scan Time
            sensor.Name = "PassiveSensor-S500";
            return(GenericComponentFactory.DesignToDesignEntity(game, faction, sensor));
        }
Пример #20
0
        public void SaveToStaticData()
        {
            ComponentTemplateSD sd = new ComponentTemplateSD();

            sd.Name        = SelectedComponent.Name;
            sd.Description = SelectedComponent.Description;
            sd.ID          = Guid.Parse(SelectedComponent.ID);

            sd.MassFormula         = SelectedComponent.MassFormula;
            sd.HTKFormula          = SelectedComponent.HTKFormula;
            sd.CrewReqFormula      = SelectedComponent.CrewReqFormula;
            sd.ResourceCostFormula = new Dictionary <Guid, string>();
            foreach (var item in SelectedComponent.MineralCostFormula)
            {
                if (item.MineralFormula != null)
                {
                    sd.ResourceCostFormula.Add(item.Minerals.GetKey(), item.MineralFormula);
                }
            }
            sd.ResearchCostFormula   = SelectedComponent.ResearchCostFormula;
            sd.CreditCostFormula     = SelectedComponent.CreditCostFormula;
            sd.BuildPointCostFormula = SelectedComponent.BuildPointCostFormula;
            sd.MountType             = ComponentMountType.None;
            foreach (KeyValuePair <ComponentMountType, bool?> mountTypePair in SelectedComponent.MountType)
            {
                if (mountTypePair.Value != null && mountTypePair.Value == true)
                {
                    sd.MountType = sd.MountType | mountTypePair.Key;
                }
            }

            sd.ComponentAbilitySDs = new List <ComponentTemplateAbilitySD>();
            foreach (var item in ComponentAbilitySDs)
            {
                sd.ComponentAbilitySDs.Add(item.CreateSD());
            }

            if (_staticData.ComponentTemplates.Keys.Contains(sd.ID))
            {
                _staticData.ComponentTemplates[sd.ID] = sd;
            }
            else
            {
                _staticData.ComponentTemplates.Add(sd.ID, sd);
            }
        }
Пример #21
0
        public static ComponentDesign DefaultMissileSRB(Game game, Entity faction)
        {
            if (_missileSRB != null)
            {
                return(_missileSRB);
            }
            ComponentDesigner   srbDesigner;
            ComponentTemplateSD srbSD = game.StaticData.ComponentTemplates[new Guid("9FDB2A15-4413-40A9-9229-19D05B3765FE")];

            srbDesigner = new ComponentDesigner(srbSD, faction.GetDataBlob <FactionTechDB>());
            srbDesigner.ComponentDesignAttributes["Engine Mass"].SetValueFromInput(10);

            srbDesigner.Name = "SRB 235";
            _missileSRB      = srbDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_missileSRB.TechID);
            return(_missileSRB);
        }
Пример #22
0
        public static ComponentDesign ShipSmallOrdnanceStore(Game game, Entity faction)
        {
            if (_ordnanceStore != null)
            {
                return(_ordnanceStore);
            }
            ComponentDesigner   cargoComponent;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{11564F56-D52C-4A16-8434-C9BB50D8EB95}")];

            cargoComponent = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            cargoComponent.ComponentDesignAttributes["Rack Size"].SetValueFromInput(2627); //5t component
            cargoComponent.ComponentDesignAttributes["Cargo Transfer Rate"].SetValueFromInput(100);
            cargoComponent.ComponentDesignAttributes["Transfer Range"].SetValueFromInput(100);
            cargoComponent.Name = "OrdinanceRack-2.5t";
            _ordnanceStore      = cargoComponent.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_ordnanceStore.TechID);
            return(_ordnanceStore);
        }
Пример #23
0
        public static ComponentDesign ShipSmallCargo(Game game, Entity faction)
        {
            if (_cargoCompartment != null)
            {
                return(_cargoCompartment);
            }
            ComponentDesigner   cargoComponent;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{B8239721-B60E-4C11-8E45-5F64F6BA5FA5}")];

            cargoComponent = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            cargoComponent.ComponentDesignAttributes["Warehouse Size"].SetValueFromInput(1000); //5t component
            cargoComponent.ComponentDesignAttributes["Cargo Transfer Rate"].SetValueFromInput(500);
            cargoComponent.ComponentDesignAttributes["Transfer Range"].SetValueFromInput(100);
            cargoComponent.Name = "CargoComponent1t";
            _cargoCompartment   = cargoComponent.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_cargoCompartment.TechID);
            return(_cargoCompartment);
        }
Пример #24
0
        public static ComponentDesign ShipDefaultCargoHold(Game game, Entity faction)
        {
            if (_cargoHold != null)
            {
                return(_cargoHold);
            }
            ComponentDesigner   cargoComponent;
            ComponentTemplateSD template = game.StaticData.ComponentTemplates[new Guid("{30cd60f8-1de3-4faa-acba-0933eb84c199}")];

            cargoComponent = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            cargoComponent.ComponentDesignAttributes["Warehouse Size"].SetValueFromInput(5000); //5t component
            cargoComponent.ComponentDesignAttributes["Cargo Transfer Rate"].SetValueFromInput(500);
            cargoComponent.ComponentDesignAttributes["Transfer Range"].SetValueFromInput(100);
            cargoComponent.Name = "CargoComponent5t";
            _cargoHold          = cargoComponent.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_cargoHold.TechID);
            return(_cargoHold);
        }
Пример #25
0
        public static ComponentDesign DefaultSimpleLaser(Game game, Entity faction)
        {
            if (_laser != null)
            {
                return(_laser);
            }
            ComponentDesigner   laserDesigner;
            ComponentTemplateSD laserSD = game.StaticData.ComponentTemplates[new Guid("8923f0e1-1143-4926-a0c8-66b6c7969425")];

            laserDesigner = new ComponentDesigner(laserSD, faction.GetDataBlob <FactionTechDB>());
            laserDesigner.ComponentDesignAttributes["Range"].SetValueFromInput(100);
            laserDesigner.ComponentDesignAttributes["Damage"].SetValueFromInput(5000);
            laserDesigner.ComponentDesignAttributes["ReloadRate"].SetValueFromInput(5);

            _laser = laserDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_laser.TechID);
            return(_laser);
        }
Пример #26
0
        public static ComponentDesign FacPassiveSensor(Game game, Entity faction)
        {
            ComponentDesigner   sensorDesigner;
            ComponentTemplateSD template = NameLookup.GetTemplateSD(game, "PassiveSensor");

            sensorDesigner = new ComponentDesigner(template, faction.GetDataBlob <FactionTechDB>());
            sensorDesigner.ComponentDesignAttributes["Sensor Size"].SetValueFromInput(5000);                //size
            sensorDesigner.ComponentDesignAttributes["Ideal Detection Wavelength"].SetValueFromInput(500);  //best wavelength
            sensorDesigner.ComponentDesignAttributes["Detection Wavelength Width"].SetValueFromInput(1000); //wavelength detection width
            //[3] best detection magnatude. (Not settable)
            //[4] worst detection magnatude (not setta[ble)
            sensorDesigner.ComponentDesignAttributes["Resolution"].SetValueFromInput(5);   //resolution
            sensorDesigner.ComponentDesignAttributes["Scan Time"].SetValueFromInput(3600); //Scan Time
            sensorDesigner.Name = "PassiveSensor-S500";
            //return sensor.CreateDesign(faction);
            _sensorInstalation = sensorDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_sensorInstalation.TechID);
            return(_sensorInstalation);
        }
Пример #27
0
        public static ComponentDesign DefaultBFC(Game game, Entity faction)
        {
            if (_fireControl != null)
            {
                return(_fireControl);
            }
            ComponentDesigner   fireControlDesigner;
            ComponentTemplateSD bfcSD = game.StaticData.ComponentTemplates[new Guid("33fcd1f5-80ab-4bac-97be-dbcae19ab1a0")];

            fireControlDesigner = new ComponentDesigner(bfcSD, faction.GetDataBlob <FactionTechDB>());
            fireControlDesigner.ComponentDesignAttributes["Range"].SetValueFromInput(100);
            fireControlDesigner.ComponentDesignAttributes["Tracking Speed"].SetValueFromInput(5000);
            fireControlDesigner.ComponentDesignAttributes["Size vs Range"].SetValueFromInput(1);

            //return fireControlDesigner.CreateDesign(faction);
            _fireControl = fireControlDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_fireControl.TechID);
            return(_fireControl);
        }
Пример #28
0
        public static ComponentDesign DefaultMissileSensors(Game game, Entity faction)
        {
            if (_missileSuite != null)
            {
                return(_missileSuite);
            }
            ComponentDesigner   suiteDesigner;
            ComponentTemplateSD srbSD = game.StaticData.ComponentTemplates[new Guid("BBC29A72-C4D3-4389-94DE-36C3BE3B7B0E")];

            suiteDesigner = new ComponentDesigner(srbSD, faction.GetDataBlob <FactionTechDB>());
            suiteDesigner.ComponentDesignAttributes["Guidance Type"].SetValueFromInput(2);
            suiteDesigner.ComponentDesignAttributes["Antenna Size"].SetValueFromInput(10);
            suiteDesigner.ComponentDesignAttributes["Ideal Detection Wavelength"].SetValueFromInput(470);
            suiteDesigner.ComponentDesignAttributes["Detection Bandwidth"].SetValueFromInput(2);
            suiteDesigner.ComponentDesignAttributes["Resolution"].SetValueFromInput(1);
            suiteDesigner.Name = "Passive Yellow 1MP ";
            _missileSuite      = suiteDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_missileSuite.TechID);
            return(_missileSuite);
        }
Пример #29
0
        public static ComponentDesign DefaultWarpDesign(Game game, Entity faction)
        {
            if (_warpDrive != null)
            {
                return(_warpDrive);
            }

            ComponentDesigner engineDesigner;

            ComponentTemplateSD engineSD = game.StaticData.ComponentTemplates[new Guid("7d0b867f-e239-4b93-9b30-c6d4b769b5e4")];

            engineDesigner = new ComponentDesigner(engineSD, faction.GetDataBlob <FactionTechDB>());
            engineDesigner.ComponentDesignAttributes["Mass"].SetValueFromInput(1000); //size 500 = 2500 power
            engineDesigner.Name = "Alcuberi-White 500";
            //engineDesignDB.ComponentDesignAbilities[1].SetValueFromInput

            _warpDrive = engineDesigner.CreateDesign(faction);

            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_warpDrive.TechID);
            return(_warpDrive);
        }
Пример #30
0
        public static ComponentDesign DefaultFragPayload(Game game, Entity faction)
        {
            if (_payload != null)
            {
                return(_payload);
            }
            ComponentDesigner   payloadDesigner;
            ComponentTemplateSD payloadSD = game.StaticData.ComponentTemplates[new Guid("DF9954A7-C5C5-4B49-965C-446B483DA2BE")];

            payloadDesigner = new ComponentDesigner(payloadSD, faction.GetDataBlob <FactionTechDB>());
            payloadDesigner.ComponentDesignAttributes["Trigger Type"].SetValueFromInput(2);
            payloadDesigner.ComponentDesignAttributes["Payload Type"].SetValueFromInput(0);
            payloadDesigner.ComponentDesignAttributes["Explosive Mass"].SetValueFromInput(2);
            payloadDesigner.ComponentDesignAttributes["Frag Mass"].SetValueFromInput(0.1);
            payloadDesigner.ComponentDesignAttributes["Frag Count"].SetValueFromInput(30);
            payloadDesigner.ComponentDesignAttributes["Frag Cone Angle"].SetValueFromInput(180);
            payloadDesigner.Name = "ProxFrag 5kg";
            _payload             = payloadDesigner.CreateDesign(faction);
            faction.GetDataBlob <FactionTechDB>().IncrementLevel(_payload.TechID);
            return(_payload);
        }