up version
This commit is contained in:
@@ -12,7 +12,7 @@ class ServerLevelBundle implements ILevelBundle {
|
||||
public function new() {}
|
||||
|
||||
public function get(id:PackId):LevelPack {
|
||||
var path = FileSystem.absolutePath('./levels/${id}.zip');
|
||||
var path = FileSystem.absolutePath('./resources/level/${id}.zip');
|
||||
var bytes = File.getBytes(path);
|
||||
return {
|
||||
id: id,
|
||||
@@ -22,4 +22,12 @@ class ServerLevelBundle implements ILevelBundle {
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
public function list():Array<PackId> {
|
||||
var result = [];
|
||||
for (path in FileSystem.readDirectory("./resources/level")) {
|
||||
result.push(PackId.fromString(path.split("/").pop().split(".").shift()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user