Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
starfi5h committed Jul 9, 2023
1 parent 67540b2 commit 69d2c04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NebulaPatcher/Patches/Dynamic/UIGalaxySelect_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void _OnOpen_Postfix(UIGalaxySelect __instance)
"Note that when using GalacticScale 2 this process can take a bit longer.\n\n" +
"By clicking a planet while having its detail panel open you will set it as your birth planet.\n" +
"By clicking into outer space you will go one detail level up. Scroll to zoom in/out. Press Alt to see star names.\n\n" +
"We hope you enjoy this new feature!";
"Alt + ~ can open in-game chat. We hope you enjoy this new feature!";

InGamePopup.ShowInfo("The Lobby".Translate(),
message,
Expand Down
4 changes: 2 additions & 2 deletions NebulaWorld/Chat/ChatLinks/CopyTextChatLinkHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void OnClick(string data)

public void OnHover(string data, ChatLinkTrigger trigger, ref MonoBehaviour tipObject)
{
if (!data.Equals(""))
if (!string.IsNullOrEmpty(data))
{
UpdateTip(trigger, ref tipObject);
}
Expand Down Expand Up @@ -51,7 +51,7 @@ private static void UpdateTip(ChatLinkTrigger trigger, ref MonoBehaviour tipObje
buttonTip.SetTip(false, "Copy".Translate(), "Click to copy to clipboard".Translate(), Corner, offset, 0, rect, "", "");
}

if (buttonTip != null && buttonTip.isActiveAndEnabled && !buttonTip.titleComp.Equals("Copy"))
if (buttonTip.isActiveAndEnabled && !buttonTip.titleComp.text.Equals("Copy"))
{
buttonTip.SetTip(false, "Copy".Translate(), "Click to copy to clipboard".Translate(), Corner, offset, 0, rect, "", "");
}
Expand Down
6 changes: 3 additions & 3 deletions NebulaWorld/Chat/ChatLinks/NavigateChatLinkHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void OnClick(string data)
}
public void OnHover(string data, ChatLinkTrigger trigger, ref MonoBehaviour tipObject)
{
if (!data.Equals(""))
if (!string.IsNullOrEmpty(data))
{
UpdateTip(trigger, ref tipObject);
}
Expand Down Expand Up @@ -60,7 +60,7 @@ private static void UpdateTip(ChatLinkTrigger trigger, ref MonoBehaviour tipObje
buttonTip.SetTip(false, "Navigate".Translate(), "Click to create a navigate line to the target.".Translate(), 2, offset, 0, rect, "", "");
}

if (buttonTip != null && buttonTip.isActiveAndEnabled && !buttonTip.titleComp.Equals("Navigate"))
if (buttonTip.isActiveAndEnabled && !buttonTip.titleComp.text.Equals("Navigate"))
{
buttonTip.SetTip(false, "Navigate".Translate(), "Click to create a navigate line to the target.".Translate(), 2, offset, 0, rect, "", "");
}
Expand All @@ -69,7 +69,7 @@ private static void UpdateTip(ChatLinkTrigger trigger, ref MonoBehaviour tipObje

public string GetIconName(string data)
{
return "";
return string.Empty;
}
public string GetDisplayRichText(string data)
{
Expand Down
2 changes: 1 addition & 1 deletion NebulaWorld/Chat/ChatLinks/SignalChatLinkHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public string GetIconName(string data)
public string GetDisplayRichText(string data)
{
int signalId = GetSignalId(data);
if (signalId <= 0) return "";
if (signalId <= 0) return string.Empty;

return $"<link=\"signal {signalId}\">[<sprite name=\"{signalId}\"> <color=\"green\">{ProtoUtils.GetSignalDisplayName(signalId)}</color>]</link>";
}
Expand Down

0 comments on commit 69d2c04

Please sign in to comment.