diff options
Diffstat (limited to 'OpenSim/Framework/AssetLoader')
-rw-r--r-- | OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 46e6ae1..d6ce0c5 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |||
@@ -79,18 +79,23 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
79 | //info.loaded=true; | 79 | //info.loaded=true; |
80 | } | 80 | } |
81 | 81 | ||
82 | public void ForEachXmlAsset(Action<AssetBase> action) | 82 | public void ForEachDefaultXmlAsset(Action<AssetBase> action) |
83 | { | 83 | { |
84 | List<AssetBase> assets = new List<AssetBase>(); | 84 | string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); |
85 | string assetSetsPath = Path.Combine(Util.assetsDir(), "AssetSets.xml"); | 85 | |
86 | 86 | ForEachDefaultXmlAsset(assetSetFilename, action); | |
87 | if (File.Exists(assetSetsPath)) | 87 | } |
88 | |||
89 | public void ForEachDefaultXmlAsset(string assetSetFilename, Action<AssetBase> action) | ||
90 | { | ||
91 | List<AssetBase> assets = new List<AssetBase>(); | ||
92 | if (File.Exists(assetSetFilename)) | ||
88 | { | 93 | { |
89 | string assetSetPath = "ERROR"; | 94 | string assetSetPath = "ERROR"; |
90 | 95 | ||
91 | try | 96 | try |
92 | { | 97 | { |
93 | XmlConfigSource source = new XmlConfigSource(assetSetsPath); | 98 | XmlConfigSource source = new XmlConfigSource(assetSetFilename); |
94 | 99 | ||
95 | for (int i = 0; i < source.Configs.Count; i++) | 100 | for (int i = 0; i < source.Configs.Count; i++) |
96 | { | 101 | { |
@@ -111,9 +116,9 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
111 | "Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); | 116 | "Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); |
112 | } | 117 | } |
113 | 118 | ||
114 | assets.ForEach(action); | 119 | assets.ForEach(action); |
115 | } | 120 | } |
116 | 121 | ||
117 | /// <summary> | 122 | /// <summary> |
118 | /// Use the asset set information at path to load assets | 123 | /// Use the asset set information at path to load assets |
119 | /// </summary> | 124 | /// </summary> |