Changeset 626 for AE/installer2/src/net/oni2/aeinstaller/backend
- Timestamp:
- Jan 17, 2013, 8:52:55 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/backend
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/depot/DepotConfig.java
r621 r626 1 1 package net.oni2.aeinstaller.backend.depot; 2 3 import java.util.TreeSet; 2 4 3 5 import net.oni2.aeinstaller.backend.Settings; … … 65 67 66 68 /** 67 * @return Taxonomy term name for modtype Tool69 * @return Taxonomy term names for mods of type Tool 68 70 */ 69 public static String getTaxonomyName_ModType_Tool() { 70 return "Tool"; 71 public static TreeSet<String> getTaxonomyName_ModType_Tool() { 72 TreeSet<String> res = new TreeSet<String>(); 73 res.add("Tool"); 74 res.add("Patch"); 75 return res; 71 76 } 72 77 -
AE/installer2/src/net/oni2/aeinstaller/backend/depot/model/NodeMod.java
r603 r626 153 153 */ 154 154 public boolean isTool() { 155 TaxonomyTerm tt = DepotManager.getInstance().getTaxonomyTerm( 156 DepotConfig.getTaxonomyName_ModType_Tool()); 157 return getTypes().contains(tt); 155 HashSet<TaxonomyTerm> types = getTypes(); 156 for (String s : DepotConfig.getTaxonomyName_ModType_Tool()) { 157 TaxonomyTerm tt = DepotManager.getInstance().getTaxonomyTerm(s); 158 if (types.contains(tt)) 159 return true; 160 } 161 return false; 158 162 } 159 163 } -
AE/installer2/src/net/oni2/aeinstaller/backend/mods/ModManager.java
r624 r626 10 10 import java.util.HashMap; 11 11 import java.util.HashSet; 12 import java.util.TreeMap; 12 13 import java.util.TreeSet; 13 14 import java.util.Vector; … … 208 209 * @return Collection of tools valid on this platform and not mandatory 209 210 */ 210 public Collection<Mod> getTools() {211 Vector<Mod> res = new Vector<Mod>();211 public TreeMap<String, Mod> getTools() { 212 TreeMap<String, Mod> res = new TreeMap<String, Mod>(); 212 213 for (Mod m : tools.values()) 213 214 if (m.isValidOnPlatform() && !m.isMandatoryMod()) 214 res. add(m);215 res.put(m.getName(), m); 215 216 return res; 216 217 }
Note:
See TracChangeset
for help on using the changeset viewer.