Example #1
0
        static Options()
        {
            FileInfo file = new FileInfo("settings");

            Compiler = new CompilerOptions();
            Editor   = new EditorOptions();
            General  = new GeneralOptions();
            Run      = new RunOptions();
            if (file.Exists)
            {
                CreatedNew = false;
                Stream stream = file.OpenRead();
                try
                {
                    BinaryFormatter formatter = new BinaryFormatter();
                    Compiler = (CompilerOptions)formatter.Deserialize(stream);
                    Editor   = (EditorOptions)formatter.Deserialize(stream);
                    General  = (GeneralOptions)formatter.Deserialize(stream);
                    Run      = (RunOptions)formatter.Deserialize(stream);
                }
                catch (Exception)
                {
                }
                finally
                {
                    stream.Close();
                }
            }
            else
            {
                CreatedNew = true;
            }
        }
Example #2
0
        public DirectionControllerRing(EditorOptions options, ItemOptions itemOptions, ShipPartDNA dna, IContainer energyTanks, Thruster[] thrusters, ImpulseEngine[] impulseEngines)
            : base(options, dna, itemOptions.DirectionController_Damage.HitpointMin, itemOptions.DirectionController_Damage.HitpointSlope, itemOptions.DirectionController_Damage.Damage)
        {
            _itemOptions    = itemOptions;
            _energyTanks    = energyTanks;
            _thrusters      = thrusters;
            _impulseEngines = impulseEngines;

            Design = new DirectionControllerRingDesign(options, true);
            Design.SetDNA(dna);

            GetMass(out _mass, out _volume, out double radius, out _scaleActual, dna, itemOptions, true);
            Radius = radius;

            #region neurons

            double area = Math.Pow(radius, itemOptions.DirectionController_Ring_NeuronGrowthExponent);

            int neuronCount = Convert.ToInt32(Math.Ceiling(itemOptions.DirectionController_Ring_NeuronDensity_Half * area));
            if (neuronCount == 0)
            {
                neuronCount = 1;
            }

            _neuronsLinear   = NeuralUtility.CreateNeuronShell_Ring(1, neuronCount);
            _neuronsRotation = NeuralUtility.CreateNeuronShell_Line(1);

            _neurons = _neuronsLinear.Neurons.
                       Concat(_neuronsRotation.Neurons).
                       ToArray();

            #endregion
        }
Example #3
0
        private void UpdateOptionsFromPolicy()
        {
            if (policyContainer == null)
            {
                ClearOptionValue(DefaultOptions.ConvertTabsToSpacesOptionName);
                ClearOptionValue(DefaultOptions.TabSizeOptionName);
                ClearOptionValue(DefaultOptions.IndentSizeOptionName);
                ClearOptionValue(DefaultOptions.NewLineCharacterOptionName);
                ClearOptionValue(DefaultOptions.TrimTrailingWhiteSpaceOptionName);
#if !WINDOWS
                EditorOptions.ClearOptionValue(DefaultTextViewOptions.VerticalRulersName);
#endif

                return;
            }

            var mimeTypes     = IdeServices.DesktopService.GetMimeTypeInheritanceChain(MimeType);
            var currentPolicy = policyContainer.Get <TextStylePolicy> (mimeTypes);

            SetOptionValue(DefaultOptions.ConvertTabsToSpacesOptionName, currentPolicy.TabsToSpaces);
            SetOptionValue(DefaultOptions.TabSizeOptionName, currentPolicy.TabWidth);
            SetOptionValue(DefaultOptions.IndentSizeOptionName, currentPolicy.IndentWidth);
            SetOptionValue(DefaultOptions.NewLineCharacterOptionName, currentPolicy.GetEolMarker());
            SetOptionValue(DefaultOptions.TrimTrailingWhiteSpaceOptionName, currentPolicy.RemoveTrailingWhitespace);

#if !WINDOWS
            EditorOptions.SetOptionValue(
                DefaultTextViewOptions.VerticalRulersName,
                PropertyService.Get <bool> ("ShowRuler") ? new [] { currentPolicy.FileWidth } : Array.Empty <int> ());
#endif
        }
