Skip to content

Commit 8b37c36

Browse files
committed
RELEASE v1.0.5!
- Fixed heros mod
1 parent 798b0fa commit 8b37c36

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

Common/Systems/Integrations/HEROsMod/HEROsModIntegration.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Threading.Tasks;
33
using ModReloader.Common.BuilderToggles;
4-
using ModReloader.UI.Elements.ButtonElements;
54
using ModReloader.UI.Elements.PanelElements;
65
using Terraria.UI;
76

@@ -18,7 +17,7 @@ public sealed class HerosModIntegration : ModSystem
1817

1918
public override void PostSetupContent()
2019
{
21-
if (ModLoader.TryGetMod("HEROsMod", out Mod herosMod) && !Main.dedServ)
20+
if (ModLoader.TryGetMod("HEROsMod", out Mod herosMod))
2221
{
2322
RegisterReloadSPButton(herosMod);
2423
RegisterReloadMPButton(herosMod);
@@ -30,19 +29,13 @@ public override void PostSetupContent()
3029

3130
private static void RegisterReloadSPButton(Mod herosMod)
3231
{
33-
herosMod.Call("AddPermission", PermReloadSP, "Reloads mods");
32+
herosMod.Call("AddPermission", PermReloadMP, Loc.Get("ReloadButton.HoverText", string.Join(", ", Conf.C.ModsToReload)));
3433
herosMod.Call(
3534
"AddSimpleButton",
3635
PermReloadSP,
3736
Ass.ButtonReloadSPHeros,
3837
GuardedAsync(ReloadUtilities.SinglePlayerReload),
39-
(Action<bool>)(hasPerm =>
40-
{
41-
if (!hasPerm)
42-
{
43-
Main.NewText($"⛔ You lost permission to use the {PermReloadSP} button!", ColorHelper.CalamityRed);
44-
}
45-
}),
38+
(Action<bool>)(hasPerm => PermissionChanged(hasPerm, PermLogPanel)),
4639
(Func<string>)(() => GetReloadTooltip())
4740
);
4841
}
@@ -148,12 +141,12 @@ private static void PermissionChanged(bool hasPerm, string permissionName)
148141
{
149142
if (!hasPerm)
150143
{
151-
Main.NewText($"⛔ You lost permission to use the {permissionName} button!", ColorHelper.CalamityRed);
144+
//Main.NewText($"⛔ You lost permission to use the {permissionName} button!", ColorHelper.CalamityRed);
152145
Log.Info($"You lost permission for {permissionName} button. You cannot use it anymore.");
153146
}
154147
else
155148
{
156-
Main.NewText($"✅ You regained permission to use the {permissionName} button!", Color.LightGreen);
149+
//Main.NewText($"✅ You regained permission to use the {permissionName} button!", Color.LightGreen);
157150
Log.Info($"You regained permission for {permissionName} button. You can use it again.");
158151
}
159152
}

build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
displayName = Mod Reloader
22
author = Erky & Cotlim
3-
version = 1.0.4
3+
version = 1.0.5
44
side = both
55
buildIgnore = Assets\Old*, icon.psd
66
dllReferences = dnlib

0 commit comments

Comments
 (0)