internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi) { if (bpi?.m_CraftedResult?.name == SCRAP_METAL_NAME && __instance.m_CurrentCategory == Panel_Crafting.Category.Tools) { __result = true; } }
internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi) { if (bpi?.m_CraftedResult?.name == "GEAR_FlintAndSteel" && __instance.m_CurrentCategory == Panel_Crafting.Category.FireStarting) { __result = true; } }
private static void Postfix(Panel_Crafting __instance) { __instance.m_SelectedDescription.color = WhiteColor; var bpi = __instance.m_SelectedBPI; if (!bpi) { return; } if (!bpi.m_CraftedResult) { return; } if (!MendingHelper.IsClothing(bpi)) { return; } var mendingLevel = MendingHelper.GetCurrentMendingLevel(); var requiredMendingLevel = MendingHelper.GetRequiredMendingLevel(bpi); if (mendingLevel < requiredMendingLevel) { __instance.m_SelectedDescription.text = "REQUIRES MENDING LEVEL " + requiredMendingLevel; __instance.m_SelectedDescription.color = RedColor; } }
internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi) { if (bpi?.m_CraftedResult?.name == "GEAR_ScrapMetal" && __instance.m_CurrentCategory == Panel_Crafting.Category.Tools) { __result = true; } }
internal static void Postfix(Panel_Crafting __instance, BlueprintItem bpi) { if (bpi?.m_CraftedResult?.name == "GEAR_GunpowderCan") { bpi.m_RequiredCraftingLocation = CraftingLocation.Workbench; } }
private static void Postfix(Panel_Crafting __instance) { //__instance.m_SelectedDescription.color = whiteColor; BlueprintItem bpi = __instance.m_SelectedBPI; if (bpi) { if (bpi.m_CraftedResult == GetGearItemPrefab("GEAR_ArrowShaft") && bpi.m_RequiredGear[0] == GetGearItemPrefab("GEAR_Hardwood")) { int currentArcherySkill = GameManager.GetSkillArchery().GetCurrentTierNumber() + 1; int requiredArcherySkill = Settings.options.craftArrowFromWoodLevel; if (currentArcherySkill < requiredArcherySkill) { __instance.m_SelectedDescription.text = "Required Archery skill " + requiredArcherySkill.ToString(); __instance.m_SelectedDescription.color = redColor; } } if (bpi.m_CraftedResult == GetGearItemPrefab("GEAR_Arrow") && bpi.m_RequiredGear[1] == GetGearItemPrefab("GEAR_BarkTinder")) { int currentArcherySkill = GameManager.GetSkillArchery().GetCurrentTierNumber() + 1; int requiredArcherySkill = Settings.options.craftFletchingFromBarkLevel; if (currentArcherySkill < requiredArcherySkill) { __instance.m_SelectedDescription.text = "Required Archery skill " + requiredArcherySkill.ToString(); __instance.m_SelectedDescription.color = redColor; } } } }
internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi) { if (__instance.m_CurrentCategory == Panel_Crafting.Category.Tools) { if (bpi?.m_CraftedResult?.name == BEDROLL_NAME || bpi?.m_CraftedResult?.name == BLANKET_NAME) { __result = true; } } }
private static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi) { if (bpi?.m_CraftedResult?.name == "GEAR_Arrow") { if (Settings.options.arrowUseLine && bpi.m_RequiredGear.Count == 3) { __result = false; } if (bpi.m_RequiredGear[1] == GetGearItemPrefab("GEAR_BarkTinder")) { bpi.m_DurationMinutes = (Settings.options.arrowCraftTime + Settings.options.craftFletchingFromBarkTime) * 2; } else { bpi.m_DurationMinutes = Settings.options.arrowCraftTime; } } else if (bpi?.m_CraftedResult?.name == "GEAR_ArrowHead") { // for mods that override result count, like ForgeBlueprintsMod int resMulti = bpi.m_CraftedResultCount / 2; bpi.m_DurationMinutes = Settings.options.arrowHeadCraftTime * resMulti; } }
public static void Prefix(Panel_Crafting __instance) { Debug.LogFormat("Panel_Crafting::StartCrafting"); __instance.m_CraftingTimeSeconds = actionTime; }
private static void Prefix(Panel_Crafting __instance) { GearItem gearItem = __instance.GetSelectedTool()?.GetComponent <GearItem>(); Implementation.SplitStack(gearItem); }