Exemplo n.º 1
0
 override public void AddToTable(ShipHullTable table)
 {
     table.ship["LENR"]["mount_MAX"].IntValue     = mount_MAX;
     table.ship["LENR"]["total_ALLOWED"].IntValue = total_ALLOWED;
     table.ship["LENR"]["sys1_EB"].IntValue       = sys1_EB;
     table.ship["LENR"]["sys1_quad"].IntValue     = sys1_quad;
 }
Exemplo n.º 2
0
 public AccessoriesManager(ShipHullTable table)
 {
     Seats    = new List <Seat>();
     Speakers = new List <Speaker>();
     GetSeats(table);
     GetSpeakers(table);
 }
Exemplo n.º 3
0
 override public void AddToTable(ShipHullTable table)
 {
     table.ship["RMS"]["hardmounted_TOTAL"].IntValue = hardmounted_TOTAL;
     table.ship["RMS"]["sys1_JOINTtotal"].IntValue   = sys1_JOINTtotal;
     table.ship["RMS"]["sys1_EB"].IntValue           = sys1_EB;
     table.ship["RMS"]["sys1_quad"].IntValue         = sys1_quad;
 }
Exemplo n.º 4
0
 public LENR(ShipHullTable table)
 {
     mount_MAX     = table.ship["LENR"]["mount_MAX"].IntValue;
     total_ALLOWED = table.ship["LENR"]["total_ALLOWED"].IntValue;
     sys1_EB       = table.ship["LENR"]["sys1_EB"].IntValue;
     sys1_quad     = table.ship["LENR"]["sys1_quad"].IntValue;
 }
Exemplo n.º 5
0
        public void GetFromTable(ShipHullTable table)
        {
            name            = table.ship["Name"].Value;
            uiName          = table.ship["UIName"].Value;
            description     = table.ship["Desc"].Value;
            shipClass       = table.ship["Class"].Value;
            sizeClass       = table.ship["SIZEclass"].Value;
            msrpPrice       = table.ship["MSRPPrice"].Value;
            cargoVolume     = table.ship["CARGOvolume"].Value;
            mass            = table.ship["Mass"].Value;
            expectedLife    = table.ship["ExpectedLife"].Value;
            meanDRAGcoef    = table.ship["meanDRAGcoef"].DoubleValue;
            pwrRequired     = table.ship["PWRrequired"].Value;
            sysInitTime     = table.ship["SYSinitTIME"].Value;
            pwrStart        = table.ship["PWRstart"].Value;
            basicDimensions = new Vec3(table.ship["BasicDimensions"]["l"].Value,
                                       table.ship["BasicDimensions"]["h"].Value,
                                       table.ship["BasicDimensions"]["w"].Value);
            hull_REFLECTIVITY   = table.ship["hull_REFLECTIVITY"].Value;
            volumeInterior      = table.ship["VOLUMEinterior"].Value;
            surfaceAreaExterior = table.ship["SURFACEAREAexterior"].Value;
            cabinInsPercentage  = table.ship["CabinINSpercentage"].Value;
            interiorAvailable   = table.ship["InteriorAvailable"].Value > 0.5;
            playerSTART         = new Vec3(table.ship["playerSTART"]);

            emergencylight    = new Color(table.ship["color_EMERlight"]);
            asCockpit         = table.ship["AsCockpit"].Value > 0.5;
            landingSkids      = table.ship["LandingSkids"].Value > 0.5;
            pilot_MFD         = table.ship["pilot_MFD"].Value;
            pilot_CAW         = table.ship["pilot_CAW"].Value;
            pilot_VMS         = table.ship["pilot_VMS"].Value;
            pilot_CONTROLS    = table.ship["pilot_CONTROLS"].Value;
            pilot_INSTRUMENTS = table.ship["pilot_INSTRUMENTS"].Value;
        }
