public static void MainPatch() { var myBattery = new CbBattery { EnergyCapacity = 200, ID = "MyBatteryID", Name = "My Cool Battery", FlavorText = "Hey, I made a battery!", UnlocksWith = TechType.Lithium, CraftingMaterials = new List <TechType> { TechType.Lithium, TechType.Lithium, TechType.Titanium, TechType.Copper, TechType.WhiteMushroom } }; myBattery.Patch(); var myPowerCell = new CbPowerCell { EnergyCapacity = myBattery.EnergyCapacity * 2, ID = "MyBatteryID", Name = "My Cool Battery", FlavorText = "Hey, I made a power cell!", UnlocksWith = TechType.Lithium, CraftingMaterials = new List <TechType> { myBattery.TechType, myBattery.TechType, TechType.Silicone } }; myPowerCell.Patch(); }
private static void CreateAndPatchPacks() { Logger.Log(Logger.Level.Info, "Started Patching BioPlasma MK2"); var bioPlasma = new BioPlasma(); bioPlasma.Patch(); Logger.Log(Logger.Level.Info, "Finished Patching BioPlasma MK2"); var bioChemBattery = new CbBattery() { ID = "BioChemBatteryMK2", Name = "Biochemical Battery", FlavorText = "Alterra battery technology combined with a Warper power core makes for quite a potent renewable energy source.", EnergyCapacity = Config.BioChemBatteryEnergy, UnlocksWith = bioPlasma.TechType, CraftingMaterials = new List <TechType>() { bioPlasma.TechType, bioPlasma.TechType, TechType.Silver, TechType.Silver, TechType.Gold, TechType.Lead }, CustomIcon = new Atlas.Sprite(assetBundle.LoadAsset <Sprite>("BioChemBattery")), CBModelData = new CBModelData() { UseIonModelsAsBase = true, CustomTexture = assetBundle.LoadAsset <Texture2D>("BioChemBatteryskin"), CustomSpecMap = assetBundle.LoadAsset <Texture2D>("BioChemBatteryspec"), CustomIllumMap = assetBundle.LoadAsset <Texture2D>("BioChemBatteryillum"), }, }; bioChemBattery.Patch(); var bioChemCell = new CbPowerCell() { ID = "BioChemCellMK2", Name = "Biochemical Power Cell", FlavorText = "Alterra power cell technology combined with a Warper power core makes for quite a potent renewable energy source.", EnergyCapacity = Config.BioChemCellenergy, UnlocksWith = bioPlasma.TechType, CraftingMaterials = new List <TechType>() { bioChemBattery.TechType, bioChemBattery.TechType, TechType.Silicone }, CustomIcon = new Atlas.Sprite(assetBundle.LoadAsset <Sprite>("BioChemCell.png")), CBModelData = new CBModelData() { UseIonModelsAsBase = true, CustomTexture = assetBundle.LoadAsset <Texture2D>("BioChemCellskin"), CustomSpecMap = assetBundle.LoadAsset <Texture2D>("BioChemCellskin"), CustomIllumMap = assetBundle.LoadAsset <Texture2D>("BioChemCellillum") }, }; bioChemCell.Patch(); }
private static void CreateAndPatchPack() { var deepBattery = new CbBattery() { EnergyCapacity = Config.DeepBatteryEnergy, ID = "CBDeepBattery", Name = "Deep Battery", FlavorText = "A longer lasting battery created from rare materials and stronger chemicals.", CraftingMaterials = new List <TechType>() { TechType.WhiteMushroom, TechType.WhiteMushroom, TechType.Lithium, TechType.AluminumOxide, TechType.Magnetite }, UnlocksWith = TechType.WhiteMushroom, CustomIcon = ImageUtils.LoadSpriteFromFile(Path.Combine(AssetsFolder, "DeepBattery")), CBModelData = new CBModelData() { UseIonModelsAsBase = false, CustomTexture = assetBundle.LoadAsset <Texture2D>("DeepBatteryskin"), CustomSpecMap = assetBundle.LoadAsset <Texture2D>("DeepBatteryspec"), CustomIllumMap = assetBundle.LoadAsset <Texture2D>("DeepBatteryillum"), }, }; deepBattery.Patch(); var deepCell = new CbPowerCell() { EnergyCapacity = Config.DeepCellEnergy, ID = "CBDeepCell", Name = "Deep Power Cell", FlavorText = "A long lasting power cell created from rare materials and stronger chemicals.", UnlocksWith = deepBattery.TechType, CraftingMaterials = new List <TechType>() { deepBattery.TechType, deepBattery.TechType, TechType.Silicone }, CustomIcon = ImageUtils.LoadSpriteFromFile(Path.Combine(AssetsFolder, "DeepCell.png")), CBModelData = new CBModelData() { UseIonModelsAsBase = false, CustomTexture = assetBundle.LoadAsset <Texture2D>("DeepCellskin"), CustomSpecMap = assetBundle.LoadAsset <Texture2D>("DeepCellspec"), CustomIllumMap = assetBundle.LoadAsset <Texture2D>("DeepCellillum"), }, }; deepCell.Patch(); }