using SMLHelper.V2.Assets; using SMLHelper.V2.Craf...
# copy-paste-dump
y
using SMLHelper.V2.Assets; using SMLHelper.V2.Crafting; using SMLHelper.V2.Utility; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEngine; using UnityEngine.UI; namespace MoreBatteriesBepinEx.Batteries { internal class AdvancedLithiumBattery : Equipable { public AdvancedLithiumBattery() : base("batterylithiumadvanced","Advanced Lithium Battery","Uses lithium micro-ions to produce energy") { this.OnFinishedPatching = (Spawnable.PatchEvent)Delegate.Combine(this.OnFinishedPatching, new Spawnable.PatchEvent(delegate () { AdvancedLithiumBattery.techType = base.TechType; })); } public override IEnumerator GetGameObjectAsync(IOut gameObject) { CoroutineTask task = CraftData.GetPrefabForTechTypeAsync(TechType.Battery, true); yield return task; GameObject OgPrefab = task.GetResult(); GameObject ResPrefab = UnityEngine.Object.Instantiate(OgPrefab); MeshRenderer renderer= ResPrefab.GetComponentInChildren(); battery = ResPrefab.GetComponentInChildren(); battery._capacity = 750; renderer.material.mainTexture = advancedLithiumTexture; gameObject.Set(ResPrefab); yield break; } protected override TechData GetBlueprintRecipe() { return new TechData() { Ingredients = new List { new Ingredient(LithiumIonBattery.techType, 1), new Ingredient(TechType.PrecursorIonBattery, 1), new Ingredient(TechType.AluminumOxide, 1), new Ingredient(TechType.AdvancedWiringKit, 1) }, craftAmount = 1 }; } protected override Atlas.Sprite Get()