mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-31 01:44:45 +07:00
game.png is no longer a special boy
This commit is contained in:
parent
9fcb6860b7
commit
b3cdd4fbab
@ -1 +1 @@
|
||||
[AbsoluteUnits,Construction,EasterEggs,Flags,NationIcons,PolicyIcons,ReligionIcons,Skin,Tech,Tilesets,UnitPromotionIcons]
|
||||
[AbsoluteUnits,Construction,EasterEggs,Flags,NationIcons,PolicyIcons,ReligionIcons,Skin,Tech,Tilesets,UnitPromotionIcons,game]
|
@ -4,6 +4,7 @@ package com.unciv.build
|
||||
import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.tools.texturepacker.TexturePacker
|
||||
import com.badlogic.gdx.utils.Json
|
||||
import com.unciv.build.AndroidImagePacker.packImages
|
||||
import java.io.File
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.attribute.BasicFileAttributes
|
||||
@ -84,7 +85,6 @@ object AndroidImagePacker {
|
||||
atlasList += packFileName
|
||||
packImagesIfOutdated(defaultSettings, file, output, packFileName)
|
||||
}
|
||||
atlasList.remove("game")
|
||||
val listFile = File("$output${File.separator}Atlases.json")
|
||||
if (atlasList.isEmpty()) listFile.delete()
|
||||
else listFile.writeText(atlasList.sorted().joinToString(",","[","]"))
|
||||
|
@ -58,8 +58,6 @@ object ImageGetter {
|
||||
fun resetAtlases() {
|
||||
atlases.values.forEach { it.dispose() }
|
||||
atlases.clear()
|
||||
atlas = TextureAtlas("game.atlas")
|
||||
atlases["game"] = atlas
|
||||
}
|
||||
|
||||
fun reloadImages() = setNewRuleset(ruleset)
|
||||
@ -68,11 +66,6 @@ object ImageGetter {
|
||||
fun setNewRuleset(ruleset: Ruleset) {
|
||||
ImageGetter.ruleset = ruleset
|
||||
textureRegionDrawables.clear()
|
||||
// These are the drawables from the base game
|
||||
for (region in atlas.regions) {
|
||||
val drawable = TextureRegionDrawable(region)
|
||||
textureRegionDrawables[region.name] = drawable
|
||||
}
|
||||
|
||||
// Load base (except game.atlas which is already loaded)
|
||||
loadModAtlases("", Gdx.files.internal(""))
|
||||
|
@ -90,9 +90,11 @@ internal object ImagePacker {
|
||||
val atlasList = mutableListOf<String>()
|
||||
for ((file, packFileName) in imageFolders(input)) {
|
||||
atlasList += packFileName
|
||||
defaultSettings.filterMag = if (file.endsWith("Icons"))
|
||||
Texture.TextureFilter.Linear
|
||||
else Texture.TextureFilter.MipMapLinearLinear
|
||||
packImagesIfOutdated(defaultSettings, file, output, packFileName)
|
||||
}
|
||||
atlasList.remove("game")
|
||||
val listFile = File("$output${File.separator}Atlases.json")
|
||||
if (atlasList.isEmpty()) listFile.delete()
|
||||
else listFile.writeText(atlasList.sorted().joinToString(",","[","]"))
|
||||
|
Loading…
Reference in New Issue
Block a user