Skip to content

Commit

Permalink
Use same tileset directory for both development & distribution...
Browse files Browse the repository at this point in the history
...package for simplicity
  • Loading branch information
AntumDeluge committed Mar 29, 2024
1 parent 66f5f93 commit e9d88dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion buildtools/ant_modules/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<exclude name="items/meta/"/>
</fileset>
</copy>
<copy todir="${build_client_data}/data/tileset">
<copy todir="${build_client_data}/data/maps/tileset">
<fileset dir="${maps}/tileset">
<exclude name="**/*.bz2"/>
<exclude name="**/*.gz"/>
Expand Down
20 changes: 1 addition & 19 deletions src/games/stendhal/client/TileStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TileStore implements Tileset {
/**
* The base directory for tileset resources.
*/
private static final String baseFolder = getResourceBase();
private static final String baseFolder = "data/maps/";

/**
* The tileset animation map.
Expand Down Expand Up @@ -436,24 +436,6 @@ private static TilesetGroupAnimationMap createAnimationMap(final String id,
return map;
}

/**
* Get the base directory for tileset resources.
*
* Hack: Read the tileset directly from tiled/tileset if started from an
* IDE.
* @return the / separated url to the resource
*/
private static String getResourceBase() {
String path = "data/";

if (DataLoader.getResource("data/maps/tileset/README") != null) {
logger.debug("Developing mode, loading tileset from data/maps/tileset instead of data/tileset");
path = "data/maps/";
}

return path;
}

//
// Tileset
//
Expand Down

0 comments on commit e9d88dc

Please sign in to comment.