Always snap to grid

Legacy:ProfileExporter

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 :: Object >> ProfileExporter (Ladder1.46)
  1. //-----------------------------------------------------------
  2. // Ladder.ProfileExporter
  3. //
  4. // Stores custom mutator & map download locations
  5. // Writes profile information to .txt file
  6. //-----------------------------------------------------------
  7.  
  8. class ProfileExporter extends Object within LadderQuery
  9. 	config(LadderProfiles);
  10.  
  11. struct FileZip
  12. {
  13. 	var string ZipName;
  14. 	var string ZipURL;
  15. };
  16.  
  17. var config array<FileZip> Zips;
  18.  
  19.  
  20. function AddZipLocation(string ZipName, string URL)
  21. {
  22. 	local FileZip Zip;
  23. 	local bool ZipFound;
  24. 	local int i;
  25.  
  26. 	Zip.ZipName = ZipName;
  27. 	Zip.ZipURL = URL;
  28.  
  29. // Find out if we already have this zip on file
  30. // If so, overwrite it
  31. 	for ( i = 0; i < Zips.Length; i++ )
  32. 	{
  33. 		if (Zips[i].ZipName ~= ZipName)
  34. 		{
  35. 			ZipFound = True;
  36. 			break;
  37. 		}
  38. 	}
  39.  
  40. 	if (ZipFound) Zips[i] = Zip;
  41. 	else Zips[Zips.Length] = Zip;
  42.  
  43. 	SaveConfig();
  44. }
  45.  
  46. function DeleteZipLocation(string ZipName)
  47. {
  48. 	local int i;
  49.  
  50. 	for (i=0;i<Zips.Length;i++)
  51. 		if (Zips[i].ZipName ~= ZipName)
  52. 			Zips.Remove(i,1);
  53. 	SaveConfig();
  54. }
  55.  
  56. function string FindZipLocation(string ZipName)
  57. {
  58. 	local int i;
  59.  
  60. 	for (i=0;i<Zips.Length;i++)
  61. 		if (Zips[i].ZipName ~= ZipName)
  62. 			return Zips[i].ZipURL;
  63. }