Example #4
0
 public ConverterRadiationToEnergyToolItem(EditorOptions options, SolarPanelShape shape)
     : base(options)
 {
     this.Shape   = shape;
     this.TabName = PartToolItemBase.TAB_SHIPPART;
     _visual2D    = PartToolItemBase.GetVisual2D(this.Name, this.Description, options, this);
 }
Example #5
0
        private void OnEditorOptionsChanged(EditorOptions options)
        {
            if (options.Interface.OutputLogTimestampsFormat == _timestampsFormats &&
                options.Interface.OutputLogShowLogType == _showLogType &&
                _output.DefaultStyle.Font == options.Interface.OutputLogTextFont &&
                _output.DefaultStyle.Color == options.Interface.OutputLogTextColor &&
                _output.DefaultStyle.ShadowColor == options.Interface.OutputLogTextShadowColor &&
                _output.DefaultStyle.ShadowOffset == options.Interface.OutputLogTextShadowOffset)
            {
                return;
            }

            _output.DefaultStyle = new TextBlockStyle
            {
                Font                    = options.Interface.OutputLogTextFont,
                Color                   = options.Interface.OutputLogTextColor,
                ShadowColor             = options.Interface.OutputLogTextShadowColor,
                ShadowOffset            = options.Interface.OutputLogTextShadowOffset,
                BackgroundSelectedBrush = new SolidColorBrush(Style.Current.BackgroundSelected),
            };
            _output.WarningStyle       = _output.DefaultStyle;
            _output.WarningStyle.Color = Color.Yellow;
            _output.ErrorStyle         = _output.DefaultStyle;
            _output.ErrorStyle.Color   = Color.Red;

            _timestampsFormats = options.Interface.OutputLogTimestampsFormat;
            _showLogType       = options.Interface.OutputLogShowLogType;

            Refresh();
        }
Example #6
0
 public void Initialize()
 {
     _tokenizer             = new Tokenizer();
     _tokenizedBufferEntity = new Entity <LinkedList <Token> >();
     _clojureSmartIndent    = new ClojureSmartIndent(_tokenizedBufferEntity);
     _defaultOptions        = new EditorOptions(4);
 }
        public static Dictionary <string, bool> GetPluginsKeyValue(string Preset, EditorOptions EditorOptions, string SearchPatterns = "XX.mconfig")
        {
            Dictionary <string, bool> _Plugins = GetPluginsBySearchPatterns(SearchPatterns);

            switch (Preset)
            {
            case "Basic":
                _Plugins = _Plugins.Where(k => EditorOptions.BasicPlugins.Contains(k.Key)).ToDictionary(u => u.Key, u => u.Value);
                break;

            case "Standard":
                _Plugins = _Plugins.Where(k => EditorOptions.StandardPlugins.Contains(k.Key)).ToDictionary(u => u.Key, u => u.Value);
                break;

            case "Full":
                _Plugins = _Plugins.Where(k => EditorOptions.FullPlugins.Contains(k.Key)).ToDictionary(u => u.Key, u => u.Value);
                break;

            case "Minimal":
                _Plugins = _Plugins.Where(k => EditorOptions.MinimalPlugins.Contains(k.Key)).ToDictionary(u => u.Key, u => u.Value);
                break;

            default:
                break;
            }
            return(_Plugins.OrderBy(o => o.Key).ToDictionary(u => u.Key, u => u.Value));
        }
Example #8
0
        //NOTE: It's ok to pass in the base dna type.  If the derived is passed in, those settings will be used
        public CameraHardCoded(EditorOptions options, ItemOptions itemOptions, ShipPartDNA dna, IContainer energyTanks, Map map)
            : base(options, dna, itemOptions.Camera_Damage.HitpointMin, itemOptions.Camera_Damage.HitpointSlope, itemOptions.Camera_Damage.Damage)
        {
            _itemOptions = itemOptions;
            _energyTanks = energyTanks;
            _map         = map;

            this.Design = new CameraHardCodedDesign(options, true);
            this.Design.SetDNA(dna);

            double radius;

            CameraColorRGB.GetMass(out _mass, out _volume, out radius, dna, itemOptions);

            this.Radius  = radius;
            _scaleActual = new Vector3D(radius * 2d, radius * 2d, radius * 2d);

            //TODO: design should have stored custom stuff if the dna has it.  Get/Set
            var neuronResults = CreateNeurons(dna, itemOptions);

            _neuronPoints = neuronResults.Item1;
            _neuronSets   = neuronResults.Item2;
            _neurons      = neuronResults.Item2.
                            SelectMany(o => o).
                            ToArray();
            _neuronMaxRadius = _neurons.Max(o => o.PositionLength);
        }
