Guest User

Untitled

a guest
Oct 17th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1.  
  2. // create the LWC dir if needed
  3. Folder = Statics.PluginPath + Path.DirectorySeparatorChar + "LWC/";
  4. }
  5.  
  6.  
  7. private static void CreateDirectory(string dirPath) {
  8.  
  9.  
  10. if (!Directory.Exists(dirPath));
  11. {
  12. Directory.CreateDirectory(dirPath);
  13. }
  14.  
  15. }
  16.  
  17. // default loader/saver for now
  18. Loader = new FlatFileProtectionLoader();
  19. Saver = new FlatFileProtectionSaver();
  20.  
  21. // fire up them cache
  22. Cache = new Store();
  23.  
  24. Log("Syncing protections");
  25.  
  26. // and now load the protections
  27.  
  28.  
  29.  
  30.  
  31. foreach(Protection protection in Loader.LoadProtections()) {
  32. {
  33. Cache.Protections.Add(new LocationKey(protection.X, protection.Y), protection);
  34. }
  35.  
  36. Log("Loaded " + Cache.Protections.Count + " protections!");
  37. }
  38. }
Add Comment
Please, Sign In to add comment