Upload from upload_mods.ps1
This commit is contained in:
59
Harmony/Harmony_XUiC_CraftingInfoWindow.cs
Normal file
59
Harmony/Harmony_XUiC_CraftingInfoWindow.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
namespace Harmony.XUiC_CraftingInfoWindowPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(XUiC_CraftingInfoWindow))]
|
||||
[HarmonyPatch("GetBindingValue")]
|
||||
public class GetBindingValuePatch
|
||||
{
|
||||
public static void Postfix(XUiC_CraftingInfoWindow __instance, ref string value, string bindingName)
|
||||
{
|
||||
if (bindingName == "durabilitytext")
|
||||
{
|
||||
if (__instance.recipe != null && __instance.recipe.GetOutputItemClass().ShowQualityBar)
|
||||
{
|
||||
if (__instance.recipe.GetName() == "meleeToolAxeT1IronFireaxe" || __instance.recipe.GetName() == "meleeToolAxeT2SteelAxe")
|
||||
{
|
||||
if (__instance.selectedCraftingTier > 5)
|
||||
{
|
||||
__instance.selectedCraftingTier = 5;
|
||||
}
|
||||
value = __instance.durabilitytextFormatter.Format(__instance.selectedCraftingTier);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bindingName == "durabilitycolor")
|
||||
{
|
||||
if (__instance.recipe != null && __instance.recipe.GetOutputItemClass().ShowQualityBar)
|
||||
{
|
||||
if (__instance.recipe.GetName() == "meleeToolAxeT1IronFireaxe" || __instance.recipe.GetName() == "meleeToolAxeT2SteelAxe")
|
||||
{
|
||||
int craftingTier = __instance.selectedCraftingTier;
|
||||
|
||||
if (__instance.selectedCraftingTier > 5)
|
||||
{
|
||||
craftingTier = 5;
|
||||
}
|
||||
|
||||
Color32 _v1_1 = (Color32)Color.white;
|
||||
_v1_1 = (Color32)QualityInfo.GetTierColor(craftingTier);
|
||||
value = __instance.durabilitycolorFormatter.Format(_v1_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bindingName == "enableaddquality")
|
||||
{
|
||||
if (__instance.recipe != null && __instance.recipe.GetOutputItemClass().ShowQualityBar)
|
||||
{
|
||||
if (__instance.recipe.GetName() == "meleeToolAxeT1IronFireaxe" || __instance.recipe.GetName() == "meleeToolAxeT2SteelAxe")
|
||||
{
|
||||
int craftingTier = __instance.selectedCraftingTier;
|
||||
|
||||
if (__instance.selectedCraftingTier == 5)
|
||||
{
|
||||
value = "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user