Skip to content

Commit

Permalink
- Add Config setting for disabling the mail templates
Browse files Browse the repository at this point in the history
- Add tooltips to all configs
  • Loading branch information
agilbert1412 committed May 17, 2024
1 parent ff11760 commit 3b0f9bd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
18 changes: 13 additions & 5 deletions StardewArchipelago/Integrations/GenericModConfigMenu/ConfigMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,39 +108,47 @@ public void RegisterConfig()
configMenu.AddBoolOption(
mod: ModManifest,
name: () => "Enable Seed Shop Overhaul",
tooltip: () => "",
tooltip: () => "Seed shops are rebalanced to be more in line with the lore and intended gameplay design of Archipelago",
getValue: () => Config.EnableSeedShopOverhaul,
setValue: (value) => Config.EnableSeedShopOverhaul = value
);

configMenu.AddBoolOption(
mod: ModManifest,
name: () => "Hide Empty Archipelago Letters",
tooltip: () => "",
tooltip: () => "Letters that contain neither an item nor an unlock will be skipped, reducing clutter",
getValue: () => Config.HideEmptyArchipelagoLetters,
setValue: (value) => Config.HideEmptyArchipelagoLetters = value
);

configMenu.AddBoolOption(
mod: ModManifest,
name: () => "Disable Letter Templates",
tooltip: () => "All Archipelago letters will not use a very short and concise format instead of the funny ones full of fluff",
getValue: () => Config.DisableLetterTemplates,
setValue: (value) => Config.DisableLetterTemplates = value
);

configMenu.AddBoolOption(
mod: ModManifest,
name: () => "Use Custom Archipelago Icons",
tooltip: () => "",
tooltip: () => "Alternate art style for the Archipelago icons used in various places in the mod",
getValue: () => Config.UseCustomArchipelagoIcons,
setValue: (value) => Config.UseCustomArchipelagoIcons = value
);

configMenu.AddBoolOption(
mod: ModManifest,
name: () => "Skip Hold Up Animations",
tooltip: () => "",
tooltip: () => "Skip all the 'Hold an item above your head' animations",
getValue: () => Config.SkipHoldUpAnimations,
setValue: (value) => Config.SkipHoldUpAnimations = value
);

configMenu.AddBoolOption(
mod: ModManifest,
name: () => "Disable Friendship Decay",
tooltip: () => "",
tooltip: () => "Friendship points no longer go down when you don't talk to NPCs",
getValue: () => Config.DisableFriendshipDecay,
setValue: (value) => Config.DisableFriendshipDecay = value
);
Expand Down
6 changes: 5 additions & 1 deletion StardewArchipelago/Items/Mail/Mailman.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ private string GetRandomApMailGiftString()

private string GetRandomApMailString()
{
var chosenString = ApMailStrings[_random.Next(0, ApMailStrings.Length)];
var chosenString = ModEntry.Instance.Config.DisableLetterTemplates ?
ApConciseMailString:
ApMailStrings[_random.Next(0, ApMailStrings.Length)];
chosenString += "{3}[#]Archipelago Item"; // Argument {3} is the embed
return chosenString;
}
Expand Down Expand Up @@ -173,6 +175,8 @@ public void SendMail(string mailTitle)
"I know you've been trying hard to win over a partner for the Flower Dance. This {0} is sure to win over your crush. I just know they'll love it.^^ -{1} from {2}",
};

private const string ApConciseMailString = "{0} from [1] at {2}.";

// 0: Item
// 1: Sender
// 2: Location
Expand Down
6 changes: 6 additions & 0 deletions StardewArchipelago/ModConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public class ModConfig
/// </summary>
public bool HideEmptyArchipelagoLetters { get; set; } = false;

/// <summary>
/// All Archipelago letters will not use a very short and concise format
/// instead of the funny ones full of fluff
/// </summary>
public bool DisableLetterTemplates { get; set; } = false;

/// <summary>
/// When the archipelago icon shows up in-game, two version of the icons are available.
/// The default are the "flat" icons, that come from Archipelago itself and are used in many games
Expand Down

0 comments on commit 3b0f9bd

Please sign in to comment.