Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Commit f94d856

Browse files
committed
v1.0.2 - Make Static Methods Non-Static + Removed Testing Code
1 parent 56bca59 commit f94d856

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

LethalDataAPI/LethalData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public LethalData(string modName)
2020
}
2121
}
2222

23-
public static void Save<T>(string key, T value)
23+
public void Save<T>(string key, T value)
2424
{
2525
string currentSave = Plugin.currentSave;
2626
if (string.IsNullOrEmpty(currentSave)) return;
@@ -45,7 +45,7 @@ public static void Save<T>(string key, T value)
4545
File.WriteAllText(_dir, jsonData);
4646
}
4747

48-
public static T? Load<T>(string key)
48+
public T? Load<T>(string key)
4949
{
5050
string currentSave = Plugin.currentSave;
5151
string _dir = Path.Combine(dir, currentSave + ".json");

LethalDataAPI/Plugin.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ public class Plugin : BaseUnityPlugin
1717

1818
private Plugin Instance;
1919
public static string currentSave;
20+
2021

2122
void Awake()
2223
{
2324
Instance = this;
2425
logger.LogWarning("LethalDataAPI Loaded!");
2526

2627
harmony.PatchAll(typeof(StartOfRoundPatch));
27-
28-
int test = LethalData.Load<int>("test");
2928
}
3029
}
3130
}

LethalDataAPI/PluginInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace LethalDataAPI
33
public class PluginInfo
44
{
55
public const string modName = "LethalDataAPI";
6-
public const string modVersion = "1.0.1";
6+
public const string modVersion = "1.0.2";
77
public const string modGUID = "Avocado.LethalDataAPI";
88
}
99
}

0 commit comments

Comments
 (0)