Allow mods to add maps
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user