Exemple #1
0
        private void RegisterElements()
        {
            ElementUtils.RegisterElement(Element.Hydrogen,
                                         "Element #1\nVery flammable.",
                                         NoRecipe,
                                         1,
                                         item => {
                item.width    = 32;
                item.height   = 32;
                item.scale    = 0.5f;
                item.rare     = ItemRarityID.Blue;
                item.maxStack = 999;
                item.value    = 1;
            },
                                         ElementState.Gas,
                                         ElementFamily.None,
                                         TemperatureSystem.CelsiusToKelvin(-252.9f),
                                         TemperatureSystem.CelsiusToKelvin(-259.14f),
                                         Color.Orange,
                                         null //The Hydrogen modliquid when we add liquids
                                         );

            ElementUtils.RegisterElement(Element.Helium,
                                         "Element #2\nFloaty, floaty!\nInert, not very reactive",
                                         NoRecipe,
                                         1,
                                         item => {
                item.width    = 32;
                item.height   = 32;
                item.scale    = 0.5f;
                item.rare     = ItemRarityID.Blue;
                item.maxStack = 999;
                item.value    = 1;
            },
                                         ElementState.Gas,
                                         ElementFamily.NobleGases,
                                         TemperatureSystem.CelsiusToKelvin(-268.9f),
                                         TemperatureSystem.CelsiusToKelvin(-272.2f),
                                         Color.Wheat
                                         );

            ElementUtils.RegisterElement(Element.Lithium,
                                         $"Element #3\nVERY reactive!\n{WarningWaterExplode}",
                                         NoRecipe,
                                         1,
                                         item => {
                item.width    = 30;
                item.height   = 24;
                item.rare     = ItemRarityID.Blue;
                item.maxStack = 999;
                item.value    = 20;
            },
                                         ElementState.Solid,
                                         ElementFamily.AlkaliMetals,
                                         TemperatureSystem.CelsiusToKelvin(1330f),
                                         TemperatureSystem.CelsiusToKelvin(180.5f),
                                         isPlaceableBar: true
                                         );

            ElementUtils.RegisterElement(Element.Beryllium,
                                         $"Element #4\nFairly reactive\n{WarningWaterExplode}",
                                         NoRecipe,
                                         1,
                                         item => {
                item.width    = 30;
                item.height   = 24;
                item.rare     = ItemRarityID.Blue;
                item.maxStack = 999;
                item.value    = 20;
            },
                                         ElementState.Solid,
                                         ElementFamily.AlkalineEarthMetals,
                                         TemperatureSystem.CelsiusToKelvin(2970f),
                                         TemperatureSystem.CelsiusToKelvin(1287f),
                                         isPlaceableBar: true
                                         );

            // TODO: register Boron
            // TODO: register Carbon
            // TODO: register Nitrogen

            ElementUtils.RegisterElement(Element.Oxygen,
                                         "Element #8\nA breath of fresh air...",
                                         NoRecipe,
                                         1,
                                         item => {
                item.width    = 32;
                item.height   = 32;
                item.scale    = 0.5f;
                item.rare     = ItemRarityID.Blue;
                item.maxStack = 999;
                item.value    = 3;
            },
                                         ElementState.Gas,
                                         ElementFamily.Oxygen,
                                         TemperatureSystem.CelsiusToKelvin(-182.962f),
                                         TemperatureSystem.CelsiusToKelvin(-218.79f),
                                         Color.CornflowerBlue
                                         );
        }
