Пример #1
0
 public CompoundItem(Compound name, string description, ElementState defaultState, CompoundClassification classification, Color gasColor, bool isPlaceableBar, ModLiquid liquid, float boilingPoint, float meltingPoint, Action <CompoundItem> elementsToAdd) : base(description, defaultState, gasColor, isPlaceableBar, liquid, boilingPoint, meltingPoint)
 {
     CompoundName   = name;
     Classification = classification;
     displayName    = CompoundUtils.CompoundName(name);
     elementsToAdd(this);
 }
Пример #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);
     });
 }