Exemplo n.º 6
0
 public void AddToTable(ShipHullTable table)
 {
     table.ship["Name"].Value                 = name;
     table.ship["UIName"].Value               = uiName;
     table.ship["Desc"].Value                 = description;
     table.ship["Class"].Value                = shipClass;
     table.ship["SIZEclass"].Value            = sizeClass;
     table.ship["MSRPPrice"].Value            = msrpPrice;
     table.ship["CARGOvolume"].Value          = cargoVolume;
     table.ship["Mass"].Value                 = mass;
     table.ship["ExpectedLife"].Value         = expectedLife;
     table.ship["meanDRAGcoef"].Value         = meanDRAGcoef;
     table.ship["PWRrequired"].Value          = pwrRequired;
     table.ship["SYSinitTIME"].Value          = sysInitTime;
     table.ship["PWRstart"].Value             = pwrStart;
     table.ship["BasicDimensions"]["l"].Value = basicDimensions.x;
     table.ship["BasicDimensions"]["h"].Value = basicDimensions.y;
     table.ship["BasicDimensions"]["w"].Value = basicDimensions.z;
     table.ship["hull_REFLECTIVITY"].Value    = hull_REFLECTIVITY;
     table.ship["VOLUMEinterior"].Value       = volumeInterior;
     table.ship["SURFACEAREAexterior"].Value  = surfaceAreaExterior;
     table.ship["CabinINSpercentage"].Value   = cabinInsPercentage;
     table.ship["InteriorAvailable"].Value    = interiorAvailable?1:0;
     table.ship["playerSTART"]                = playerSTART.ToTable();
     table.ship["color_EMERlight"]            = emergencylight.ToTable();
     table.ship["AsCockpit"].Value            = asCockpit ? 1 : 0;
     table.ship["LandingSkids"].Value         = landingSkids ? 1 : 0;
     table.ship["pilot_MFD"].Value            = pilot_MFD;
     table.ship["pilot_CAW"].Value            = pilot_CAW;
     table.ship["pilot_VMS"].Value            = pilot_VMS;
     table.ship["pilot_CONTROLS"].Value       = pilot_CONTROLS;
     table.ship["pilot_INSTRUMENTS"].Value    = pilot_INSTRUMENTS;
 }
Exemplo n.º 7
0
 public RMS(ShipHullTable table)
 {
     hardmounted_TOTAL = table.ship["RMS"]["hardmounted_TOTAL"].IntValue;
     sys1_JOINTtotal   = table.ship["RMS"]["sys1_JOINTtotal"].IntValue;
     sys1_EB           = table.ship["RMS"]["sys1_EB"].IntValue;
     sys1_quad         = table.ship["RMS"]["sys1_quad"].IntValue;
 }
Exemplo n.º 8
0
        public void Save()
        {
            ShipHullTable table = _ship.ToShipTable();
            string        path  = Appli.Instance.Settings.RogueSysemFileRoot + "/Mod/RogSysCM/Ships/";

            File.WriteAllText(path + _ship.name + ".ROG", table.ToString());
        }
Exemplo n.º 9
0
 override public void AddToTable(ShipHullTable table)
 {
     table.ship["CSSM"]["mount_MAX"].IntValue          = mount_MAX;
     table.ship["CSSM"]["sys_EB"].IntValue             = sys_EB;
     table.ship["CSSM"]["sys_quad"].IntValue           = sys_quad;
     table.ship["CSSM"]["cargo_BAYS"].IntValue         = cargo_BAYS;
     table.ship["CSSM"]["cargo_RADSattached"].IntValue = cargo_RADSattached;
 }
Exemplo n.º 10
0
 public CSSM(ShipHullTable table)
 {
     mount_MAX          = table.ship["CSSM"]["mount_MAX"].IntValue;
     sys_EB             = table.ship["CSSM"]["sys_EB"].IntValue;
     sys_quad           = table.ship["CSSM"]["sys_quad"].IntValue;
     cargo_BAYS         = table.ship["CSSM"]["cargo_BAYS"].IntValue;
     cargo_RADSattached = table.ship["CSSM"]["cargo_RADSattached"].IntValue;
 }
Exemplo n.º 11
0
 public override void AddToTable(ShipHullTable table)
 {
     table.shipCameras["Total"].Value = cameras.Count;
     for (int i = 0; i < cameras.Count; i++)
     {
         table.shipCameras["Camera" + (i + 1)] = cameras.ElementAt(i).ToTable();
     }
 }
