Skip to content

Commit

Permalink
fix: Default value for ItemActionHandler's Language argument (#458)
Browse files Browse the repository at this point in the history
Fixed default value for language argument
  • Loading branch information
Metious committed Sep 3, 2023
1 parent c8a31ce commit 901061a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Nautilus/Handlers/ItemActionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class ItemActionHandler
/// <param name="tooltip">The secondary tooltip which will appear in the description of the item. If null or empty, this will use the language line "LeftClickAction_{<paramref name="targetTechType"/>}" instead.</param>
/// <param name="language">The language for the tooltip. Defaults to English.</param>
/// <param name="condition">The condition which must return <see langword="true"/> for the action to be called when the item is clicked<para/>If omitted, the action will always be called</param>
public static void RegisterLeftClickAction(TechType targetTechType, Action<InventoryItem> callback, string tooltip, string language = null, Predicate<InventoryItem> condition = null)
public static void RegisterLeftClickAction(TechType targetTechType, Action<InventoryItem> callback, string tooltip, string language = "English", Predicate<InventoryItem> condition = null)
{
string languageLine = $"LeftClickAction_{targetTechType.AsString()}";
if (!string.IsNullOrEmpty(tooltip))
Expand All @@ -41,7 +41,7 @@ public static void RegisterLeftClickAction(TechType targetTechType, Action<Inven
/// <param name="tooltip">The secondary tooltip which will appear in the description of the item</param>
/// <param name="language">The language for the tooltip. Defaults to English.</param>
/// <param name="condition">The condition which must return <see langword="true"/> for the action to be called when the item is clicked<para/>If omitted, the action will always be called</param>
public static void RegisterMiddleClickAction(TechType targetTechType, Action<InventoryItem> callback, string tooltip, string language = null, Predicate<InventoryItem> condition = null)
public static void RegisterMiddleClickAction(TechType targetTechType, Action<InventoryItem> callback, string tooltip, string language = "English", Predicate<InventoryItem> condition = null)
{
string languageLine = $"MiddleClickAction_{targetTechType.AsString()}";
LanguageHandler.SetLanguageLine(languageLine, tooltip, language);
Expand Down

0 comments on commit 901061a

Please sign in to comment.