Example #9
0
        public ConverterRadiationToEnergy(EditorOptions options, ItemOptions itemOptions, ConverterRadiationToEnergyDNA dna, IContainer energyTanks, RadiationField radiationField)
            : base(options, dna, itemOptions.SolarPanel_Damage.HitpointMin, itemOptions.SolarPanel_Damage.HitpointSlope, itemOptions.SolarPanel_Damage.Damage)
        {
            _itemOptions    = itemOptions;
            _energyTanks    = energyTanks;
            _radiationField = radiationField;

            this.Design = new ConverterRadiationToEnergyDesign(options, true, dna.Shape);
            this.Design.SetDNA(dna);

            this.ClarityPercent_Front = 1d;
            this.ClarityPercent_Back  = 1d;

            Point3D  center;
            Vector3D normal;

            GetStats(out _mass, out center, out normal, out _scaleActual);

            // Store the center and normals
            Transform3DGroup transform = new Transform3DGroup();

            transform.Children.Add(new RotateTransform3D(new QuaternionRotation3D(dna.Orientation)));
            transform.Children.Add(new TranslateTransform3D(dna.Position.ToVector()));

            _centerPoint = transform.Transform(center);
            _normalFront = transform.Transform(normal);
            _normalBack  = transform.Transform(normal * -1d);
        }
Example #10
0
 public ImpulseEngineToolItem(EditorOptions options, ImpulseEngineType engineType)
     : base(options)
 {
     _engineType = engineType;
     TabName     = PartToolItemBase.TAB_SHIPPART;
     _visual2D   = PartToolItemBase.GetVisual2D(Name, Description, options, this);
 }
Example #11
0
 public EditorOptions(short sliderLevel, int rotationLevel, EditorOptions editorOps, OutputMod outMode, ManulpilationMod manulpilationMod)
 {
     EditorSliderLevel = sliderLevel;
     OutputMod         = outMode;
     ManulpilationMod  = manulpilationMod;
     RotationLevel     = rotationLevel;
     EditorOps         = editorOps;
 }
        public dynamic SaveProfile(int profileid, string profileName, string uid, EditorOptions EditorOptions)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>
            {
                { "uid", uid }
            };

            return(EditorConfigFactory.SaveProfile(PortalSettings, ActiveModule, profileid, profileName, EditorOptions, parameters));
        }
		EditorOptionsFactoryService([ImportMany] IEnumerable<EditorOptionDefinition> editorOptionDefinitions) {
			this.editorOptionDefinitions = new Dictionary<string, EditorOptionDefinition>();
			foreach (var o in editorOptionDefinitions) {
				Debug.Assert(!this.editorOptionDefinitions.ContainsKey(o.Name));
				this.editorOptionDefinitions[o.Name] = o;
			}
			GlobalOptions = new EditorOptions(this, null, null);
			GlobalOptions.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStylesConstants.DefaultValue);
		}
Example #14
0
 private void buttonResetLights_Click(object sender, EventArgs e)
 {
     switch (MessageBox.Show(this, "This will reset editor lights to default values. Continue?", "Editor Options Editor", MessageBoxButtons.YesNo))
     {
     case DialogResult.Yes:
         EditorOptions.ResetDefaultLights();
         UpdateLightsUI();
         break;
     }
 }