Exemplo n.º 12
0
 override public void AddToTable(ShipHullTable table)
 {
     table.ship["COMM"]["mount_MAX"].IntValue = mount_MAX;
     table.ship["COMM"]["sys1_EB"].IntValue   = sys1_EB;
     table.ship["COMM"]["sys1_quad"].IntValue = sys1_quad;
     table.ship["COMM"]["sys2_EB"].IntValue   = sys2_EB;
     table.ship["COMM"]["sys2_quad"].IntValue = sys2_quad;
 }
Exemplo n.º 13
0
 public COMM(ShipHullTable table)
 {
     mount_MAX = table.ship["COMM"]["mount_MAX"].IntValue;
     sys1_EB   = table.ship["COMM"]["sys1_EB"].IntValue;
     sys1_quad = table.ship["COMM"]["sys1_quad"].IntValue;
     sys2_EB   = table.ship["COMM"]["sys2_EB"].IntValue;
     sys2_quad = table.ship["COMM"]["sys2_quad"].IntValue;
 }
Exemplo n.º 14
0
        private void AddSpeakers(ShipHullTable table)
        {
            int i = 1;

            foreach (Speaker speaker in Speakers)
            {
                table.shipCoords["iSPEAKERS"]["speaker" + i] = speaker.ToTable();
            }
        }
Exemplo n.º 15
0
        private void GetSeats(ShipHullTable table)
        {
            int i = 1;

            while (table.shipCoords["SEAT" + i].Count > 0)
            {
                Seats.Add(new Seat(table.shipCoords["SEAT" + i]));
                i++;
            }
        }
Exemplo n.º 16
0
        override public void AddToTable(ShipHullTable table)
        {
            int i = 1;

            foreach (RCSThruster thruster in thrusters)
            {
                table.shipCoords["Thruster" + i] = thruster.ToTable();
                i++;
            }
        }
Exemplo n.º 17
0
        private void GetSpeakers(ShipHullTable table)
        {
            int i = 1;

            while (table.shipCoords["iSPEAKERS"]["speaker" + i].Count > 0)
            {
                Speakers.Add(new Speaker(table.shipCoords["iSPEAKERS"]["speaker" + i]));
                i++;
            }
        }
Exemplo n.º 18
0
        public RCS(ShipHullTable table)
        {
            thrusters = new List <RCSThruster>();
            int i = 1;

            while (table.shipCoords["Thruster" + i].Count > 0)
            {
                thrusters.Add(new RCSThruster(table.shipCoords["Thruster" + i]));
                i++;
            }
        }
Exemplo n.º 19
0
        public CameraManager(ShipHullTable table)
        {
            cameras = new List <Camera>();
            int i = 1;

            while (table.shipCameras["Camera" + i].Count > 0)
            {
                cameras.Add(new Camera(table.shipCameras["Camera" + i]));
                i++;
            }
        }
Exemplo n.º 20
0
        private void AddSeats(ShipHullTable table)
        {
            table.ship["totalSEATS"].Value = Speakers.Count;
            int i = 1;

            foreach (Seat seat in Seats)
            {
                table.shipCoords["SEAT" + i] = seat.ToTable();
                i++;
            }
        }
Exemplo n.º 21
0
        override public void AddToTable(ShipHullTable ship)
        {
            ship.ship["MES"]["mount_MAX"].IntValue     = mount_MAX;
            ship.ship["MES"]["total_ALLOWED"].IntValue = total_ALLOWED;
            ship.ship["MES"]["sys1_EB"].IntValue       = sys1_EB;
            ship.ship["MES"]["sys1_quad"].IntValue     = sys1_quad;

            int i = 1;

            foreach (MESEngine mesEngine in engines)
            {
                ship.shipCoords["MES" + i] = mesEngine.ToTable();
                i++;
            }
        }
