Skip to content

Commit 9b5038f

Browse files
committed
- Added redundency for the vanilla stack sizes file.
- Version bump to 4.1.1
1 parent 25136c9 commit 9b5038f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

StackSizeController.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Oxide.Plugins
1212
{
13-
[Info("Stack Size Controller", "AnExiledDev", "4.1.0")]
13+
[Info("Stack Size Controller", "AnExiledDev", "4.1.1")]
1414
[Description("Allows configuration of most items max stack size.")]
1515
class StackSizeController : CovalencePlugin
1616
{
@@ -472,7 +472,7 @@ private void GenerateVanillaStackSizeFile()
472472

473473
SetStackSizes();
474474

475-
Log("Vanilla stack sizes file updated.");
475+
Log("Vanilla stack sizes file updated. Custom stack sizes restored.");
476476
}
477477

478478
#endregion
@@ -497,7 +497,10 @@ private void SetVanillaDefaults(int code, string response)
497497
{
498498
if (code != 200 || response == null)
499499
{
500-
LogError($"Unable to get result from GitHub, code {code}.");
500+
LogWarning($"Unable to get result from GitHub, code {code}.");
501+
502+
Log("Attempting temporary workaround. If this doesn't work, reload the plugin until it's able to grab the vanilla defaults file.");
503+
GenerateVanillaStackSizeFile();
501504
}
502505

503506
_vanillaDefaults = JsonConvert.DeserializeObject<Dictionary<string, int>>(response);

0 commit comments

Comments
 (0)