Skip to content

Commit

Permalink
GadgetCore v2.0.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperKael committed Apr 13, 2021
1 parent b9bd44d commit b2a5b46
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion API/ConfigMenu/GadgetConfigButtonComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override void Build(RectTransform parent)
buttonLabel.rectTransform.offsetMax = new Vector2(-2.5f, -2.5f);
buttonLabel.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
buttonLabel.horizontalOverflow = HorizontalWrapMode.Wrap;
buttonLabel.verticalOverflow = VerticalWrapMode.Truncate;
buttonLabel.verticalOverflow = VerticalWrapMode.Overflow;
buttonLabel.alignment = TextAnchor.MiddleCenter;
buttonLabel.text = Label;
}
Expand Down
2 changes: 2 additions & 0 deletions API/ConfigMenu/GadgetConfigDoubleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public override void Build(RectTransform parent)
placeholder.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
placeholder.fontSize = 12;
placeholder.horizontalOverflow = HorizontalWrapMode.Wrap;
placeholder.verticalOverflow = VerticalWrapMode.Overflow;
placeholder.alignment = TextAnchor.MiddleLeft;
placeholder.color = new Color(1f, 1f, 1f, 0.5f);
textbox.placeholder = placeholder;
Expand All @@ -117,6 +118,7 @@ public override void Build(RectTransform parent)
text.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
text.fontSize = 12;
text.horizontalOverflow = HorizontalWrapMode.Wrap;
text.verticalOverflow = VerticalWrapMode.Overflow;
text.supportRichText = true;
text.alignment = TextAnchor.MiddleLeft;
textbox.textComponent = text;
Expand Down
4 changes: 2 additions & 2 deletions API/ConfigMenu/GadgetConfigDropdownComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public override void Build(RectTransform parent)
buttonLabel.rectTransform.offsetMax = new Vector2(-2.5f, -2.5f);
buttonLabel.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
buttonLabel.horizontalOverflow = HorizontalWrapMode.Wrap;
buttonLabel.verticalOverflow = VerticalWrapMode.Truncate;
buttonLabel.verticalOverflow = VerticalWrapMode.Overflow;
buttonLabel.alignment = TextAnchor.MiddleCenter;
buttonLabel.text = Value;
Entries = new RectTransform[Values.Length];
Expand Down Expand Up @@ -155,7 +155,7 @@ public override void Build(RectTransform parent)
dropButtonLabel.rectTransform.offsetMax = new Vector2(-2.5f, -2.5f);
dropButtonLabel.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
dropButtonLabel.horizontalOverflow = HorizontalWrapMode.Wrap;
dropButtonLabel.verticalOverflow = VerticalWrapMode.Truncate;
dropButtonLabel.verticalOverflow = VerticalWrapMode.Overflow;
dropButtonLabel.alignment = TextAnchor.MiddleCenter;
dropButtonLabel.text = Values[i];
Entries[i] = dropButton;
Expand Down
2 changes: 2 additions & 0 deletions API/ConfigMenu/GadgetConfigFloatComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public override void Build(RectTransform parent)
placeholder.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
placeholder.fontSize = 12;
placeholder.horizontalOverflow = HorizontalWrapMode.Wrap;
placeholder.verticalOverflow = VerticalWrapMode.Overflow;
placeholder.alignment = TextAnchor.MiddleLeft;
placeholder.color = new Color(1f, 1f, 1f, 0.5f);
textbox.placeholder = placeholder;
Expand All @@ -117,6 +118,7 @@ public override void Build(RectTransform parent)
text.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
text.fontSize = 12;
text.horizontalOverflow = HorizontalWrapMode.Wrap;
text.verticalOverflow = VerticalWrapMode.Overflow;
text.supportRichText = true;
text.alignment = TextAnchor.MiddleLeft;
textbox.textComponent = text;
Expand Down
2 changes: 2 additions & 0 deletions API/ConfigMenu/GadgetConfigIntComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public override void Build(RectTransform parent)
placeholder.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
placeholder.fontSize = 12;
placeholder.horizontalOverflow = HorizontalWrapMode.Wrap;
placeholder.verticalOverflow = VerticalWrapMode.Overflow;
placeholder.alignment = TextAnchor.MiddleLeft;
placeholder.color = new Color(1f, 1f, 1f, 0.5f);
textbox.placeholder = placeholder;
Expand All @@ -112,6 +113,7 @@ public override void Build(RectTransform parent)
text.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
text.fontSize = 12;
text.horizontalOverflow = HorizontalWrapMode.Wrap;
text.verticalOverflow = VerticalWrapMode.Overflow;
text.supportRichText = true;
text.alignment = TextAnchor.MiddleLeft;
textbox.textComponent = text;
Expand Down
2 changes: 1 addition & 1 deletion API/ConfigMenu/GadgetConfigKeybindComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public override void Build(RectTransform parent)
buttonLabel.rectTransform.offsetMax = new Vector2(-2.5f, -2.5f);
buttonLabel.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
buttonLabel.horizontalOverflow = HorizontalWrapMode.Wrap;
buttonLabel.verticalOverflow = VerticalWrapMode.Truncate;
buttonLabel.verticalOverflow = VerticalWrapMode.Overflow;
buttonLabel.alignment = TextAnchor.MiddleCenter;
buttonLabel.text = Value;
toggle.GetComponent<Image>().sprite = SceneInjector.BoxSprite;
Expand Down
2 changes: 1 addition & 1 deletion API/ConfigMenu/GadgetConfigMultiKeybindComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public override void Build(RectTransform parent)
buttonLabel.rectTransform.offsetMax = new Vector2(-2.5f, -2.5f);
buttonLabel.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
buttonLabel.horizontalOverflow = HorizontalWrapMode.Wrap;
buttonLabel.verticalOverflow = VerticalWrapMode.Truncate;
buttonLabel.verticalOverflow = VerticalWrapMode.Overflow;
buttonLabel.alignment = TextAnchor.MiddleCenter;
buttonLabel.text = Value[i];
float buttonWidth = Math.Min(Height / Value.Length / (Screen.width / Screen.height), 0.125f);
Expand Down
2 changes: 2 additions & 0 deletions API/ConfigMenu/GadgetConfigStringComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public override void Build(RectTransform parent)
placeholder.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
placeholder.fontSize = 12;
placeholder.horizontalOverflow = HorizontalWrapMode.Wrap;
placeholder.verticalOverflow = VerticalWrapMode.Overflow;
placeholder.alignment = TextAnchor.MiddleLeft;
placeholder.color = new Color(1f, 1f, 1f, 0.5f);
textbox.placeholder = placeholder;
Expand All @@ -102,6 +103,7 @@ public override void Build(RectTransform parent)
text.font = SceneInjector.ModConfigMenuText.GetComponent<TextMesh>().font;
text.fontSize = 12;
text.horizontalOverflow = HorizontalWrapMode.Wrap;
text.verticalOverflow = VerticalWrapMode.Overflow;
text.supportRichText = true;
text.alignment = TextAnchor.MiddleLeft;
textbox.textComponent = text;
Expand Down
4 changes: 2 additions & 2 deletions API/ConfigMenu/INIGadgetConfigMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ protected virtual void LoadConfigFile(string configFilePath, string section, par
}
}
ConfigFileSection = section;
if (Ini.Sections.ContainsSection("uModFramework") && Ini["uModFramework"].ContainsKey("ConfigVersion")) AddComponent(new GadgetConfigLabelComponent(this, "ConfigVersion", "Config Version (not to be confused with mod version): " + Ini["uModFramework"]["ConfigVersion"]), GadgetConfigComponentAlignment.HEADER);
if (Ini.Sections.ContainsSection("uModFramework") && Ini["uModFramework"].ContainsKey("ConfigVersion")) AddComponent(new GadgetConfigLabelComponent(this, "ConfigVersion", "Config Version (not to be confused with mod version): " + Ini["uModFramework"]["ConfigVersion"], allowHeightResize: true), GadgetConfigComponentAlignment.HEADER);
bool firstStandard = true, firstHeader = false, firstFooter = true;
foreach (KeyData keyData in Ini[section])
{
if (keyData == null) continue;
if (keyData.KeyName == "ConfigVersion")
{
AddComponent(new GadgetConfigLabelComponent(this, "ConfigVersion", "Config Version (not to be confused with mod version): " + keyData.Value), GadgetConfigComponentAlignment.HEADER);
AddComponent(new GadgetConfigLabelComponent(this, "ConfigVersion", "Config Version (not to be confused with mod version): " + keyData.Value, allowHeightResize: true), GadgetConfigComponentAlignment.HEADER);
continue;
}
GadgetConfigComponentAlignment alignment = default;
Expand Down
4 changes: 2 additions & 2 deletions API/GadgetConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ private void GenerateMetaComments<T>(List<string> commentList, T defaultValue =
Type underlyingT = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T);
if (range != null && range.Length > 0 && range.Any(x => x != null))
{
commentList.Add("[Type: " + (underlyingT.IsEnum ? "Enum-" + underlyingT.AssemblyQualifiedName : underlyingT.Name) + " | Range: " + range.Where(x => x != null).Select(x => x.ToString()).Concat() + "]");
commentList.Add("[Type: " + (underlyingT.IsEnum && !typeof(KeyCode).IsAssignableFrom(underlyingT) ? "Enum-" + underlyingT.AssemblyQualifiedName : underlyingT.Name) + " | Range: " + range.Where(x => x != null).Select(x => x.ToString()).Concat() + "]");
}
else
{
commentList.Add("[Type: " + (underlyingT.IsEnum ? "Enum-" + underlyingT.AssemblyQualifiedName : underlyingT.Name) + "]");
commentList.Add("[Type: " + (underlyingT.IsEnum && !typeof(KeyCode).IsAssignableFrom(underlyingT) ? "Enum-" + underlyingT.AssemblyQualifiedName : underlyingT.Name) + "]");
}
if (allowed != null && allowed.Length > 0 && allowed.Any(x => x != null))
{
Expand Down
4 changes: 2 additions & 2 deletions API/GadgetCoreAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public static class GadgetCoreAPI
/// <summary>
/// The version numbers for this version of Gadget Core. You generally shouldn't access this directly, instead use <see cref="GetRawVersion()"/>
/// </summary>
public const string RAW_VERSION = "2.0.3.8";
public const string RAW_VERSION = "2.0.3.9";
/// <summary>
/// A slightly more informative version. You generally shouldn't access this directly, instead use <see cref="GetFullVersion()"/>
/// </summary>
public const string FULL_VERSION = "2.0.3.8 - Mod Browser Edition";
public const string FULL_VERSION = "2.0.3.9 - Mod Browser Edition";
/// <summary>
/// Indicates whether this version of GadgetCore is a beta version. You generally shouldn't access this directly, instead use <see cref="GetIsBeta()"/>
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion ModBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ private IEnumerator ProcessGitVersions(string gitURL, ModBrowserEntry modEntry)
string message = responseObject.Value<string>("message");
if (message != null && message.StartsWith("API rate limit exceeded"))
{
GadgetCore.CoreLogger.LogWarning("GitHub API Rate limit exceeded! Please wait one hour before for it to reset.");
GadgetCore.CoreLogger.LogWarning("GitHub API Rate limit exceeded! Please wait one hour for it to reset.");
modEntry.Info["Error"] = "GitHub Rate Limit Exceeded!";
Singleton.UnlimitButton.gameObject.SetActive(string.IsNullOrEmpty(gitHubAuthToken));
}
Expand Down
2 changes: 1 addition & 1 deletion Patches/Patch_ScarabScript_DropLocal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static class Patch_ScarabScript_DropLocal
[HarmonyPostfix]
public static void Postfix(ScarabScript __instance)
{
LootTables.DropLoot("entity:" + __instance.wormDisassemble.transform.GetHighestParent().name.Split(' ', '(')[0], __instance.transform.position);
LootTables.DropLoot("entity:" + __instance.transform.GetHighestParent().name.Split(' ', '(')[0], __instance.transform.position);
}

[HarmonyTranspiler]
Expand Down
2 changes: 1 addition & 1 deletion Patches/Patch_SliverScript_DropLocal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static class Patch_SliverScript_DropLocal
[HarmonyPostfix]
public static void Postfix(SliverScript __instance)
{
LootTables.DropLoot("entity:" + __instance.wormDisassemble.transform.GetHighestParent().name.Split(' ', '(')[0], __instance.transform.position);
LootTables.DropLoot("entity:" + __instance.transform.GetHighestParent().name.Split(' ', '(')[0], __instance.transform.position);
}

[HarmonyTranspiler]
Expand Down
Binary file modified Release/GadgetCore.dll
Binary file not shown.
Binary file modified Release/GadgetCore.zip
Binary file not shown.

0 comments on commit b2a5b46

Please sign in to comment.