Example #15
0
 public EditShipTransfer(Player player, SpaceDockPanel spaceDock, Editor editor, EditorOptions editorOptions, World world, int material_Ship, Map map, ShipExtraArgs shipExtra)
 {
     _player        = player;
     _spaceDock     = spaceDock;
     _editor        = editor;
     _editorOptions = editorOptions;
     _world         = world;
     _material_Ship = material_Ship;
     _map           = map;
     _shipExtra     = shipExtra;
 }
        public dynamic GetNewProfile()
        {
            EditorOptions EditorOptions = new EditorOptions();

            EditorOptions.Plugins = EditorConfigFactory.GetPluginsKeyValue("FullCustom", EditorOptions);
            dynamic result = new ExpandoObject();

            result.EditorOptions = EditorConfigFactory.GetEditorOptions(EditorConfigFactory.GetHTMLEditorProfiles(ActiveModule.PortalID), 0);
            result.FullPlugins   = EditorOptions.Plugins.ToDictionary(u => u.Key, u => false);
            return(result);
        }
        internal static EditorOptions GetEditorOptions(List <HTMLEditor_Profile> hTMLEditorProfiles, int ProfileID)
        {
            EditorOptions      result  = null;
            HTMLEditor_Profile profile = hTMLEditorProfiles.Where(p => p.ProfileID == ProfileID).SingleOrDefault();

            if (profile != null)
            {
                result = DotNetNuke.Common.Utilities.Json.Deserialize <EditorOptions>(profile.Value);
            }

            return(result);
        }
Example #18
0
 private string GetIndent(EditorOptions editorOptions)
 {
     if (_dataStructureStack.Count == 0)
     {
         return("");
     }
     if (_dataStructureStack.Peek().Type == TokenType.ListStart)
     {
         return(" ".Repeat(editorOptions.IndentSize + _indentStack.Peek() - 1));
     }
     return(" ".Repeat(_indentStack.Peek()));
 }
        public GherkinHighlightingDefinition(EditorOptions options)
            : base("Gherkin")
        {
            AddSpan(Gherkin.CommentExpression, @"$", options.CommentFontOptions);
            AddSpan(Gherkin.TagExpression, @"$", options.TagFontOptions);
            AddSpan(@"<", @">", options.ParametersFontOptions);
            var stringsColor = options.StringsFontOptions.ToHighlightingColor();

            AddSpan(@"""", @"""", stringsColor);
            AddSpan(@"'", @"'", stringsColor);
            AddRule(Gherkin.FunctionExpression, options.FeatureKeywordFontOptions);
            AddRule(Gherkin.ReservedExpression, options.StepKeywordFontOptions);
            AddRule(@"(?<=\|)([^\|]*?)(?=\|)", options.TableFontOptions);
        }
Example #20
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
            Direct3D d3d = new Direct3D();

            d3ddevice = new Device(d3d, 0, DeviceType.Hardware, panel1.Handle, CreateFlags.HardwareVertexProcessing,
                                   new PresentParameters
            {
                Windowed               = true,
                SwapEffect             = SwapEffect.Discard,
                EnableAutoDepthStencil = true,
                AutoDepthStencilFormat = Format.D24X8
            });

            EditorOptions.Initialize(d3ddevice);
            EditorOptions.OverrideLighting   = true;
            EditorOptions.RenderDrawDistance = 10000;
            optionsEditor              = new EditorOptionsEditor(cam);
            optionsEditor.FormUpdated += optionsEditor_FormUpdated;
            optionsEditor.CustomizeKeybindsCommand    += CustomizeControls;
            optionsEditor.ResetDefaultKeybindsCommand += () =>
            {
                actionList.ActionKeyMappings.Clear();

                foreach (ActionKeyMapping keymapping in DefaultActionList.DefaultActionMapping)
                {
                    actionList.ActionKeyMappings.Add(keymapping);
                }

                actionInputCollector.SetActions(actionList.ActionKeyMappings.ToArray());
            };

            actionList = ActionMappingList.Load(Path.Combine(Application.StartupPath, "keybinds.ini"),
                                                DefaultActionList.DefaultActionMapping);

            actionInputCollector = new ActionInputCollector();
            actionInputCollector.SetActions(actionList.ActionKeyMappings.ToArray());
            actionInputCollector.OnActionStart   += ActionInputCollector_OnActionStart;
            actionInputCollector.OnActionRelease += ActionInputCollector_OnActionRelease;

            cammodel = new ModelFile(Properties.Resources.camera).Model;
            cammodel.Attach.ProcessVertexData();
            cammesh = cammodel.Attach.CreateD3DMesh();

            if (Program.Arguments.Length > 0)
            {
                LoadFile(Program.Arguments[0]);
            }
        }
