2022-03-21 12:12:50 +05:30
using StardewValley ;
2022-04-02 15:49:18 +05:30
using StardewValley.Characters ;
2022-01-03 19:22:45 +05:30
using StardewValley.Menus ;
2022-04-02 15:49:18 +05:30
using static StardewValley . Menus . CharacterCustomization ;
2022-01-03 19:22:45 +05:30
using static StardewValley . Menus . LoadGameMenu ;
namespace stardew_access.Patches
{
internal class TitleMenuPatches
{
private static int saveGameIndex = - 1 ;
private static bool isRunning = false ;
2022-05-30 22:34:54 +05:30
public static string characterCreationMenuQueryKey = " " ;
2022-06-06 22:38:51 +05:30
public static string advancedGameOptionsQueryKey = " " ;
2022-05-30 22:34:54 +05:30
public static string prevPetName = " " ;
2022-06-06 22:38:51 +05:30
internal static void AdvancedGameOptionsPatch ( AdvancedGameOptions __instance )
{
try
{
int currentItemIndex = Math . Max ( 0 , Math . Min ( __instance . options . Count - 7 , __instance . currentItemIndex ) ) ;
int x = Game1 . getMouseX ( true ) , y = Game1 . getMouseY ( true ) ;
2022-06-06 22:43:25 +05:30
if ( __instance . okButton ! = null & & __instance . okButton . containsPoint ( x , y ) )
{
string toSpeak = "OK Button" ;
if ( advancedGameOptionsQueryKey ! = toSpeak )
{
advancedGameOptionsQueryKey = toSpeak ;
MainClass . ScreenReader . Say ( toSpeak , true ) ;
}
return ;
}
2022-06-06 22:38:51 +05:30
for ( int i = 0 ; i < __instance . optionSlots . Count ; i + + )
{
if ( __instance . optionSlots [ i ] . bounds . Contains ( x , y ) & & currentItemIndex + i < __instance . options . Count & & __instance . options [ currentItemIndex + i ] . bounds . Contains ( x - __instance . optionSlots [ i ] . bounds . X , y - __instance . optionSlots [ i ] . bounds . Y ) )
{
OptionsElement optionsElement = __instance . options [ currentItemIndex + i ] ;
string toSpeak = optionsElement . label ;
if ( optionsElement is OptionsButton )
toSpeak = $" {toSpeak} Button" ;
else if ( optionsElement is OptionsCheckbox )
toSpeak = ( ( ( OptionsCheckbox ) optionsElement ) . isChecked ? "Enabled" : "Disabled" ) + $" {toSpeak} Checkbox" ;
else if ( optionsElement is OptionsDropDown )
toSpeak = $"{toSpeak} Dropdown, option {((OptionsDropDown)optionsElement).dropDownDisplayOptions[((OptionsDropDown)optionsElement).selectedOption]} selected" ;
else if ( optionsElement is OptionsSlider )
toSpeak = $"{((OptionsSlider)optionsElement).value}% {toSpeak} Slider" ;
else if ( optionsElement is OptionsPlusMinus )
toSpeak = $"{((OptionsPlusMinus)optionsElement).displayOptions[((OptionsPlusMinus)optionsElement).selected]} selected of {toSpeak}" ;
else if ( optionsElement is OptionsInputListener )
{
string buttons = "" ;
( ( OptionsInputListener ) optionsElement ) . buttonNames . ForEach ( name = > { buttons + = $", {name}" ; } ) ;
toSpeak = $"{toSpeak} is bound to {buttons}. Left click to change." ;
}
else if ( optionsElement is OptionsTextEntry )
{
toSpeak = $"Seed text box" ;
}
else
{
if ( toSpeak . Contains ( ":" ) )
toSpeak = toSpeak . Replace ( ":" , "" ) ;
toSpeak = $"{toSpeak} Options:" ;
}
if ( advancedGameOptionsQueryKey ! = toSpeak )
{
advancedGameOptionsQueryKey = toSpeak ;
MainClass . ScreenReader . Say ( toSpeak , true ) ;
}
return ;
}
}
}
catch ( Exception e )
{
MainClass . ErrorLog ( $"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}" ) ;
}
}
2022-01-03 19:22:45 +05:30
internal static void CoopMenuPatch ( CoopMenu __instance , CoopMenu . Tab ___currentTab )
{
try
{
2022-03-21 12:12:50 +05:30
int x = Game1 . getMouseX ( true ) , y = Game1 . getMouseY ( true ) ;
2022-01-03 19:22:45 +05:30
string toSpeak = " " ;
#region Join / Host Button ( Important ! This should be checked before checking other buttons )
if ( __instance . slotButtons [ 0 ] . containsPoint ( x , y ) )
{
if ( ___currentTab = = CoopMenu . Tab . JOIN_TAB )
toSpeak = "Join lan game" ;
if ( ___currentTab = = CoopMenu . Tab . HOST_TAB )
toSpeak = "Host new farm" ;
}
#endregion
#region Other Buttons
if ( __instance . joinTab . containsPoint ( x , y ) )
{
toSpeak = "Join Tab Button" ;
}
else if ( __instance . hostTab . containsPoint ( x , y ) )
{
toSpeak = "Host Tab Button" ;
}
else if ( __instance . refreshButton . containsPoint ( x , y ) )
{
toSpeak = "Refresh Button" ;
}
#endregion
if ( toSpeak ! = " " )
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithChecker ( toSpeak , true ) ;
2022-01-03 19:22:45 +05:30
}
catch ( Exception e )
{
2022-03-19 12:54:53 +05:30
MainClass . ErrorLog ( $"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}" ) ;
2022-01-03 19:22:45 +05:30
}
}
internal static void TitleMenuPatch ( TitleMenu __instance , bool ___isTransitioningButtons )
{
try
{
if ( ___isTransitioningButtons )
return ;
string toSpeak = "" ;
__instance . buttons . ForEach ( component = >
{
2022-03-21 12:12:50 +05:30
if ( component . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
2022-01-03 19:22:45 +05:30
{
string name = component . name ;
string label = component . label ;
toSpeak = $"{name} {label} Button" ;
}
} ) ;
2022-03-21 12:12:50 +05:30
if ( __instance . muteMusicButton . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
2022-01-03 19:22:45 +05:30
{
toSpeak = "Mute Music Button" ;
}
2022-03-21 12:12:50 +05:30
if ( __instance . aboutButton . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
2022-01-03 19:22:45 +05:30
{
toSpeak = "About Button" ;
}
2022-03-21 12:12:50 +05:30
if ( __instance . languageButton . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
2022-01-03 19:22:45 +05:30
{
toSpeak = "Language Button" ;
}
2022-03-21 12:12:50 +05:30
if ( __instance . windowedButton . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
2022-01-03 19:22:45 +05:30
{
2022-03-31 14:31:09 +05:30
toSpeak = "Fullscreen: " + ( ( Game1 . isFullscreen ) ? "enabled" : "disabled" ) ;
2022-01-03 19:22:45 +05:30
}
2022-03-21 12:12:50 +05:30
if ( TitleMenu . subMenu ! = null & & __instance . backButton . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
2022-01-03 19:22:45 +05:30
{
string text = "Back Button" ;
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithChecker ( text , true ) ;
2022-01-03 19:22:45 +05:30
}
2022-04-02 16:50:40 +05:30
// Fix for back button not working using keyboard
if ( TitleMenu . subMenu is CharacterCustomization & & ( ( CharacterCustomization ) TitleMenu . subMenu ) . backButton . containsPoint ( Game1 . getMouseX ( true ) , Game1 . getMouseY ( true ) ) )
{
// Perform Left Click
if ( MainClass . Config . LeftClickMainKey . JustPressed ( ) )
{
__instance . backButtonPressed ( ) ;
}
}
2022-01-03 19:22:45 +05:30
if ( TitleMenu . subMenu = = null & & toSpeak ! = "" )
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithChecker ( toSpeak , true ) ;
2022-01-03 19:22:45 +05:30
}
catch ( Exception e )
{
2022-03-19 12:54:53 +05:30
MainClass . ErrorLog ( $"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}" ) ;
2022-01-03 19:22:45 +05:30
}
}
internal static void LoadGameMenuPatch ( SaveFileSlot __instance , LoadGameMenu ___menu , int i )
{
try
{
2022-03-21 12:12:50 +05:30
int x = Game1 . getMouseX ( true ) , y = Game1 . getMouseY ( true ) ;
2022-01-03 19:22:45 +05:30
if ( ___menu . slotButtons [ i ] . containsPoint ( x , y ) )
{
if ( __instance . Farmer ! = null )
{
#region Farms
if ( ___menu . deleteButtons . Count > 0 & & ___menu . deleteButtons [ i ] . containsPoint ( x , y ) )
{
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithChecker ( $"Delete {__instance.Farmer.farmName.Value} Farm" , true ) ;
2022-01-03 19:22:45 +05:30
return ;
}
if ( ___menu . deleteConfirmationScreen )
{
// Used diff. functions to narrate to prevent it from speaking the message again on selecting another button.
string message = "Really delete farm?" ;
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithChecker ( message , true ) ;
2022-01-03 19:22:45 +05:30
if ( ___menu . okDeleteButton . containsPoint ( x , y ) )
{
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithMenuChecker ( "Ok Button" , false ) ;
2022-01-03 19:22:45 +05:30
}
else if ( ___menu . cancelDeleteButton . containsPoint ( x , y ) )
{
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithMenuChecker ( "Cancel Button" , false ) ;
2022-01-03 19:22:45 +05:30
}
return ;
}
String farmerName = __instance . Farmer . displayName ;
2022-04-09 15:48:13 +05:30
String farmName = __instance . Farmer . farmName . Value ;
2022-01-03 19:22:45 +05:30
String money = __instance . Farmer . Money . ToString ( ) ;
String hoursPlayed = Utility . getHoursMinutesStringFromMilliseconds ( __instance . Farmer . millisecondsPlayed ) ;
string dateStringForSaveGame = ( ( ! __instance . Farmer . dayOfMonthForSaveGame . HasValue | |
! __instance . Farmer . seasonForSaveGame . HasValue | |
! __instance . Farmer . yearForSaveGame . HasValue ) ? __instance . Farmer . dateStringForSaveGame : Utility . getDateStringFor ( __instance . Farmer . dayOfMonthForSaveGame . Value , __instance . Farmer . seasonForSaveGame . Value , __instance . Farmer . yearForSaveGame . Value ) ) ;
string toSpeak = $"{farmName} Farm Selected, \t\n Farmer:{farmerName}, \t\nMoney:{money}, \t\nHours Played:{hoursPlayed}, \t\nDate:{dateStringForSaveGame}" ;
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . SayWithChecker ( toSpeak , true ) ;
2022-01-03 19:22:45 +05:30
#endregion
}
}
}
catch ( Exception e )
{
2022-03-19 12:54:53 +05:30
MainClass . ErrorLog ( $"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}" ) ;
2022-01-03 19:22:45 +05:30
}
}
2022-04-02 16:33:53 +05:30
internal static void CharacterCustomizationMenuPatch ( CharacterCustomization __instance , bool ___skipIntro ,
2022-05-30 22:34:54 +05:30
ClickableComponent ___startingCabinsLabel , ClickableComponent ___difficultyModifierLabel , TextBox ___nameBox ,
TextBox ___farmnameBox , TextBox ___favThingBox )
2022-01-03 19:22:45 +05:30
{
try
{
2022-08-23 08:57:34 +05:30
bool isEscPressed = Game1 . input . GetKeyboardState ( ) . IsKeyDown ( Microsoft . Xna . Framework . Input . Keys . Escape ) ; // For escaping/unselecting from the animal name text box
2022-05-30 22:34:54 +05:30
string toSpeak = " " ;
string currentPetName = getCurrentPetName ( ) ;
if ( ___nameBox . Selected )
{
toSpeak = ___nameBox . Text ;
2022-08-23 08:57:34 +05:30
if ( isEscPressed )
2022-05-30 22:34:54 +05:30
{
___nameBox . Selected = false ;
}
}
else if ( ___farmnameBox . Selected )
{
toSpeak = ___farmnameBox . Text ;
2022-08-23 08:57:34 +05:30
if ( isEscPressed )
2022-05-30 22:34:54 +05:30
{
___farmnameBox . Selected = false ;
}
}
else if ( ___favThingBox . Selected )
{
toSpeak = ___favThingBox . Text ;
2022-08-23 08:57:34 +05:30
if ( isEscPressed )
2022-05-30 22:34:54 +05:30
{
___favThingBox . Selected = false ;
}
}
else if ( MainClass . Config . CharacterCreationMenuNextKey . JustPressed ( ) & & ! isRunning )
2022-01-03 19:22:45 +05:30
{
2022-03-29 19:57:38 +05:30
isRunning = true ;
2022-04-02 16:33:53 +05:30
CycleThroughItems ( true , __instance , ___skipIntro , ___startingCabinsLabel , ___difficultyModifierLabel ) ;
2022-03-29 19:57:38 +05:30
Task . Delay ( 200 ) . ContinueWith ( _ = > { isRunning = false ; } ) ;
2022-01-03 19:22:45 +05:30
}
2022-05-16 22:01:02 +05:30
else if ( MainClass . Config . CharacterCreationMenuPreviousKey . JustPressed ( ) & & ! isRunning )
2022-01-03 19:22:45 +05:30
{
2022-03-29 19:57:38 +05:30
isRunning = true ;
2022-04-02 16:33:53 +05:30
CycleThroughItems ( false , __instance , ___skipIntro , ___startingCabinsLabel , ___difficultyModifierLabel ) ;
2022-03-29 19:57:38 +05:30
Task . Delay ( 200 ) . ContinueWith ( _ = > { isRunning = false ; } ) ;
2022-01-03 19:22:45 +05:30
}
2022-05-30 22:34:54 +05:30
if ( prevPetName ! = currentPetName )
{
prevPetName = currentPetName ;
toSpeak = $"Current Pet: {currentPetName} \n {toSpeak}" ;
}
if ( characterCreationMenuQueryKey ! = toSpeak & & toSpeak ! = " " )
{
characterCreationMenuQueryKey = toSpeak ;
MainClass . ScreenReader . Say ( toSpeak , true ) ;
}
2022-01-03 19:22:45 +05:30
}
catch ( Exception e )
{
2022-03-19 12:54:53 +05:30
MainClass . ErrorLog ( $"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}" ) ;
2022-01-03 19:22:45 +05:30
}
}
2022-04-02 16:33:53 +05:30
private static void CycleThroughItems ( bool increase , CharacterCustomization __instance , bool ___skipIntro ,
ClickableComponent ___startingCabinsLabel , ClickableComponent ___difficultyModifierLabel )
2022-01-03 19:22:45 +05:30
{
2022-01-03 20:36:57 +05:30
string toSpeak = " " ;
2022-03-31 14:31:09 +05:30
Dictionary < ClickableComponent , string > buttons = new ( ) ;
2022-01-03 20:36:57 +05:30
2022-03-31 14:31:09 +05:30
#region Add buttons with their names IF they are available
2022-04-02 16:33:53 +05:30
#region Character related
2022-03-31 14:31:09 +05:30
if ( __instance . nameBoxCC ! = null & & __instance . nameBoxCC . visible )
2022-05-30 22:34:54 +05:30
buttons . Add ( __instance . nameBoxCC , "Farmer's Name Text box" ) ;
2022-01-03 19:22:45 +05:30
2022-03-31 14:31:09 +05:30
if ( __instance . farmnameBoxCC ! = null & & __instance . farmnameBoxCC . visible )
2022-05-30 22:34:54 +05:30
buttons . Add ( __instance . farmnameBoxCC , "Farm's Name Text box" ) ;
2022-01-03 19:22:45 +05:30
2022-03-31 14:31:09 +05:30
if ( __instance . favThingBoxCC ! = null & & __instance . favThingBoxCC . visible )
2022-05-30 22:34:54 +05:30
buttons . Add ( __instance . favThingBoxCC , "Favourite Thing Text box" ) ;
2022-01-03 20:36:57 +05:30
2022-04-02 15:49:18 +05:30
if ( __instance . petPortraitBox . HasValue ) // Cannot get petButtons like with others
{
ClickableComponent petPrev = __instance . getComponentWithID ( 511 ) ;
2022-05-30 22:34:54 +05:30
buttons . Add ( petPrev , "Previous pet button" ) ;
2022-04-02 15:49:18 +05:30
ClickableComponent petNext = __instance . getComponentWithID ( 510 ) ;
2022-05-30 22:34:54 +05:30
buttons . Add ( petNext , "Next pet button" ) ;
2022-04-02 15:49:18 +05:30
}
2022-03-31 14:31:09 +05:30
if ( __instance . randomButton ! = null & & __instance . randomButton . visible )
buttons . Add ( __instance . randomButton , "Random Skin Button" ) ;
2022-01-03 20:36:57 +05:30
2022-03-31 14:31:09 +05:30
if ( __instance . genderButtons . Count > 0 )
{
2022-05-30 22:34:54 +05:30
buttons . Add ( __instance . genderButtons [ 0 ] , ( ( Game1 . player . IsMale ) ? "Selected " : "" ) + "Gender: Male Button" ) ;
buttons . Add ( __instance . genderButtons [ 1 ] , ( ( ! Game1 . player . IsMale ) ? "Selected " : "" ) + "Gender: Female Button" ) ;
2022-03-31 14:31:09 +05:30
}
2022-04-02 16:33:53 +05:30
#endregion
2022-01-03 20:36:57 +05:30
2022-04-02 16:33:53 +05:30
#region Farm layout related
2022-03-31 14:31:09 +05:30
if ( __instance . farmTypeButtons . Count > 0 )
{
2022-05-30 22:34:54 +05:30
for ( int i = 0 ; i < __instance . farmTypeButtons . Count ; i + + )
{
buttons . Add ( __instance . farmTypeButtons [ i ] , ( ( i = = Game1 . whichFarm ) ? "Selected " : "" ) + getFarmHoverText ( __instance . farmTypeButtons [ i ] ) ) ;
}
2022-03-31 14:31:09 +05:30
}
2022-01-03 20:36:57 +05:30
2022-03-31 14:31:09 +05:30
if ( __instance . farmTypeNextPageButton ! = null & & __instance . farmTypeNextPageButton . visible )
buttons . Add ( __instance . farmTypeNextPageButton , "Next Farm Type Page Button" ) ;
2022-01-03 19:22:45 +05:30
2022-03-31 14:31:09 +05:30
if ( __instance . farmTypePreviousPageButton ! = null & & __instance . farmTypePreviousPageButton . visible )
buttons . Add ( __instance . farmTypePreviousPageButton , "Previous Farm Type Page Button" ) ;
2022-04-02 16:33:53 +05:30
#endregion
2022-01-03 19:22:45 +05:30
2022-04-02 16:33:53 +05:30
#region Co - op related
if ( __instance . source = = Source . HostNewFarm )
2022-03-31 14:31:09 +05:30
{
2022-04-02 16:33:53 +05:30
ClickableComponent cabinLeft = __instance . getComponentWithID ( 621 ) ;
if ( Game1 . startingCabins > 0 )
buttons . Add ( cabinLeft , "Decrease starting cabins button" ) ;
buttons . Add ( ___startingCabinsLabel , $"Starting cabins: {Game1.startingCabins}" ) ;
ClickableComponent cabinRight = __instance . getComponentWithID ( 622 ) ;
if ( Game1 . startingCabins < 3 )
buttons . Add ( cabinRight , "Increase starting cabins button" ) ;
if ( Game1 . startingCabins > 0 )
{
buttons . Add ( __instance . cabinLayoutButtons [ 0 ] , "Cabin layout to nearby Button" ) ;
buttons . Add ( __instance . cabinLayoutButtons [ 1 ] , "Cabin layout to separate Button" ) ;
}
ClickableComponent difficultyLeft = __instance . getComponentWithID ( 627 ) ;
buttons . Add ( difficultyLeft , "Increase profit margin button" ) ;
buttons . Add ( ___difficultyModifierLabel , "Profit Margin: " + ( ( ( Game1 . player . difficultyModifier * 100 ) = = 100f ) ? "normal" : Game1 . player . difficultyModifier . ToString ( ) ) ) ;
ClickableComponent difficultyRight = __instance . getComponentWithID ( 628 ) ;
buttons . Add ( difficultyRight , "Decrease profit margin button" ) ;
ClickableComponent walletLeft = __instance . getComponentWithID ( 631 ) ;
buttons . Add ( walletLeft , "Money style to " + ( ( ! Game1 . player . team . useSeparateWallets . Value ) ? "separate wallets" : "shared wallets" ) + " button" ) ;
2022-03-31 14:31:09 +05:30
}
2022-04-02 16:33:53 +05:30
#endregion
if ( __instance . skipIntroButton ! = null & & __instance . skipIntroButton . visible )
buttons . Add ( __instance . skipIntroButton , ( ___skipIntro ? "Enabled" : "Disabled" ) + " Skip Intro Button" ) ;
2022-01-03 19:22:45 +05:30
2022-06-06 22:38:51 +05:30
if ( __instance . advancedOptionsButton ! = null & & __instance . advancedOptionsButton . visible )
buttons . Add ( __instance . advancedOptionsButton , "Advanced Options Button" ) ;
2022-03-31 14:31:09 +05:30
if ( __instance . okButton ! = null & & __instance . okButton . visible )
buttons . Add ( __instance . okButton , "OK Button" ) ;
2022-01-03 19:22:45 +05:30
2022-03-31 14:31:09 +05:30
if ( __instance . backButton ! = null & & __instance . backButton . visible )
buttons . Add ( __instance . backButton , "Back Button" ) ;
#endregion
2022-01-03 20:36:57 +05:30
2022-03-31 14:31:09 +05:30
int size = buttons . Count - 1 ;
2022-01-03 20:36:57 +05:30
2022-03-31 14:31:09 +05:30
if ( increase )
{
saveGameIndex + + ;
if ( saveGameIndex > size )
saveGameIndex = 0 ;
}
else
{
saveGameIndex - - ;
if ( saveGameIndex < 0 )
saveGameIndex = size ;
2022-01-03 19:22:45 +05:30
}
2022-03-31 14:31:09 +05:30
buttons . ElementAt ( saveGameIndex ) . Key . snapMouseCursor ( ) ;
toSpeak = buttons . ElementAt ( saveGameIndex ) . Value ;
2022-02-01 12:50:40 +05:30
if ( toSpeak ! = " " )
2022-01-03 20:36:57 +05:30
{
2022-04-09 15:48:13 +05:30
MainClass . ScreenReader . Say ( toSpeak , true ) ;
2022-01-03 20:36:57 +05:30
}
2022-01-03 19:22:45 +05:30
}
2022-05-30 22:34:54 +05:30
private static string getCurrentPetName ( )
2022-04-02 15:49:18 +05:30
{
return ( ( Game1 . player . catPerson ) ? "Cat" : "Dog" ) + " Breed: " + Game1 . player . whichPetBreed ;
}
2022-01-03 19:22:45 +05:30
private static string getFarmHoverText ( ClickableTextureComponent farm )
{
string hoverTitle = " " , hoverText = " " ;
if ( ! farm . name . Contains ( "Gray" ) )
{
if ( farm . hoverText . Contains ( '_' ) )
{
hoverTitle = farm . hoverText . Split ( '_' ) [ 0 ] ;
hoverText = farm . hoverText . Split ( '_' ) [ 1 ] ;
}
else
{
2022-01-31 20:16:47 +05:30
hoverTitle = " " ;
2022-01-03 19:22:45 +05:30
hoverText = farm . hoverText ;
}
}
else
{
if ( farm . name . Contains ( "Gray" ) )
{
hoverText = "Reach level 10 " + Game1 . content . LoadString ( "Strings\\UI:Character_" + farm . name . Split ( '_' ) [ 1 ] ) + " to unlock." ;
}
}
return $"{hoverTitle}: {hoverText}" ;
}
}
}