Allow mods to add maps

This commit is contained in:
Anuken
2019-09-30 17:24:51 -04:00
parent 94733515e4
commit 3b5dd7567a
3 changed files with 4 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ public class Vars implements Loadable{
/** list of all locales that can be switched to */
public static Locale[] locales;
public static FileTree filet;
public static FileTree tree;
public static Net net;
public static ContentLoader content;
public static GameState state;
@@ -194,7 +194,7 @@ public class Vars implements Loadable{
Version.init();
filet = new FileTree();
tree = new FileTree();
if(mods == null){
mods = new Mods();
}

View File

@@ -70,7 +70,7 @@ public class Maps{
* Does not add this map to the map list.
*/
public Map loadInternalMap(String name){
FileHandle file = Core.files.internal("maps/" + name + "." + mapExtension);
FileHandle file = tree.get("maps/" + name + "." + mapExtension);
try{
return MapIO.createMap(file, false);

View File

@@ -154,7 +154,7 @@ public class Mods implements Loadable{
//ignore special folders like bundles or sprites
if(file.isDirectory() && !specialFolders.contains(file.name())){
//TODO calling child/parent on these files will give you gibberish; create wrapper class.
file.walk(f -> filet.addFile(f));
file.walk(f -> tree.addFile(f));
}
}