Example #21
0
        public EditorOptionsView(EditorOptions options)
        {
            InitializeComponent();

            btnOk.Text     = Strings.OkButtonText;
            btnCancel.Text = Strings.CancelButtonText;

            //ParentForm.AcceptButton = btnOk;
            //ParentForm.CancelButton = btnCancel;

            cbxFontFamily.DataSource = Fonts.SystemFontFamilies.Select(f => f.Source).ToList();
            cbxFontSize.DataSource   = Enumerable.Range(6, 18).Select(i => string.Format("{0}pt", i)).ToList();

            SetEditorOptions(options);
        }
Example #22
0
        public ShieldTractor(EditorOptions options, ItemOptions itemOptions, ShipPartDNA dna, IContainer plasma)
            : base(options, dna, itemOptions.Shield_Damage.HitpointMin, itemOptions.Shield_Damage.HitpointSlope, itemOptions.Shield_Damage.Damage)
        {
            _itemOptions = itemOptions;
            _plasma      = plasma;

            this.Design = new ShieldTractorDesign(options, true);
            this.Design.SetDNA(dna);

            double volume, radius;

            ShieldEnergy.GetMass(out _mass, out volume, out radius, out _scaleActual, dna, itemOptions);

            //this.Radius = radius;
        }
Example #23
0
        private async void MyEditor_ControlLoaded(object sender, EventArgs e)
        {
            var displayOptions  = DisplayOptions.CreateOptions();
            var editorOptions   = EditorOptions.CreateOptions();
            var languageOptions = await EditorLanguageOptions.GetDefaultEnOptionsAsync();

            editorOptions.Theme = "";
            await MyEditor.Initialize("# Hello Markdown!", displayOptions, editorOptions, "", languageOptions);

            var cssFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/acrmd.css"));

            string css = await FileIO.ReadTextAsync(cssFile);

            await MyEditor.SetPreviewStyle(css);
        }
        public static Dictionary <string, bool> GetPluginsKeyValueSaved(int ProfileID)
        {
            Dictionary <string, bool> result             = new Dictionary <string, bool>();
            HTMLEditor_Profile        HTMLEditor_Profile = HTMLEditor_Profile.Query("where ProfileID=@0", ProfileID).SingleOrDefault();

            if (HTMLEditor_Profile != null)
            {
                EditorOptions editorOptions = DotNetNuke.Common.Utilities.Json.Deserialize <EditorOptions>(HTMLEditor_Profile.Value);
                if (editorOptions != null)
                {
                    result = editorOptions.Plugins.OrderBy(o => o.Key).ToDictionary(u => u.Key, u => u.Value);
                }
            }
            return(result);
        }
Example #25
0
        private static DesignPart CreateDesignPart(ShipPartDNA dna, EditorOptions options)
        {
            DesignPart retVal = new DesignPart(options)
            {
                Part2D = null,      // setting 2D to null will tell the editor that the part can't be resized or copied, only moved around
                Part3D = BotConstructor.GetPartDesign(dna, options, false),
            };

            ModelVisual3D visual = new ModelVisual3D();

            visual.Content = retVal.Part3D.Model;
            retVal.Model   = visual;

            return(retVal);
        }
Example #26
0
        public SensorGravity(EditorOptions options, ItemOptions itemOptions, ShipPartDNA dna, IContainer energyTanks, IGravityField field)
            : base(options, dna, itemOptions.Sensor_Damage.HitpointMin, itemOptions.Sensor_Damage.HitpointSlope, itemOptions.Sensor_Damage.Damage)
        {
            _itemOptions = itemOptions;
            _energyTanks = energyTanks;
            _field       = field;

            Design = new SensorGravityDesign(options, true);
            Design.SetDNA(dna);

            GetMass(out _mass, out _volume, out double radius, out _scaleActual, dna, itemOptions);
            Radius = radius;

            _neurons         = CreateNeurons(dna, itemOptions, itemOptions.GravitySensor_NeuronDensity);
            _neuronMaxRadius = _neurons.Max(o => o.PositionLength);
        }
