Fallback image for modded buildings - see #8158

This commit is contained in:
Yair Morgenstern
2022-12-18 22:11:56 +02:00
parent 81f3ecd998
commit 6b4da20d85
4 changed files with 7 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 KiB

After

Width:  |  Height:  |  Size: 750 KiB

View File

@ -256,8 +256,11 @@ object ImageGetter {
val buildingPortraitLocation = "BuildingPortraits/$construction"
return if (imageExists(buildingPortraitLocation)) {
getImage(buildingPortraitLocation).toGroup(size)
} else
getImage("BuildingIcons/$construction").surroundWithCircle(size).surroundWithThinCircle()
} else {
val image = if (imageExists("BuildingIcons/$construction")) getImage("BuildingIcons/$construction")
else getImage("BuildingIcons/Fallback")
image.surroundWithCircle(size).surroundWithThinCircle()
}
}
if (ruleset.units.containsKey(construction)) {
val unitPortraitLocation = "UnitPortraits/$construction"

View File

@ -216,6 +216,8 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
### Buildings
- [Building](https://thenounproject.com/icon/building-5386455/) by Aurel for fallback image
#### Ancient Era
- [Storehouse](https://thenounproject.com/term/storehouse/966786/) By Pedro Santos for Granary