mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04:00
Hardcoded image atlases for it to work from within a .jar - #4993
This commit is contained in:
parent
9df58ed240
commit
59f8a0eebf
@ -61,8 +61,10 @@ object ImageGetter {
|
|||||||
textureRegionDrawables[region.name] = drawable
|
textureRegionDrawables[region.name] = drawable
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load all other atlas files
|
// This is a quickfix for #4993, since you can't .list() on a jar file. This should be fixed in a nicer way.
|
||||||
for (file in Gdx.files.internal(".").list(".atlas")) {
|
val fileNames = listOf("game","Flags","Tech","Skin","Construction")
|
||||||
|
for (fileName in fileNames) {
|
||||||
|
val file = Gdx.files.internal("$fileName.atlas")
|
||||||
val extraAtlas = file.nameWithoutExtension()
|
val extraAtlas = file.nameWithoutExtension()
|
||||||
val tempAtlas = atlases[extraAtlas] // fetch if cached
|
val tempAtlas = atlases[extraAtlas] // fetch if cached
|
||||||
?: TextureAtlas(file.name()).apply { // load if not
|
?: TextureAtlas(file.name()).apply { // load if not
|
||||||
|
Loading…
x
Reference in New Issue
Block a user