diff --git a/android/Images.Tech/TechIcons/Fallback.png b/android/Images.Tech/TechIcons/Fallback.png new file mode 100644 index 0000000000..9666b9a254 Binary files /dev/null and b/android/Images.Tech/TechIcons/Fallback.png differ diff --git a/android/assets/Tech.atlas b/android/assets/Tech.atlas index 610a6f4935..8f42769075 100644 --- a/android/assets/Tech.atlas +++ b/android/assets/Tech.atlas @@ -221,360 +221,367 @@ TechIcons/Engineering orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Fertilizer +TechIcons/Fallback rotate: false xy: 328, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Flight +TechIcons/Fertilizer rotate: false xy: 436, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Future Tech +TechIcons/Flight rotate: false xy: 544, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Globalization +TechIcons/Future Tech rotate: false xy: 652, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Guilds +TechIcons/Globalization rotate: false xy: 760, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Gunpowder +TechIcons/Guilds rotate: false xy: 4, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Horseback Riding +TechIcons/Gunpowder rotate: false xy: 112, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Industrialization +TechIcons/Horseback Riding rotate: false xy: 220, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Iron Working +TechIcons/Industrialization rotate: false xy: 328, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Lasers +TechIcons/Iron Working rotate: false xy: 436, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Machinery +TechIcons/Lasers rotate: false xy: 544, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Masonry +TechIcons/Machinery rotate: false xy: 652, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Mass Media +TechIcons/Masonry rotate: false xy: 760, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Mathematics +TechIcons/Mass Media rotate: false xy: 868, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Metal Casting +TechIcons/Mathematics rotate: false xy: 112, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Metallurgy +TechIcons/Metal Casting rotate: false xy: 220, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Military Science +TechIcons/Metallurgy rotate: false xy: 328, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Mining +TechIcons/Military Science rotate: false xy: 436, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Mobile Tactics +TechIcons/Mining rotate: false xy: 544, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Nanotechnology +TechIcons/Mobile Tactics rotate: false xy: 652, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Navigation +TechIcons/Nanotechnology rotate: false xy: 760, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Nuclear Fission +TechIcons/Navigation rotate: false xy: 868, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Nuclear Fusion +TechIcons/Nuclear Fission rotate: false xy: 976, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Optics +TechIcons/Nuclear Fusion rotate: false xy: 220, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Particle Physics +TechIcons/Optics rotate: false xy: 328, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Pharmaceuticals +TechIcons/Particle Physics rotate: false xy: 436, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Philosophy +TechIcons/Pharmaceuticals rotate: false xy: 544, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Physics +TechIcons/Philosophy rotate: false xy: 652, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Plastics +TechIcons/Physics rotate: false xy: 760, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Pottery +TechIcons/Plastics rotate: false xy: 868, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Printing Press +TechIcons/Pottery rotate: false xy: 976, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Radar +TechIcons/Printing Press rotate: false xy: 1084, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Radio +TechIcons/Radar rotate: false xy: 328, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Railroads +TechIcons/Radio rotate: false xy: 436, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Refrigeration +TechIcons/Railroads rotate: false xy: 544, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Replaceable Parts +TechIcons/Refrigeration rotate: false xy: 652, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Rifling +TechIcons/Replaceable Parts rotate: false xy: 760, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Robotics +TechIcons/Rifling rotate: false xy: 868, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Rocketry +TechIcons/Robotics rotate: false xy: 976, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Sailing +TechIcons/Rocketry rotate: false xy: 1084, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Satellites +TechIcons/Sailing rotate: false xy: 1192, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Scientific Theory +TechIcons/Satellites rotate: false xy: 436, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Stealth +TechIcons/Scientific Theory rotate: false xy: 544, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Steam Power +TechIcons/Stealth rotate: false xy: 652, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Steel +TechIcons/Steam Power rotate: false xy: 760, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Telecommunications +TechIcons/Steel rotate: false xy: 868, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Telegraph +TechIcons/Telecommunications rotate: false xy: 976, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/The Wheel +TechIcons/Telegraph rotate: false xy: 1084, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Theology +TechIcons/The Wheel rotate: false xy: 1192, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Trapping +TechIcons/Theology rotate: false xy: 1300, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -TechIcons/Writing +TechIcons/Trapping rotate: false xy: 544, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 +TechIcons/Writing + rotate: false + xy: 652, 112 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 diff --git a/android/assets/Tech.png b/android/assets/Tech.png index 7ffb941ae0..fda80e89d7 100644 Binary files a/android/assets/Tech.png and b/android/assets/Tech.png differ diff --git a/core/src/com/unciv/ui/images/ImageGetter.kt b/core/src/com/unciv/ui/images/ImageGetter.kt index 59251cb4a8..34f3c8b549 100644 --- a/core/src/com/unciv/ui/images/ImageGetter.kt +++ b/core/src/com/unciv/ui/images/ImageGetter.kt @@ -370,9 +370,11 @@ object ImageGetter { } fun getTechIconGroup(techName: String, circleSize: Float): IconCircleGroup { - val techIconColor = ruleset.eras[ruleset.technologies[techName]?.era()]?.getColor()?.darken(0.6f) - ?: Color.BLACK - return getImage("TechIcons/$techName").apply { color = techIconColor } + val techIconColor = ruleset.eras[ruleset.technologies[techName]?.era()]?.getColor()?.darken(0.6f) ?: Color.BLACK + val image = + if (imageExists("TechIcons/$techName")) getImage("TechIcons/$techName") + else getImage("TechIcons/Fallback") + return image.apply { color = techIconColor } .surroundWithCircle(circleSize) .surroundWithThinCircle(techIconColor) } diff --git a/docs/Credits.md b/docs/Credits.md index 02d387a106..26d1c09715 100644 --- a/docs/Credits.md +++ b/docs/Credits.md @@ -435,6 +435,8 @@ Unless otherwise specified, all the following are from [the Noun Project](https: ### Technologies +- [Lightbulb](https://thenounproject.com/icon/lightbulb-589680/) by Davo Sime for fallback image + #### Ancient - [Agriculture](https://thenounproject.com/term/agriculture/4221/) By OCHA Visual Information Unit