예제 #1
0
        private static void AddFreighter(string haul, string displayName, string description, int index, int baseModelIndex, bool jump)
        {
            string name    = displayName + (jump ? "JumpFreighter" : "Freighter") + index.ToString();
            string display = displayName + " " + (jump ? Resources.JumpFreighterBaseName : Resources.FreighterBaseName) + " " + index.ToString();

            ShipTemplate template = TemplateDatabase.AddShip(name);

            template.SetName(display);
            template.SetDescription(description);
            template.SetClass("Corvette", "Freighter");
            template.SetModel("transport_" + baseModelIndex.ToString() + "_" + index.ToString());
            template.SetRadarTrace("radartrace_smallstation.png");
            template.SetHull(150);
            template.SetShields(new float[] { 50, 50 });
            template.SetSpeed(60 - 5 * index, 6, 10);
            if (jump)
            {
                template.SetJumpDrive();
                template.SetJumpRanges(2000, 40000);
            }
        }
예제 #2
0
        private static void LoadJumpCarrier()
        {
            ShipTemplate template = TemplateDatabase.AddShip("JumpCarrier");

            template.SetName(Resources.Corvette_JumpCarrierName);
            template.SetDescription(Resources.Corvette_JumpCarrierDescription);
            template.SetClass("Corvette", "Freighter");
            template.SetModel("transport_4_2");
            template.SetRadarTrace("radar_transport.png");
            template.SetHull(100);
            template.SetShields(new float[] { 50, 50 });
            template.SetSpeed(50, 6, 10);
            template.SetJumpDrive();
            template.SetJumpRanges(5000, 100 * 50000);

            for (int i = 0; i < 20; i++)
            {
                ShipTemplate.DockingPortInfo port = new ShipTemplate.DockingPortInfo();
                port.Legacy  = true;
                port.MaxSize = DockingClasses.Medium;
                template.DockingPorts.Add(port);
            }
        }