Exemplo n.º 22
0
        override public void AddToTable(ShipHullTable table)
        {
            table.ship["MTS"]["mount_MAX"].IntValue = mount_MAX;
            table.ship["MTS"]["nozzle_SIZE"].Value  = nozzle_SIZE;
            table.ship["MTS"]["Controller1_LOC"]    = controller.ToTable();

            table.shipCoords["MTSlocation"]          = mtsLocation.ToTable();
            table.shipCoords["noz_BOOSTtotal"].Value = boosters.Count;
            int i = 1;

            foreach (MTSBooster mtsBooster in boosters)
            {
                table.shipCoords["booster" + i] = mtsBooster.ToTable();
                i++;
            }
        }
Exemplo n.º 23
0
        public MES(ShipHullTable ship)
        {
            engines       = new List <MESEngine>();
            mount_MAX     = ship.ship["MES"]["mount_MAX"].IntValue;
            total_ALLOWED = ship.ship["MES"]["total_ALLOWED"].IntValue;
            sys1_EB       = ship.ship["MES"]["sys1_EB"].IntValue;
            sys1_quad     = ship.ship["MES"]["sys1_quad"].IntValue;

            int i = 1;

            while (ship.shipCoords["MES" + i].Count > 0)
            {
                engines.Add(new MESEngine(ship.shipCoords["MES" + i]));
                i++;
            }
        }
Exemplo n.º 24
0
 private void ViewShipHull(string shipHullName)
 {
     try
     {
         ShipName = shipHullName;
         string            content           = File.ReadAllText(Settings.RogueSysemFileRoot + "/Mod/RogSysCM/Ships/" + shipHullName + ".ROG");
         ShipHullTable     shipHullTable     = new ShipHullTable(shipHullName, content);
         ShipHull          shipHull          = new ShipHull(shipHullTable);
         ShipHullViewModel shipHullViewModel = new ShipHullViewModel(shipHull);
         CurrentViewModel = shipHullViewModel;
     }
     catch (FileNotFoundException e)
     {
         MessageBox.Show("Cannot found the ship file !");
     }
 }
Exemplo n.º 25
0
 public TMS(ShipHullTable table)
 {
     mount_MAX              = table.ship["TMS"]["mount_MAX"].IntValue;
     sys_EB                 = table.ship["TMS"]["sys_EB"].IntValue;
     sys_quad               = table.ship["TMS"]["sys_quad"].IntValue;
     heatpipe_TOTAL         = table.ship["TMS"]["heatpipe_TOTAL"].IntValue;
     heatpipe_SURFACEvolume = table.ship["TMS"]["heatpipe_SURFACEvolume"].Value;
     coolLoopTOTAL          = table.ship["TMS"]["COOLloopTOTAL"].IntValue;
     coolAreaMIN            = table.ship["TMS"]["COOLareaMIN"].Value;
     coolAreaMAX            = table.ship["TMS"]["COOLareaMAX"].Value;
     coolAreaREFLECT        = table.ship["TMS"]["COOLareaREFLECT"].Value;
     coolLevelMAX           = table.ship["TMS"]["COOLlevelMAX"].Value;
     coolPsiMAX             = table.ship["TMS"]["COOLpsiMAX"].Value;
     coolCoolant            = table.ship["TMS"]["COOLcoolant"].Value;
     coolTankCAP            = table.ship["TMS"]["COOLtankCAP"].Value;
     coolLinelength         = table.ship["TMS"]["COOLlinelength"].Value;
 }
Exemplo n.º 26
0
        public MTS(ShipHullTable table)
        {
            mount_MAX   = table.ship["MTS"]["mount_MAX"].IntValue;
            nozzle_SIZE = table.ship["MTS"]["nozzle_SIZE"].Value;
            mtsLocation = new Vec3(table.shipCoords["MTSlocation"]);

            controller = new MTSController(table.ship["MTS"]["Controller1_LOC"]);

            boosters = new List <MTSBooster>();
            int i = 1;

            while (table.shipCoords["booster" + i].Count > 0)
            {
                boosters.Add(new MTSBooster(table.shipCoords["booster" + i]));
                i++;
            }
        }
