Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // create the LWC dir if needed
- Folder = Statics.PluginPath + Path.DirectorySeparatorChar + "LWC/";
- }
- private static void CreateDirectory(string dirPath) {
- if (!Directory.Exists(dirPath));
- {
- Directory.CreateDirectory(dirPath);
- }
- }
- // default loader/saver for now
- Loader = new FlatFileProtectionLoader();
- Saver = new FlatFileProtectionSaver();
- // fire up them cache
- Cache = new Store();
- Log("Syncing protections");
- // and now load the protections
- foreach(Protection protection in Loader.LoadProtections()) {
- {
- Cache.Protections.Add(new LocationKey(protection.X, protection.Y), protection);
- }
- Log("Loaded " + Cache.Protections.Count + " protections!");
- }
- }
Add Comment
Please, Sign In to add comment