internal static void Postfix(BlueprintDisplayItem __instance, BlueprintItem bpi) { //If the blueprint produces a tinder plug if (bpi?.m_CraftedResult?.name == TINDER_NAME) { //Change the crafting audio to our added sound bpi.m_CraftingAudio = SOUND_NAME; //This is the name of the EVENT I created in WWise } }
internal static void Postfix(BlueprintDisplayItem __instance, BlueprintItem bpi) { if (bpi?.m_CraftedResult?.name == SCRAP_METAL_NAME) { Texture2D scrapMetalTexture = Utils.GetCachedTexture(SCRAP_METAL_CRAFTING_ICON_NAME); if (!scrapMetalTexture) { scrapMetalTexture = TinCanImprovementsMod.assetBundle.LoadAsset(SCRAP_METAL_CRAFTING_ICON_NAME).Cast <Texture2D>(); Utils.CacheTexture(SCRAP_METAL_CRAFTING_ICON_NAME, scrapMetalTexture); } __instance.m_Icon.mTexture = scrapMetalTexture; } }