Upload from upload_mods.ps1
This commit is contained in:
46
Harmony/Harmony_XUiC_EquipmentStack.cs
Normal file
46
Harmony/Harmony_XUiC_EquipmentStack.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using static Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetrics;
|
||||
|
||||
namespace Harmony.XUiC_EquipmentStackPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(XUiC_EquipmentStack))]
|
||||
[HarmonyPatch("Update")]
|
||||
public class UpdatePatch
|
||||
{
|
||||
public static void Postfix(XUiC_EquipmentStack __instance, float _dt)
|
||||
{
|
||||
if (RebirthUtilities.ScenarioSkip())
|
||||
{
|
||||
if (__instance.stackValue != null)
|
||||
{
|
||||
XUiV_Label viewComponent = (XUiV_Label)__instance.stackValue.ViewComponent;
|
||||
viewComponent.Text = "";
|
||||
|
||||
ItemValue itemValue = __instance.itemStack.itemValue;
|
||||
|
||||
XUiV_Sprite bonusTypeIconSprite = (XUiV_Sprite)__instance.GetChildById("bonusTypeIcon").ViewComponent;
|
||||
|
||||
if (itemValue != null &&
|
||||
itemValue.HasMetadata("bonus") &&
|
||||
itemValue.HasMetadata("level") &&
|
||||
itemValue.HasMetadata("type") &&
|
||||
itemValue.HasMetadata("active"))
|
||||
{
|
||||
bonusTypeIconSprite.SpriteName = "ui_game_symbol_" + (string)itemValue.GetMetadata("bonus");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!itemValue.IsMod)
|
||||
{
|
||||
bonusTypeIconSprite.SpriteName = "";
|
||||
}
|
||||
}
|
||||
|
||||
bonusTypeIconSprite.isDirty = true;
|
||||
|
||||
/*(__instance.lockTypeIcon.ViewComponent as XUiV_Sprite).SpriteName = "";
|
||||
(__instance.lockTypeIcon.ViewComponent as XUiV_Sprite).isDirty = true;*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user