Example #27
0
        public Cargo_ShipPart(ShipPartDNA dna, ItemOptions options, EditorOptions editorOptions)
            : base(CargoType.ShipPart)
        {
            PartDesignBase part = BotConstructor.GetPartDesign(dna, editorOptions, true);

            //TODO: This is really ineficient, let design calculate it for real
            //TODO: Volume and Mass should be calculated by the design class (add to PartBase interface)
            var aabb = Math3D.GetAABB(UtilityWPF.GetPointsFromMesh(part.Model));

            this.Volume = (aabb.Item2.X - aabb.Item1.X) * (aabb.Item2.Y - aabb.Item1.Y) * (aabb.Item2.Y - aabb.Item1.Y);

            //TODO: Let the design class return this (expose a property called DryDensity)
            this.Density = Math1D.Avg(options.Thruster_Density, options.Sensor_Density);

            this.PartDNA = dna;
        }
Example #28
0
 private void SetEditorOptions(EditorOptions value)
 {
     cbxFontFamily.SelectedItem           = value.FontFamily;
     cbxFontSize.SelectedItem             = value.FontSize;
     focFontOptions.FontOptions           = value.FontOptions;
     focCommentOptions.FontOptions        = value.CommentFontOptions;
     focTagOptions.FontOptions            = value.TagFontOptions;
     focParametersOptions.FontOptions     = value.ParametersFontOptions;
     focStringsOptions.FontOptions        = value.StringsFontOptions;
     focTableOptions.FontOptions          = value.TableFontOptions;
     focFeatureKeywordOptions.FontOptions = value.FeatureKeywordFontOptions;
     focStepKeywordOptions.FontOptions    = value.StepKeywordFontOptions;
     chkWordWrap.Checked           = value.WordWrap;
     chkDisplayLineNumbers.Checked = value.DisplayLineNumbers;
     chkDisplaySymbols.Checked     = value.DisplaySymbols;
 }
Example #29
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
            d3ddevice = new Device(new SharpDX.Direct3D9.Direct3D(), 0, DeviceType.Hardware, panel1.Handle, CreateFlags.HardwareVertexProcessing, new PresentParameters[] { new PresentParameters()
                                                                                                                                                                            {
                                                                                                                                                                                Windowed = true, SwapEffect = SwapEffect.Discard, EnableAutoDepthStencil = true, AutoDepthStencilFormat = Format.D24X8
                                                                                                                                                                            } });
            EditorOptions.Initialize(d3ddevice);
            Gizmo.InitGizmo(d3ddevice);
            if (Program.Arguments.Length > 0)
            {
                LoadFile(Program.Arguments[0]);
            }

            LevelData.StateChanged += LevelData_StateChanged;
            panel1.MouseWheel      += panel1_MouseWheel;
        }
Example #30
0
 /// <summary>
 /// Editor options
 /// </summary>
 /// <param name="options">Options</param>
 public void SaveEditorOptions(EditorOptions options)
 {
     //var bs = BlogSettings.Instance;
     //if (options.OptionType == "Post")
     //{
     //    bs.PostOptionsSlug = options.ShowSlug;
     //    bs.PostOptionsDescription = options.ShowDescription;
     //    bs.PostOptionsCustomFields = options.ShowCustomFields;
     //}
     //if (options.OptionType == "Page")
     //{
     //    bs.PageOptionsSlug = options.ShowSlug;
     //    bs.PageOptionsDescription = options.ShowDescription;
     //    bs.PageOptionsCustomFields = options.ShowCustomFields;
     //}
     //bs.Save();
 }
Example #31
0
        /// <summary>
        /// NOTE: It's assumed that energyTanks and fuelTanks are actually container groups holding the actual tanks, but it
        /// could be the tanks passed in directly
        /// </summary>
        public ConverterEnergyToFuel(EditorOptions options, ItemOptions itemOptions, ShipPartDNA dna, IContainer energyTanks, IContainer fuelTanks)
            : base(options, dna, itemOptions.EnergyConverter_Damage.HitpointMin, itemOptions.EnergyConverter_Damage.HitpointSlope, itemOptions.EnergyConverter_Damage.Damage)
        {
            _itemOptions = itemOptions;

            this.Design = new ConverterEnergyToFuelDesign(options, true);
            this.Design.SetDNA(dna);

            double volume = GetVolume(out _scaleActual, dna);

            if (energyTanks != null && fuelTanks != null)
            {
                _converter = new Converter(energyTanks, fuelTanks, itemOptions.EnergyToFuel_ConversionRate, itemOptions.EnergyToFuel_AmountToDraw * volume);
            }

            _mass = volume * itemOptions.EnergyToFuel_Density;
        }