Skip to content

Commit

Permalink
invert update setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Conqu3red committed Apr 8, 2023
1 parent 8f95cfa commit 9c2e1be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PolyTechMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static ConfigDefinition
forceCheatDef = new ConfigDefinition("PolyTech Framework", "Force Cheat Flag"),
sandboxEverywhereDef = new ConfigDefinition("PolyTech Framework", "Sandbox Everywhere"),
globalToggleHotkeyDef = new ConfigDefinition("PolyTech Framework", "Global Toggle Hotkey"),
updateBlockDef = new ConfigDefinition("PolyTech Framework", "Remove Mod Update Notifications"),
checkModUpdatesDef = new ConfigDefinition("PolyTech Framework", "Check for Mod Updates"),
leaderboardProtMinDef = new ConfigDefinition("Leaderboard Protection", "Minimum Score"),
leaderboardCheckDef = new ConfigDefinition("Leaderboard Protection", "Confirm Before Upload"),
leaderboardBlockDef = new ConfigDefinition("Leaderboard Protection", "Block All Scores");
Expand All @@ -50,7 +50,7 @@ public static ConfigEntry<bool>
sandboxEverywhere,
leaderboardCheck,
leaderboardBlock,
updateBlock;
checkModUpdates;
public static ConfigEntry<int>
leaderboardProtMin;
public static ConfigEntry<BepInEx.Configuration.KeyboardShortcut>
Expand Down Expand Up @@ -97,7 +97,7 @@ public void Awake()
sandboxEverywhere.SettingChanged += sandboxEverywhereToggle;

globalToggleHotkey = Config.Bind(globalToggleHotkeyDef, new BepInEx.Configuration.KeyboardShortcut(KeyCode.BackQuote, KeyCode.LeftAlt), new ConfigDescription("Keybind used to toggle mods without opening the config menu."));
updateBlock = Config.Bind(updateBlockDef, false, new ConfigDescription("Prevents the mod update notifications from appearing at launch when out of date mods are being used"));
checkModUpdates = Config.Bind(checkModUpdatesDef, true, new ConfigDescription("Checks if new versions of installed mods are available on game startup"));
leaderboardProtMin = Config.Bind(leaderboardProtMinDef, 71, new ConfigDescription("Minimum value allowed to upload to leaderboard. 71 is the minimum to protect from automatic shadowbans."));
leaderboardProtMin.SettingChanged += onLeaderboardProtChange;
leaderboardCheck = Config.Bind(leaderboardCheckDef, false, new ConfigDescription("If checked, the game will confirm with the user before uploading scores to the leaderboard."));
Expand Down Expand Up @@ -268,7 +268,7 @@ public override void disableMod()

public static void checkForModUpdate(PolyTechMod plugin)
{
if(updateBlock.Value) return;
if(!checkModUpdates.Value) return;
if (plugin.repositoryUrl == null) return;
var client = new WebClient();
client.Headers.Add("User-Agent", "Nothing");
Expand Down

0 comments on commit 9c2e1be

Please sign in to comment.