Skip to content

Commit 01ef85f

Browse files
committed
+Block Update Notifications
- Build warnings Updated Version Number and added hippolippo to authors
1 parent 413da7b commit 01ef85f

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

Libraries/UnityEngine.UI.dll

0 Bytes
Binary file not shown.

ParseClasses.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public System.Version GetVersion()
5858
try {
5959
version = new System.Version(parsed);
6060
}
61-
catch (FormatException ex){
61+
catch (FormatException)
62+
{
6263
PolyTechMain.ptfInstance.ptfLogger.LogError("Invalid Version found while checking for mod updates, using fallback value 0.0.0");
6364
version = new System.Version("0.0.0");
6465
}

PolyTechMain.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class PolyTechMain : PolyTechMod
2424
public new const string
2525
PluginGuid = "polytech.polytechframework",
2626
PluginName = "PolyTech Framework",
27-
PluginVersion = "0.9.6";
27+
PluginVersion = "0.9.7";
2828
private static BindingList<PolyTechMod>
2929
noncheatMods = new BindingList<PolyTechMod> { },
3030
cheatMods = new BindingList<PolyTechMod> { };
@@ -37,6 +37,7 @@ public static ConfigDefinition
3737
forceCheatDef = new ConfigDefinition("PolyTech Framework", "Force Cheat Flag"),
3838
sandboxEverywhereDef = new ConfigDefinition("PolyTech Framework", "Sandbox Everywhere"),
3939
globalToggleHotkeyDef = new ConfigDefinition("PolyTech Framework", "Global Toggle Hotkey"),
40+
updateBlockDef = new ConfigDefinition("PolyTech Framework", "Remove Mod Update Notifications"),
4041
leaderboardProtMinDef = new ConfigDefinition("Leaderboard Protection", "Minimum Score"),
4142
leaderboardCheckDef = new ConfigDefinition("Leaderboard Protection", "Confirm Before Upload"),
4243
leaderboardBlockDef = new ConfigDefinition("Leaderboard Protection", "Block All Scores");
@@ -48,7 +49,8 @@ public static ConfigEntry<bool>
4849
forceCheat,
4950
sandboxEverywhere,
5051
leaderboardCheck,
51-
leaderboardBlock;
52+
leaderboardBlock,
53+
updateBlock;
5254
public static ConfigEntry<int>
5355
leaderboardProtMin;
5456
public static ConfigEntry<BepInEx.Configuration.KeyboardShortcut>
@@ -95,7 +97,7 @@ public void Awake()
9597
sandboxEverywhere.SettingChanged += sandboxEverywhereToggle;
9698

9799
globalToggleHotkey = Config.Bind(globalToggleHotkeyDef, new BepInEx.Configuration.KeyboardShortcut(KeyCode.BackQuote, KeyCode.LeftAlt), new ConfigDescription("Keybind used to toggle mods without opening the config menu."));
98-
100+
updateBlock = Config.Bind(updateBlockDef, false, new ConfigDescription("Prevents the mod update notifications from appearing at launch when out of date mods are being used"));
99101
leaderboardProtMin = Config.Bind(leaderboardProtMinDef, 71, new ConfigDescription("Minimum value allowed to upload to leaderboard. 71 is the minimum to protect from automatic shadowbans."));
100102
leaderboardProtMin.SettingChanged += onLeaderboardProtChange;
101103
leaderboardCheck = Config.Bind(leaderboardCheckDef, false, new ConfigDescription("If checked, the game will confirm with the user before uploading scores to the leaderboard."));
@@ -122,7 +124,7 @@ public void Awake()
122124
this.isEnabled = modEnabled.Value;
123125
ptfInstance = this;
124126

125-
this.authors = new string[] {"MoonlitJolty", "Conqu3red", "Razboy20", "Tran Fox", "nitsuga5124"};
127+
this.authors = new string[] {"MoonlitJolty", "Conqu3red", "Razboy20", "Tran Fox", "nitsuga5124", "hippolippo"};
126128

127129
registerMod(this);
128130
}
@@ -159,7 +161,7 @@ private void Update()
159161

160162
if (autoDraw == null)
161163
{
162-
var autoDraw = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/GridStress/ButtonsHorizontalLayout/ButtonContainer_AutoDraw");
164+
autoDraw = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/GridStress/ButtonsHorizontalLayout/ButtonContainer_AutoDraw");
163165
if (autoDraw == null) return;
164166
autoDraw.SetActive(true);
165167
sandbox = GameObject.Find("GameUI/Panel_TopBar/HorizontalLayout/CenterInfo/Sandbox");
@@ -266,6 +268,7 @@ public override void disableMod()
266268

267269
public static void checkForModUpdate(PolyTechMod plugin)
268270
{
271+
if(updateBlock.Value) return;
269272
if (plugin.repositoryUrl == null) return;
270273
var client = new WebClient();
271274
client.Headers.Add("User-Agent", "Nothing");

0 commit comments

Comments
 (0)