Skip to content

Commit

Permalink
Add comment explaining why an additional assets folder is being loade…
Browse files Browse the repository at this point in the history
…d in ResourceLoader
  • Loading branch information
DanVanAtta committed Jan 1, 2021
1 parent 93a29f9 commit cecb0a5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@Slf4j
public class ResourceLoader implements Closeable {
public static final String ASSETS_FOLDER = "assets";
// All maps must have at least a "baseTiles" folder
// All maps must have at least a "baseTiles" folder.
private static final String REQUIRED_ASSET_EXAMPLE_FOLDER = "baseTiles/";

private final URLClassLoader loader;
Expand Down Expand Up @@ -130,6 +130,8 @@ public static ResourceLoader getMapResourceLoader(final String mapName) {
final List<String> dirs = new ArrayList<>();
dirs.add(dir.get());

// Add the assets folder from the game installation path. This assets folder supplements
// any map and resources not found in the map are searched for in this folder.
findDirectory(ClientFileSystemHelper.getRootFolder(), ASSETS_FOLDER)
.map(File::getAbsolutePath)
.ifPresent(dirs::add);
Expand Down

0 comments on commit cecb0a5

Please sign in to comment.