Exemplo n.º 27
0
        override public void AddToTable(ShipHullTable table)
        {
            table.ship["ECS_PWRpercent"].Value  = ecs_PWRpercent;
            table.ship["ECS_MASSpercent"].Value = ecs_MASSpercent;
            table.ship["ECS_SYStotal"].IntValue = ecs_SYStotal;
            table.ship["ECS_SYSAMPSmax"].Value  = ecs_SYSAMPSmax;
            table.ship["ECS_HVtotal"].IntValue  = ecs_HVtotal;
            table.ship["ECS_HVAMPSmax"].Value   = ecs_HVAMPSmax;
            table.ship["ECS_WPNtotal"].IntValue = ecs_WPNtotal;
            table.ship["ECS_WPNAMPSmax"].Value  = ecs_WPNAMPSmax;
            table.ship["ECS_RSRVAMPSmax"].Value = ecs_RSRVAMPSmax;
            table.ship["ECS_EMRGAMPSmax"].Value = ecs_EMRGAMPSmax;

            table.ship["ECS"]["mount_MAX"].IntValue = mount_MAX;
            table.ship["ECS"]["sys_EB"].IntValue    = sys_EB;
            table.ship["ECS"]["sys_quad"].IntValue  = sys_quad;
        }
Exemplo n.º 28
0
        public override void AddToTable(ShipHullTable table)
        {
            table.ship["totalATTACHMENTS"].Value = attachements.Count;
            int i = 1;

            foreach (Attachement attach in attachements)
            {
                table.shipCoords["AttachPoint" + i + "ObjPos"]         = attach.position.ToTable();
                table.shipCoords["AttachPoint" + i + "ObjRot"]         = attach.rotation.ToTable();
                table.shipCoords["AttachPoint" + i + "Size"].IntValue  = attach.size;
                table.shipCoords["AttachPoint" + i + "Name"].Value     = attach.name;
                table.shipCoords["AttachPoint" + i + "isTOWING"].Value = attach.isTowing ? 1 : 0;
                table.shipCoords["AttachPoint" + i + "swapXZ"].Value   = attach.swapXZ ? 1 : 0;
                table.shipCoords["AttachPoint" + i + "invertX"].Value  = attach.invertX ? -1 : 1; // 1 is usual, -1 is inverted
                i++;
            }
        }
Exemplo n.º 29
0
        public ShipHullTable ToShipTable()
        {
            ShipHullTable table = new ShipHullTable(name);

            table.shipInterior = interiorMeshes.ToTable();
            table.shipExterior = exteriorMeshes.ToTable();

            // Base Stuff
            this.AddToTable(table);

            // SubSystems
            foreach (Subsystem subsystem in subsystemsManager.subsystems)
            {
                subsystem.AddToTable(table);
            }
            return(table);
        }
Exemplo n.º 30
0
 override public void AddToTable(ShipHullTable table)
 {
     table.ship["TMS"]["mount_MAX"].IntValue           = mount_MAX;
     table.ship["TMS"]["sys_EB"].IntValue              = sys_EB;
     table.ship["TMS"]["sys_quad"].IntValue            = sys_quad;
     table.ship["TMS"]["heatpipe_TOTAL"].IntValue      = heatpipe_TOTAL;
     table.ship["TMS"]["heatpipe_SURFACEvolume"].Value = heatpipe_SURFACEvolume;
     table.ship["TMS"]["COOLloopTOTAL"].IntValue       = coolLoopTOTAL;
     table.ship["TMS"]["COOLareaMIN"].Value            = coolAreaMIN;
     table.ship["TMS"]["COOLareaMAX"].Value            = coolAreaMAX;
     table.ship["TMS"]["COOLareaREFLECT"].Value        = coolAreaREFLECT;
     table.ship["TMS"]["COOLlevelMAX"].Value           = coolLevelMAX;
     table.ship["TMS"]["COOLpsiMAX"].Value             = coolPsiMAX;
     table.ship["TMS"]["COOLcoolant"].Value            = coolCoolant;
     table.ship["TMS"]["COOLtankCAP"].Value            = coolTankCAP;
     table.ship["TMS"]["COOLlinelength"].Value         = coolLinelength;
 }