Exemple #2
0
 private void RegisterCompounds()
 {
     //HYDROXIDES
     CompoundUtils.RegisterCompound(Compound.LithiumHydroxide,
                                    "LiOH\nA fine powder.",
                                    NoRecipe,
                                    1,
                                    item => {
         item.width    = 30;
         item.height   = 24;
         item.rare     = ItemRarityID.Blue;
         item.maxStack = 999;
         item.value    = 120;
     },
                                    ElementState.Solid,
                                    CompoundClassification.Hydroxide,
                                    TemperatureSystem.CelsiusToKelvin(924),
                                    TemperatureSystem.CelsiusToKelvin(462),
                                    c => {
         c.AddElement(Element.Lithium, 1);
         c.AddElement(Element.Oxygen, 1);
         c.AddElement(Element.Hydrogen, 1);
     });
     CompoundUtils.RegisterCompound(Compound.BerylliumHydroxide,
                                    "Be(OH)2\nAn unstable gel.\nSeems to dissolve easily in many things.",
                                    NoRecipe,
                                    1,
                                    item => {
         item.width    = 26;
         item.height   = 26;
         item.rare     = ItemRarityID.Blue;
         item.maxStack = 999;
         item.value    = 120;
     },
                                    ElementState.Solid,
                                    CompoundClassification.Hydroxide,
                                    -1f, //beryllium hydroxide isn't stable
                                    -1f,
                                    c => {
         c.AddElement(Element.Beryllium, 1);
         c.AddElement(Element.Oxygen, 2);
         c.AddElement(Element.Hydrogen, 2);
     });
     //OXIDES
     CompoundUtils.RegisterCompound(Compound.LithiumOxide,
                                    "Li2O\nA fine powder.\nUsed for many things.",
                                    NoRecipe,
                                    1,
                                    item => {
         item.width    = 30;
         item.height   = 24;
         item.rare     = ItemRarityID.Blue;
         item.maxStack = 999;
         item.value    = 120;
     },
                                    ElementState.Solid,
                                    CompoundClassification.Oxide,
                                    TemperatureSystem.CelsiusToKelvin(2600),
                                    TemperatureSystem.CelsiusToKelvin(1438),
                                    c => {
         c.AddElement(Element.Lithium, 2);
         c.AddElement(Element.Oxygen, 1);
     });
     CompoundUtils.RegisterCompound(Compound.BerylliumOxide,
                                    "BeO\nA weird powder with a high melting and boiling point",
                                    NoRecipe,
                                    1,
                                    item => {
         item.width    = 30;
         item.height   = 24;
         item.rare     = ItemRarityID.Blue;
         item.maxStack = 999;
         item.value    = 120;
     },
                                    ElementState.Solid,
                                    CompoundClassification.Oxide,
                                    TemperatureSystem.CelsiusToKelvin(3900),
                                    TemperatureSystem.CelsiusToKelvin(2507),
                                    c => {
         c.AddElement(Element.Beryllium, 1);
         c.AddElement(Element.Oxygen, 1);
     });
     //PEROXIDES
     CompoundUtils.RegisterCompound(Compound.LithiumPeroxide,
                                    "Li2O2\nA fine powder.\nUsed for many things.",
                                    NoRecipe,
                                    1,
                                    item => {
         item.width    = 30;
         item.height   = 24;
         item.rare     = ItemRarityID.Blue;
         item.maxStack = 999;
         item.value    = 120;
     },
                                    ElementState.Solid,
                                    CompoundClassification.Peroxide,
                                    -1f,
                                    TemperatureSystem.CelsiusToKelvin(340), //Decomposes to Li2O
                                    c => {
         c.AddElement(Element.Lithium, 2);
         c.AddElement(Element.Oxygen, 2);
     });
     //SUPEROXIDES
     CompoundUtils.RegisterCompound(Compound.LithiumSuperoxide,
                                    "LiO2\nThis shouldn't exist...",
                                    NoRecipe,
                                    1,
                                    item => {
         item.width    = 32;
         item.height   = 32;
         item.rare     = ItemRarityID.Blue;
         item.maxStack = 999;
         item.value    = 240;
     },
                                    ElementState.Solid,
                                    CompoundClassification.Superoxide,
                                    -1f,
                                    -1f,
                                    c => {
         c.AddElement(Element.Lithium, 1);
         c.AddElement(Element.Oxygen, 2);
     });
 }