Images for Escort Formation (#11449)

* Replace and credit "Link" icon

* UnitActionIcons/Escort is a black version of "Link"

* Reprioritize UnitGroup "action" badge to prefer showing what Workers build over escorting
This commit is contained in:
SomeTroglodyte
2024-04-11 22:37:57 +02:00
committed by GitHub
parent 6ad2fea4d9
commit 58243152c9
10 changed files with 391 additions and 376 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 911 KiB

After

Width:  |  Height:  |  Size: 912 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

After

Width:  |  Height:  |  Size: 534 KiB

View File

@ -15,8 +15,8 @@ import com.unciv.ui.images.ImageGetter
*/
open class UnitAction(
val type: UnitActionType,
/** How often this action is used, a higher value means more often and that it should be on an earlier page.
* 100 is very frequent, 50 is somewhat frequent, less than 25 is press one time for multi-turn movement.
/** How often this action is used, a higher value means more often and that it should be on an earlier page.
* 100 is very frequent, 50 is somewhat frequent, less than 25 is press one time for multi-turn movement.
* A Rare case is > 100 if a button is something like add in capital, promote or something,
* we need to inform the player that taking the action is an option. */
val useFrequency: Float,
@ -103,9 +103,9 @@ enum class UnitActionType(
val defaultPage: Int
) {
StopEscortFormation("Stop Escort formation",
{ ImageGetter.getImage("OtherIcons/Stop") }, false, defaultPage = 1),
{ ImageGetter.getUnitActionPortrait("StopEscort") }, false, defaultPage = 1),
EscortFormation("Escort formation",
{ ImageGetter.getImage("OtherIcons/Link") }, false, defaultPage = 1),
{ ImageGetter.getUnitActionPortrait("Escort") }, false, defaultPage = 1),
SwapUnits("Swap units",
{ ImageGetter.getUnitActionPortrait("Swap") }, false, defaultPage = 0),
Automate("Automate",

View File

@ -177,11 +177,11 @@ class UnitGroup(val unit: MapUnit, val size: Float) : Group() {
private fun getActionImage(): Image? {
return when {
unit.isSleeping() -> ImageGetter.getImage("UnitActionIcons/Sleep")
unit.isEscorting() -> ImageGetter.getImage("OtherIcons/Link")
unit.getTile().improvementInProgress != null && unit.canBuildImprovement(unit.getTile().getTileImprovementInProgress()!!) ->
ImageGetter.getImage("ImprovementIcons/${unit.getTile().improvementInProgress}")
unit.isEscorting() -> ImageGetter.getImage("UnitActionIcons/Escort")
unit.isMoving() -> ImageGetter.getImage("UnitActionIcons/MoveTo")
unit.isExploring() -> ImageGetter.getImage("UnitActionIcons/Explore")
unit.getTile().improvementInProgress!=null && unit.canBuildImprovement(unit.getTile().getTileImprovementInProgress()!!) ->
ImageGetter.getImage("ImprovementIcons/${unit.getTile().improvementInProgress}")
unit.isAutomated() -> ImageGetter.getImage("UnitActionIcons/Automate")
unit.isSetUpForSiege() -> ImageGetter.getImage("UnitActionIcons/SetUp")
else -> null

View File

@ -665,6 +665,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
### Others
- [Circle](https://thenounproject.com/term/circle/1841891/) By Aybige - Circle used to compose icons on the fly
- [Link](https://thenounproject.com/icon/chain-link-3111403/) By Brad for Civilopedia links and unit escort formation. The original work has been slightly modified.
- [Arrow](https://thenounproject.com/term/arrow/18123/) By Joe Mortell for movement
- [Swap](https://thenounproject.com/term/swap/1259600) By iconomania for swapping units
- [Road](https://thenounproject.com/icon/road-224428/) By Gábor István Karaba for connect road automation