Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
fix for color and name of the buttons in new level traits
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmical committed Jun 3, 2021
1 parent 2a05ee5 commit 00d9feb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RogueLibsCore/Hooks/Unlocks/DisplayedUnlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private int GetStateNum()
/// <param name="normal">Disabled/not selected state.</param>
protected void UpdateButton(bool isEnabledOrSelected, UnlockButtonState selected, UnlockButtonState normal)
{
Text = GetName();
Text = GetFancyName();
if (IsUnlocked)
{
State = isEnabledOrSelected ? selected : normal;
Expand Down
5 changes: 2 additions & 3 deletions RogueLibsCore/Hooks/Unlocks/TraitUnlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ public override void OnPushedButton()
ScrollingMenu menu = ((CustomScrollingMenu)Menu).Menu;
if (menu.twitchCountdownOn) return;
State = UnlockButtonState.Selected;
if (gc.twitchMode || (gc.sessionDataBig.twitchOn && gc.sessionDataBig.twitchTraits))
{
UpdateMenu();
if (gc.twitchMode || gc.sessionDataBig.twitchOn && gc.sessionDataBig.twitchTraits)
gc.twitchFunctions.ShowWinner(Name, "StatusEffect", Menu.Agent.isPlayer);
}
if (Name == "EnduranceTrait")
{
Menu.Agent.SetEndurance(Menu.Agent.enduranceStatMod + 1, true);
Expand Down

0 comments on commit 00d9feb

Please sign in to comment.